Hi everyone,
I am experiencing some trouble with an R script in Power BI.
I aim at converting some data of a column depending on its value.
When I run this script, to replaces all "2" by "100", all 2 gets indeed replaced but by "null", not by 100.
Here's the script :
ctr <- 0
for (day in dataset[,1]) {
ctr <- ctr+1
if (dataset[,1][ctr] == 2) {
dataset[,1][ctr] <- 100
}
}
output <- dataset
Here is a screenshot :
Someone may have a clue.
Thanks
Didier