Skip to content

'Not a promise' error #314

Closed
Closed
@davidlockhart

Description

@davidlockhart

I have a panel dataset for which I have created lagged variables using the lag() function. When I try to calculate the delta for each timepoint, using the mutate command below, I get the error message "Error: not a promise".

> kw.lags[,c("imps", "lag1_imps", "lag2_imps")]
Source: local data frame [157,737 x 3]
Groups: 

   imps lag1_imps lag2_imps
1    65        NA        NA
2    79        65        NA
3    62        79        65
4    69        62        79
5     1        NA        NA
6     2        NA        NA
7     2         2        NA
8     1         2         2
9     2         1         2
10    5        NA        NA
..  ...       ...       ...

> kw.deltas <- mutate(kw.lags, 
+   d1_imps = imps - lag1_imps,
+   d2_imps = imps - lag2_imps
)
Error: not a promise  

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions