lumberjack icon indicating copy to clipboard operation
lumberjack copied to clipboard

Not understanding basic workings of cell wise logger

Open SugarRayLua opened this issue 1 year ago • 0 comments

Hi-- appreciate all of your efforts in creating lumberjack!

I'm looking for a package that helps me programmatically track spot changes I may make in a data frame (e.g. if I find out that there was a typo in a dataset that I made into a data frame, etc.). It seemed like lumberjack's "cell wise" logger would work, but I can't figure out how after trying many permutations. Here is a simple test case where I'd like lumberjack to log the change in a cell I've made but doesn't seem to work (after I've installed lumberjack)

test = mtcars
test$index = 1:nrow(test)
library(lumberjack)
out = test %L>%
     start_log(log=cellwise$new(key="index")) %L>%
     test[1,1] = 50 %L>%
     dump_log(file="result.csv",stop=TRUE)

I get: Error in test %L>% start_log(log= cellwise$new(key= "index")) %L>% test[1, :could not find function "%L>%<-"

Am I using the syntax incorrectly or misunderstanding what the cellwise logger does?

If I am misunderstanding the cellwise logger function, are there other loggers that you think would help me instead?

Thanks! :-)

SugarRayLua avatar Jul 08 '24 06:07 SugarRayLua