Error using readMapping function of topGO - r

I am getting the below error when I am using the readMappings function of topGO in R
library(topGO)
geneID2GO <- readMappings(file = "All_genes_GO_terms", package = "topGO")
Error in readMappings(file = "All_genes_GO_terms", package = "topGO") :
unused argument (package = "topGO")

Related

How to solve unused argument error as part of a meltAssay?

When using meltAssay to convert a SummarizedExperiment object, the central data infrastructure for microbiome analysis in Bioconductor, into long data.frame, I use the following lines according to the instructions in the book:
tse <- transformSamples(tse, method="relabundance")
molten_tse <- meltAssay(tse,
add_row_data = TRUE,
add_col_data = TRUE,
assay_name = "relabundance")
molten_tse
However, I get the following error:
Error in .melt_assay(x, abund_values, feature_name, sample_name, ...)
: unused argument (assay_name = "relabundance")
Use the following syntax instead: (abund_values instead of assay_names.
There seems to be an error in the book)
molten_tse <- meltAssay(tse,
add_row_data = TRUE,
add_col_data = TRUE,
abund_values = "relabundance")

Conceptual Stucture doesn't accept clust

I use the latest version of package and I try to run this:
I try to run this example:
library(bibliometrix)
download.file("https://www.bibliometrix.org/datasets/joi.zip", destfile = temp<-tempfile())
M <- convert2df(readLines(unz(temp, "joi.txt")), dbsource="isi",format="plaintext")
CS <- conceptualStructure(M, method="MCA", field="ID", minDegree=10, clust=5, stemming=FALSE, labelsize=8,documents=20)
but I receive this error:
Error in conceptualStructure(M, method = "MCA", field = "ID", minDegree = 10, :
unused argument (clust = 5)
What should change?

Error: could not find function "interpolate.fft" (R module spectral IS installed)

My code:
library(spectral)
x <- seq(0,99)
y <- sin(x/6) + 0.5*cos(x/22)
z <- interpolate.fft(y)
RStudio says: Error in interpolate.fft(y) : could not find function "interpolate.fft"
When I try to use it as spectral::interpolate.fft(y), the error is
Error: 'interpolate.fft' is not an exported object from 'namespace:spectral'
Any help?

Eventstudies package r phys2eventtime null

I am using the eventstudies package in R and I am struggling to replicate the eventsudy function which is used as an example in the package as below:
# Event study without adjustment
es <- eventstudy(firm.returns = StockPriceReturns,
event.list = SplitDates,
event.window = 7,
type = "None",
to.remap = TRUE,
remap = "cumsum",
inference = TRUE,
inference.strategy = "bootstrap")
I use my own data for StockPriceReturns and SplitDates and even though I have tried to make them of the same format, type etc of those above I think this is where it is failing. The message I am getting is:
Error in phys2eventtime(z = returns$firm.returns, events =
event.list[i, : events$name should a character class. In addition:
Warning message: In is.na(events$name) : is.na() applied to
non-(list or vector) of type 'NULL'
Any help would be much appreciated.

Error message when running npreg

I'm working the npreg example in the R np package documentation (by T. Hayfield, J. Racine), section 3.1 Univariate Regression.
library("np")
data("cps71")
model.par = lm(logwage~age + I(age^2),data=cps71)
summary(model.par)
#
attach(cps71)
bw = npregbw(logwage~age) # thislne not in example 3.1
model.np = npreg(logwage~age,regtype="ll", bwmethod="cv.aic",gradients="TRUE",
+ data=cps71)
This copied directly from the example, but the npreg call results in error message
*Rerun with Debug
Error in npreg.rbandwidth(txdat = txdat, tydat = tydat, bws = bws, ...) :
NAs in foreign function call (arg 15)
In addition: Warning message:
In npreg.rbandwidth(txdat = txdat, tydat = tydat, bws = bws, ...) :
NAs introduced by coercion*
The npreg R documentation indicates the first argument should be BW specificaion. I tried setting bws=1
model.np = npreg(bws=1,logwage~age,regtype="ll",
+ bwmethod="cv.aic",gradients="TRUE", data=cps71)
which gives the following error
*Error in toFrame(xdat) :
xdat must be a data frame, matrix, vector, or factor*
First time working with density estimation in R. Please suggest how to resolve these errors.

Resources