How to solve a R package installing problem? - r

When I install a r package through biomanager,
BiocManager::install("hcg110.db",ask = F,update = F)
though I already downloaded it, it has such error:
Using library: D:/Program Files/rgragh/r/R-4.0.5/library
Error in get(x, envir = ns, inherits = FALSE) :
object 'is.rserver' not found
Calls: suppressMessages ... withCallingHandlers -> .get_fun -> <Anonymous> -> get
Execution halted
How could I solve it?

Related

Trouble with knitting, object not found

I was trying to knit my document, but came across an error:
Error in eval (expr, envir, enclos) : object 'AVG' not found
Calls: ...withVisible -> eval_with_user_handlers -> eval -> eval
Execution halted
This was my code. I'm confused because I thought I defined AVG in the second line. Any ideas?
for (i in 1:30)
{AVG[i] <- mean(rnorm(100))
}
"SD" <- sd(AVG)
print(SD)

Error in do.call(rbind, x$quantifications) :second argument must be a list Calls: ... eval_with_user_handlers Execution halted

I want to knitr Rmarkdown to html , but I got the same error in the those line:
plot(h, plot.type = "objplot",var.subset=c(1,2,3))
plot(h,plot.type = "jointplot",var.subset=c(1,2,3))
plot(h, plot.type = "labplot", var.subset = c(1,2,3), main = "Labelplot Rater 2")
This is the error:
Error in do.call(rbind, x$quantifications) :
second argument must be a list
Calls: <Anonymous> ... eval_with_user_handlers -> eval -> eval -> plot -> plot.homals -> do.call
Execution halted
I want to graph this object type homals
h <- homals::homals(new.turismo,ndim = 2,level = "nominal")

Why R CMD Check failed with weird error in winbuilder ? "type must be LANGSXP at this point"

I am trying to propose an update of my package 'antaresRead' on CRAN.
When I use the service "https://win-builder.r-project.org/upload.aspx" for R-devel to test my package, I have this error :
test_check("antaresRead")
Error in length(ans$indices) : type must be LANGSXP at this point
Calls: test_check ... eval -> eval -> suppressMessages -> withCallingHandlers
Logs are here
Why I have this error for this platform and with R-devel ? Can I correct It ?
When I use the same service with R-release and R-oldRelease, checks are OK :
Rrelease
RoldRelease
With the same code :
Travis Is
OK
appVeyor is OK for 8 combinations
rhub is also OK for 8 platforms
rhub::check(platform = 'debian-gcc-release')
rhub::check(platform = 'macos-elcapitan-release')
check_for_cran(platforms = "windows-x86_64-oldrel")
check_for_cran(platforms = "windows-x86_64-patched")
rhub::check(platform = 'fedora-clang-devel')
rhub::check(platform = 'fedora-gcc-devel')
rhub::check(platform = 'debian-gcc-patched')
rhub::check(platform = 'debian-gcc-devel')
Has anyone ever encountered this error? how to solve it?
What I did :
Download the R-devel version for Windows found here --> R 3.5.0
Build and check my pacakge antaresRead for x64 --> build and check are OK
Build and check my package for i386 --> build OK but faild in Check with the same error
Error in length(ans$indices) : type must be LANGSXP at this point
Calls: test_check ... eval -> eval -> suppressMessages -> withCallingHandlers
Solution :
- My bad, it's my code, it's my fault.
The error come from this code
districtLinks <- merge(districtLinks, districts[, .(district, x, y)],
by.x = "toDistrict", by.y = "district")
districtLinks is empty sometimes and with the new version of R and data.table this provokes an error only in Windows 32bits. I added a check before.
This error come because I wanted to merge an empty data.table with another data.table.
districtLinks <- merge(districtLinks, districts[, .(district, x, y)],
by.x = "toDistrict", by.y = "district")
What I did is to add a check before the merge
if(!dim(districtLinks)[1]==0){
districtLinks <- merge(districtLinks, districts[, .(district, x, y)],
by.x = "toDistrict", by.y = "district")
}

Rmarkdown error in eval, object not found

I have been trying to knit my rmd file, but keep getting an error message
line 56 Error in eval(expr, envir, enclos) : object 'gol.fac' not found Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval Execution halted
```{r}
data(golub, package = "multtest")
grep("Zyxin",golub.gnames[,2])
all <- golub[2124,gol.fac=="ALL"]
aml <- golub[2124,gol.fac=="AML"]
summary(all)
summary(aml)
```
Line 56 is the first line after the ```{r}.
I am not sure why it is giving me errors, when I am able to run the code before knitting

KnitR unable to download documents

I am able to run this code normally in R.
setInternet2(use = TRUE)
download.file("http://d396qusza40orc.cloudfront.net/dsscapstone/dataset/Coursera-SwiftKey.zip", "Coursera-SwiftKey.zip", method = "curl", mode = 'wb')
unzip("Coursera-SwiftKey.zip", files=c("final/en_US/en_US.twitter.txt", "final/en_US/en_US.news.txt", "final/en_US/en_US.blogs.txt"), exdir=".")
But when i try to use knitR it gives me this error
Quitting from lines 15-21 (milestone.Rmd)
Error in parse(text = x, srcfile = src) : <text>:5:106: unexpected ')'
4: unzip("Coursera-SwiftKey.zip", files=c("final/en_US/en_US.twitter.txt", "final/en_US/en_US.news.txt", "final/en_US/en_US.blogs.txt"), exdir=".")
5: file.copy(c("final/en_US/en_US.twitter.txt", "final/en_US/en_US.news.txt", "final/en_US/en_US.blogs.txt"?)
^
Calls: <Anonymous> ... <Anonymous> -> parse_all -> parse_all.character -> parse
Execution halted
I am using R Studio and MAC OS X.
I tried removing the s from https but it still di not work.

Resources