newSeqExpressionSet function troubleshooting in R - r

I want to rebuild the Ruvseq model based on the "RUVseq" manual in Bioconductor. But, I can't use these newSeqExpressionSet, plotRLE, plotPCA, and library(betweenLaneNormalization)functions. every time it gives: "could not find function newSeqExpressionSet"
I used R 4.2.2 and loaded these libraries:
library(edgeR)
library(RUVSeq)
library(EDASeq)
library(zebrafishRNASeq)

Related

How to accurately use the epi.kappa() function in R?

I am attempting to perform a kappa statistic test on 2 indices I created. I've found that there are multiple packages in R that have functions for this and am trying to compare two functions: the epi.kappa() function in the epiR package and the cohen.kappa() function from the psych package.
I was able to successfully use the cohen.kappa() function with my data however, I continue to get errors when using the epi.kappa() function. My code is as follows
library(epiR)
kap.dat = matrix(c(275,78,305,154),nrow=2,byrow=TRUE)
colnames(kap.dat) = c("I1-0","I1-1")
rownames(kap.dat) = c("I2-0","I2-1")
epi.kappa(kap.dat,method="cohen",alternative= "two.sided",conf.level=0.95)
The error I get is:
Error in epi.kappa(kap.dat,method="cohen",alternative="two.sided", :
object `pO.p` not found
Check that you've got the latest version of epiR installed and update if necessary. Latest version on CRAN is 2.0.50. Type help(epi.about) once package loaded --- version of package will be shown at the bottom of the page.

BiodiversityR::accumcomp.long function not found

I am trying to use the function accumcomp.long in the Biodiversity.R package in order to adjust my species accumulation curves in ggplot.
However, calling the function accumcomp.long gives me an error, suggesting that this function perhaps does no longer exists.
accum.long1 <- accumcomp.long(Accum.1, ci=NA, label.freq=5)
Error in accumcomp.long(Accum.1, ci = NA, label.freq = 5) :
could not find function "accumcomp.long"
The function BiodiversityR::accumcomp.long
returns
Error: 'accumcomp.long' is not an exported object from 'namespace:BiodiversityR'
I am not certain whether this is an issue with the package, the way the package is loaded into my R space, or perhaps unrelated to the package simply the format of my data.
My community and environment files are of dataframe class. I have tried loading them as .csv files as well as .rda files, but the error remains.
??accumcomp.long
renders "No results found".
I am using R version 3.5.3 (2019-03-11)
Any suggestions as to what else I could try?
Thanks in advance!
I re-installed the package BiodiversityR and included force = T (as per this thread https://community.rstudio.com/t/could-not-find-function-error-even-though-fun-is-in-namespace-and-has-an-rd-file/91243). I then reloaded the package. I am not sure what force = T does, but the accumcomp.long function now works.

how to add new R packages in azure machine learning for time series anomaly detection

I am trying to find out time series anomaly detection in which i need to install new R packages. In this i m following https://github.com/business-science/anomalize site. In this i needed to install 2 packages: tidyverse and anomalize.
can anyone help me on installing package mentioned above as I am getting
error "package or namespace load failed for tidyverse"
Also while adding zip of tidyverse and anomalize do I need to add any other packages and dependencies in that as I am adding only those 2 packages thinking there r no other dependencies I needed for those 2?
you can see in code that I created R_Package.zip and put tidyverse.zip and anomalize.zip in that that
dataset1 <- maml.mapInputPort(1)
data.set <- data.frame(installed.packages())
#install.packages(“src/R_Package/tidyverse_1.2.1.zip”, lib = “.”,
repos = NULL, verbose = TRUE);
#library(tidyverse, lib.loc=”.”, verbose=TRUE);
install.packages("src/tidyverse.zip",lib=".",repos=NULL,verbose=TRUE)
library(R_package, lib.loc = ".", verbose=TRUE);
install.packages("src/anomalize.zip",lib=".",repos=NULL,verbose=TRUE)
library(R_package, lib.loc = ".", verbose=TRUE);
#success <- library("tidyverse", lib.loc = ".",
logical.return = TRUE, verbose = TRUE)
#library(tidyverse)
maml.mapOutputPort("dataset1");
Regarding the error message, notice that it may take some time for the installed packages to become actually available; quoting from Adding R Packages In Azure ML blog post:
Note: In one instance, we ran into an issue where the package was not
loaded into the workspace immediately. We had to wait about half an
hour before we could use the package. You may be running into this
issue as well if you see a message that looks something like this
and you’ve used the above method to check which packages are in your
workspace and the package in question appears on that list. If this is
the case, we suggest waiting a bit before running your experiment
again.
AFAIK yes, you also need to add the package dependencies; the SO thread Install R Packages in Azure ML contains some useful hints.

dataset cannot be loaded although data() lists it

We have an R library which has the dataset plaq.sample in the file data/plaq.sample.Rdata. One of the examples of a library function uses it. The example works just fine on my laptop (R 3.5.1), my colleagues laptop (R 3.1.3 and 3.4.4) but it fails on Travis CI (R 3.5.1 as well). The output is the following:
> data(plaq.sample)
Warning in data(plaq.sample) : data set ‘plaq.sample’ not found
> plaq.boot <- bootstrap.analysis(plaq.sample, pl=TRUE)
Error in bootstrap.analysis(plaq.sample, pl = TRUE) :
object 'plaq.sample' not found
Execution halted
This is bewildering. I have called data() at the beginning of the example and the output clearly states that this dataset is available:
Data sets in package ‘hadron’:
correlatormatrix
plaq.sample Sample plaquette time series
pscor.sample
samplecf Sample cf data
We are lost and do not understand why the R CMD check . does work on our laptops but not on Travis CI. What could be the issue for not finding the dataset?
I read a warning about the hidden file .Rdata which was present in the checking. I have added .Rdata to the .Rbuildignore file to exclude it. However, this file interprets each line as a regular expression, therefore also including data/plaq.sample.Rdata. Removing this line makes the dataset available again.

R could not find function "checkAtAssignment" while running rworldmap

I need your help with R not being able to run a function with rworldmap package.
When using rworldmap package in R and trying to 'joinCountryData2Map'
sPDF <- joinCountryData2Map (myframe, joinCode = "NAME", nameJoinColumn = "location", verbose = TRUE, suggestForFailedCodes = TRUE )
I get the following error:
Error in mapWithData#data <- cbind(mapWithData#data, dF[matchPosnsInUserData, :
could not find function "checkAtAssignment"
Calls: joinCountryData2Map
Execution halted
My guess is that R needs methods package, which I could not find for my R version.
Any suggestings why I 'could not find function "checkAtAssignment"'?
My R version is 3.0.2 Patched.
Using rworldmap package requires loading library(methods). I am writing it here because it was really not obvious.
Dunno what "R 3.0.2 Patched" means, but yes you are correct that somehow you don't have the methods package, which is included in the standard installation package. How about reinstalling R from the binaries or source tarball at CRAN -- that should solve your problem.

Resources