Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter error when compiling vignette. Error in storage.mode(x) <- "double" : #122

Open
jonesor opened this issue Jun 20, 2021 · 0 comments

Comments

@jonesor
Copy link
Owner

jonesor commented Jun 20, 2021

When compiling a03_VectorisingRcompadre.Rmd I get an error when using filter (but not if I replace with subset)

Error in storage.mode(x) <- "double" : 
  no method for coercing this S4 class to a vector
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> filter

Why doesn't filter work for this?

The relevant chunk of code:

# add column 'check_NA_A', indicating whether matA contains missing values (T/F)
CompFlag <- cdb_flag(CompUnnest, checks = "check_NA_A")

# remove rows where matA contains missing values
CompSub <- subset(CompFlag, check_NA_A == FALSE)

# apply lambda() to every remaining matA
CompSub$lambda <- sapply(matA(CompSub), popdemo::eigs, what = "lambda")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant