I am using d3 with meteor
Here is how my client/main.html looks like.
I get the d3.scaleBand() not a function.
I tried importing different versions of d3 but the same result.
Don't you need to install the d3-scale package to get access to the d3.scaleBand() function?
Related
I am trying to visualize features that were extracted from a dataset of CT-scans using radiomics. I extracted features using the Pyradiomics library, and now I have a few .csv files.
I found this R Library which can read a dataset and generate images for it. Reading the dataset works according to plan using the input = import_pyradiomics(dir = "/path/to/datadir") command, but when I try to visualize it using for instance plot_correlation_matrix(rdr = input, view_as = "heatmap"), one of the visualization functions, I get the following error:
Error: $ operator not defined for this S4 class
I read about S3 and S4 classes, and I think that [line 160] in the library is where this error occurs first as it attempts to call this '$' operator. I am currently using R version 4.0.2. It seems to me like this issue is caused by this R library relying on an older version of R, but it is relatively up to date. What can I do to resolve this issue? Do I have to go in and manually change the code in the library? Or is there an easier fix, such as casting the S4 class to an S3 class? I feel like I'm missing an easy solution because I'm not familiar with R.
I found a similar question here, but it doesn't answer my specific question. Answers on other questions regarding this topic also do not work for me unfortunately.
I am the developer of RadAR, thank you for your interest in our package. The issue was probably related to the use of a different version of the SummarizedExperiment R package. The bug has now been fixed. You can re-install the new version of RadAR from https://github.com/cgplab/RadAR.
For any questions related to RadAR, please refer to the "issues" section of the RadAR github page.
I am using the isoriX package in R and would like to update part of the source code. When I try to run it without making any changes yet, R doesn't seem to recognise any function preceded by a dot.
Am I missing any packages that should be installed in order to allow me to use those kind of functions or to update the source code?
The code I am trying to apply is quite long, but the bit R struggle with is the following function:
.complete_args()
Any ideas? Thank you!
The isoriX:::.complete_args() call worked.
You can access unexported function with ::: and in my case isoriX:::.complete_args() worked well.
I built my own package. I imported the most important package that I need them in my package. In these packages there are some functions are not exported by the package (I did not find them in the namespace of the package). I need these functions. When I call them, I get an error that those funciton are not found. So, How I can solve this problem. Also, how does these packages uses this functions inside their packages without using #export!! any help please?
based on the answer:
I understand I do it like this inside my R code: I need the following function:
args <- preproc(c(as.list(environment()), call = match.call()),
check_matrix,
check_fammat,
check_parmat,
check_par2mat)
list2env(args, environment())
Then I must do like this:
VineCopula:::preproc()
Then how to call args?
You can call non exported functions with
packagename:::functionname()
It is however not recommended to do that since those functions might not be supported in future versions of packages.
If you want to use a non exported function from your own library inside your own library, you can just use functionname() altough some package developers still prefer packagename:::functionname().
I created some functions and try to build a package/library, but run into some problems. I hoped to get some advise here on this support site.
This is how I tried to built my package.
I had some functions in an R file, including roxygen2 comments.
Then in R
library("devtools")
library(roxygen2)
setwd("C:to/my/directory")
create("myPackage")
Then I put my functions file in the R folder and changed the DESCRIPTION file.
setwd("./myPackage")
document()
setwd("..")
install("myPackage")
library(myPackage)
Then, when I want to see how a function works
?function1
I see the documentation in my browser.
But when I want to use my function I get an error.
function1
Error: object 'function1' not found
function1()
Error: could not find function "function1"
Does anyone know what I am doing wrong? I am using R 3.3.1 on Windows 7.
Your help or comments are appreciated, thanks in advance!
Ben
I am attempting to run the R code from this question
and I get the following error:
Error in rename(x, .base_to_ggplot, warn_missing = FALSE) :
could not find function "revalue"
I wonder whether it's an incompatibility between the R version I'm using and ggplot2 (v. 0.9.3.1). Is anybody aware of this problem, or is my issue something else?
Yes, ggplot2 works with the current version of R (3.0.1)
revalue is not a function in ggplot2, it's a function in plyr as pointed out in the comments.
A simple google search function revalue R will reveal this. Many packages depend on one another - so when you see an error like the one above, you need to use google/some other resource to find which package the missing function is from.