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

Error re: Non-numeric variable in data frame: date #7

Open
mbadros opened this issue Nov 30, 2017 · 0 comments
Open

Error re: Non-numeric variable in data frame: date #7

mbadros opened this issue Nov 30, 2017 · 0 comments

Comments

@mbadros
Copy link

mbadros commented Nov 30, 2017

Thanks for your work on this very interesting package. I'm getting following error (traceback copied below) using R 3.4.2 (on a Windows 64-bit machine). There's something about the date not being numeric (which it clearly isn't -- it's a string ordinarily; I've modified it to be a date in the below example) ... but I don't know why that matters to the data frame.

Any thoughts?

Mark

> pnl %>% calculate(calculations = profit_margins, digits = 2)
 Hide Traceback
 
 Rerun with Debug
 Error in Math.data.frame(list(Net_Margin = c(0.0947474225936983, 0.100807355791349,  : 
  non-numeric variable in data frame: date 
11.
stop("non-numeric variable in data frame: ", vnames[!mode.ok]) 
10.
Math.data.frame(structure(list(Net_Margin = c(0.0947474225936983, 
0.100807355791349, 0.107839975743066, 0.116888930060399, 0.120758688137547
), date = structure(c(15705, 16070, 16435, 16800, 17166), class = "Date")), .Names = c("Net_Margin", 
"date"), class = "data.frame", row.names = c(NA, -5L)), 2) 
9.
calculate(., calculations = profit_margins, digits = 2) 
8.
function_list[[k]](value) 
7.
withVisible(function_list[[k]](value)) 
6.
freduce(value, `_function_list`) 
5.
`_fseq`(`_lhs`) 
4.
eval(quote(`_fseq`(`_lhs`)), env, env) 
3.
eval(quote(`_fseq`(`_lhs`)), env, env) 
2.
withVisible(eval(quote(`_fseq`(`_lhs`)), env, env)) 
1.
pnl %>% calculate(calculations = profit_margins, digits = 2) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant