[R] Rcpp package problems

Nick Wray n|ckmwr@y @end|ng |rom gm@||@com
Wed Sep 29 18:29:21 CEST 2021


Hi I am having having problems with the package Rcpp.  Although I have
installed and loaded it, in two different situations it seems to send R
into an endless loop



The first one was trying to run code from a site showing how to use the
stl() function

*http://www.gardner.fyi/blog/STL-Part-I/
<http://www.gardner.fyi/blog/STL-Part-I/>*



The code and data is at

https://github.com/dillongardner/NYTraffic



The first few lines are as follows:



library(feather)
library(dplyr)
library(tidyr)
library(ggplot2)
library(stlplus)
library(dygraphs)
library(lubridate)
library(Rcpp)
##########################################################################
# Read and format
##########################################################################

myData <- read_feather("NYTrafficData.feather")

At this point I get the error message: “Error in openFeather(path) :

  function 'Rcpp_precious_remove' not provided by package 'Rcpp'”



BUT – if now I rerun the line

library(Rcpp)

I don’t get the error message but R goes into an endless loop with the red
button thing



Similarly, if I try to run the example code from the R documentation site



https://www.rdocumentation.org/packages/stlplus/versions/0.5.1/topics/stlplus



library(stlplus)
library(Rcpp)
######
co2_stl <- stlplus(co2, t = as.vector(time(co2)), n.p = 12,
                   l.window = 13, t.window = 19, s.window = 35, s.degree = 1,
                   sub.labels = substr(month.name, 1, 3))

Again I get the error message “Error in c_loess(x[y_idx], y[y_idx],
degree, span, weights[y_idx], m,  :

  function 'Rcpp_precious_remove' not provided by package 'Rcpp'“



BUT again if I rerun the line

library(Rcpp)

I don’t get the error message but R goes into an endless loop with the red
button thing



Can anyone help me to sort this?  Thanks Nick Wray

	[[alternative HTML version deleted]]



More information about the R-help mailing list