Questions tagged [mutate]

426 questions
-2
votes
0 answers

Change in Data.Table's Behavior?

I have code written where the following function would change or "mutate" the inputted data.table in R. The following function used to alter the object, dt, but no longer does so. I'm now using data.table version 1.14.8 and R 4.2.1. test_fn <-…
-2
votes
2 answers

issue with datasets,mutate in r

enter image description hereenter image description hereI mutate a new column and I write view(), then shows new column. However, that's after calling view(dataset) and does not show that new column or colnames(). It does not show a new variable…
Md Shine
  • 1
  • 1
-2
votes
1 answer

subtraction and division of row values in a data frame column

The details of the dataframe are ID Price Result 1 20 -0.1 2 18 0.1667 3 21 -0.2381 4 16 0.1875 5 19 -1 so i have to subtract the second row from first row then divide by the first row.…
Prad
  • 339
  • 1
  • 10
1 2 3
28
29