I have a dataframe statistics
and a logic variable fromWidget
, and for the variable from fromWidget
who have 'TRUE' I want to replace statistics$app_space
with 'Widget'. fromWidget
and statistics
are part of another dataframe BPFjfiles
.
fromWidget [1] TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE FALSE
statistics$app_space [1] "www" "www" "www" "www" "www" "www" "www" "www" "www" "www"
I tried looping trough BPFjfiles
, but this didn't work.
Orderplatforms <- lapply(BPFjfiles, function(x) {
x$statistics$app_space["TRUE" %in% x$fromWidget] <- "Widget"
x
Orderplatforms <- x$statistics$app_space
})