Category : r

I have some basic R code demo in RStudio (1.4.1103) that executes without error on my MacOS (11.6) MacBook. Same code throws errors when run on students’ Windows 10 laptops (same R and Studio as on MacBook) Errors like… plot(stdata$region) Error in plot.window(…) : need finite ‘ylim’ values plot(stdata$region, stdata$teacherpay, main="Example Plot", xlab="Region", ylab="Teacher Pay", ..

Read more

Iam trying to import windows fonts into R/R.Stuido (both latest versions used with Windows 10). Some time ago I was successful on another window 10 device using this code: install.packages("pkgbuild") library(extrafont) library(remotes) remotes::install_version("Rttf2pt1", version = "1.3.8") extrafont::font_import() When I tried to re-run that one on the actual device I am running into troubles with the ..

Read more

Iam trying to import windows fonts into R/R.Stuido (both latest versions used with Windows 10). Some time ago I was successful on another Windows 10 device using this code: install.packages("pkgbuild") library(extrafont) library(remotes) remotes::install_version("Rttf2pt1", version = "1.3.8") extrafont::font_import() When I tried to re-run that one on the actual device I am running into troubles with the ..

Read more

I had an older version of Rstudio(1.1.463) was not being able to install ggplot2 package showed an error error in loadnamespace(i, c(lib.loc, .libpaths()), versioncheck = vi[[i]]) : namespace ‘rlang’ 0.4.5 is being loaded, but >= 0.4.10 is required tried installing rlang again and then gglpot 2 but showed the same error Then I updated the ..

Read more

I have an RcppEigen package that successfully Rcpp::sourceCpp()s, devtools::check()s, and devtools::document()s, but I get the following error when I try to run a simple example: Error in .Call("_pfexamplesinr_svolApproxLL", PACKAGE = "pfexamplesinr", : "_pfexamplesinr_svolApproxLL" not available for .Call() for package "pfexamplesinr" The error is generated from the following minimal piece of code devtools::install_github("tbrown122387/[email protected]") numTime <- 3 ..

Read more

I write code in Rcpp and I face the following problem #include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] double EXP(double x){ return exp(x); } I would like to ask if there is a way to make it for the function EXP to handle large negative values. For example, when I run EXP(-5000) [1] 0 Ideally, I ..

Read more

I have a RcppEigen project that I’m trying to update documentation for. This project only exports one c++ function into R. Unfortunately, I get a problem when I run either devtools::document(pkg = "~/pfexamplesinr/") or roxygen2::roxygenize(roclets="rd", package.dir = "pfexamplesinr/") The error message is below. It says something about System command ‘R’ failed. The last line makes ..

Read more