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

drop_na() function request #193

Closed
yiugn opened this issue Feb 20, 2021 · 0 comments
Closed

drop_na() function request #193

yiugn opened this issue Feb 20, 2021 · 0 comments

Comments

@yiugn
Copy link

yiugn commented Feb 20, 2021

dtplyr doesn't seem to provide drop_na() function, could this function be provided in dtplyr in the future?

dayt = day %>% 
   group_by(stockCode) %>% 
   arrange(logDate) %>% 
   mutate(rise = (priceClose/lag(priceClose,1)-1)*100,
          candle = ifelse(priceClose > priceOpen, 1, 0),
          middle = ifelse(priceClose > (priceHigh + priceLow)/2, 1, 0),
          ma3 = rollmean(priceClose, k = 3, fill = NA, align = 'right'),
          ma5 = rollmean(priceClose, k = 5, fill = NA, align = 'right'),
          ma10 = rollmean(priceClose, k = 10, fill = NA, align = 'right'), 
          ovnprofit = lead(priceOpen,1)/priceClose,
          disparity = priceClose/ma5*100) %>% 
   select(-remark) %>% 
   drop_na()

Error in UseMethod("drop_na_") :
클래스 "c('dtplyr_step_group', 'dtplyr_step')"의 객체에 적용된 'drop_na_'에 사용할수 있는 메소드가 없습니다

markfairbanks added a commit to markfairbanks/dtplyr that referenced this issue Feb 20, 2021
@hadley hadley closed this as completed in 60eb063 Feb 21, 2021
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