Xap.require in R - r

I'm trying to work with this tutorial. I'm confused because in the very first line there is this code
xap.require('oro.dicom','oro.nifti')
but I cannot find any function called xap.require online or with ??. It seems like this is related to software developement. Does anyone have idea what this is for?

It would appear this is a peculiarity of ANALYTIXAGILITY. My guess is that they have their own package for integrating the R console into their platform.

Related

how to define variables after importing excel sheet in R

i imported exel to R now i do not know how to solve the question, as it is my 1st time with R
As this looks like an assignment/homework question, and you mention this is your 1st time with R, I think you would benefit more from looking at an in-depth introduction to R than a quick answer here. This site seems to be a good introduction: https://intro2r.com/index.html . The site recommend RStudio which is far more intuitive and easy to use than base R.
There is also often good documentation on basic functions within R itself. Type ? into the console before any command and it will direct you to some helpful information. For example, you may find these useful to get started.
?hist
?plot
?min
?max

Error: ebirdst::calc_full_extent() function does not exist

I am trying to use the ebirdst package for some exploratory data analysis, following this tutorial. Everything going according to plan until I run this line:
week_ext <- calc_full_extent(occ_proj)
and get this error:
Error in calc_full_extent(occ_proj) : could not find function "calc_full_extent"
I know sometimes new functions won't show up, or it can be a version issue, but the tutorial I'm referencing is from 2018 and everything else works perfectly. Does anyone know why a crucial function would just not be there? Or what steps to take? I've looked to see if there are any analogous functions and can't find any.
Also this is my first stackoverflow question--I've always been able to solve my issues based on existing questions, but there seems to be very little out there on ebirdst--so please let me know if I need to provide more info/context.
Thanks!

Hierarchical bar charts in r

I'm working on a visualization project in R and thought of creating bar charts for hierarchical data (states with constituencies in it, each constituency possessing a numeric value).
I came across this web page (https://observablehq.com/#d3/hierarchical-bar-chart) which implements exactly this using library "d3" but for JavaScript.
Is there any similar library in R to do this?
I also had similar question before! But I couldn't find any package or code online that does the same thing in R, the closest thing I found was "r2d3" package which allows you to run javascript in R.
So by leveraging the "r2d3" package, I was able to replicate it and put it into a function call "hbar", you can directly source it from my github with the code below:
source("https://raw.githubusercontent.com/JohnnyPeng123/hierarchical_bar_chart-/master/hbar.r")
For more details and use case please follow the link below:
https://github.com/JohnnyPeng123/hierarchical_bar_chart-
Let me know if you need any help in terms of using this function.
You can use ggplot.
If you need more help, please share a reproductive example.

Colored output in R console, esp. colored errors

colorout is no longer on CRAN. As #user2647661 points out below, the package is still being maintained and can be downloaded from the author's website.
My question: Is there another R package that provides similar functionality or at least a quick hack that shows errors in red? (I use R inside a Gnome Terminal on Ubuntu.)
I am aware of Alex's question about printing errors in red. #Eric Fail's answer suggests that something like this can be build using error handling functions. However, I am not familiar enough with R to fully understand his suggestion. Has anybody implemented something like this yet?
The package is no longer on CRAN but it's still being maintained. Please, look at http://www.lepem.ufc.br/jaa/colorout.html

Downloading Package "Cart" in R

Does anybody know where I can download the R package "cart" that can help create Gastner's
"Mapping with Diffusion-based Cartograms" ? I tried a install.package on R and says it's not available
for R 2.15. There is a page on R-forge about it but it doesn't explain how to download the package.
Thanks.
Way late to the game, but from what I can tell there's not much happening for the cart package; my recent efforts with cartogramming in R have pushed me towards two alternatives: Rcartogram within R (available from the GitHub repository) and ScapeToad, a program written in JS.
Advantage of the former is that you don't have to leave R (better for long-term project management), however it's a bit arcane to use (requires converting your shapefile to a density grid & then figuring out how to use an interpolation method, etc.).
Advantage of the latter is that it's got a very simple point-and-click GUI--add shapefile, create cartogram wizard, export shapefile, voila.
Both are based on the Gastner-Newman diffusion-based algorithm.
If you check the build page you'll see that at the moment the package fails to build. I thought it might be something minor but I've put in a little bit of work so far and it's still failing to build on my machine.
You might want to email the authors and ask them. You could also try their forum but it looks like it hasn't seen much activity lately.

Resources