I am hoping to read a file and process it in R. It follows this format:
tibble(row=8,name="Shawn",state="Arizona", age=45,
comments="father=Alex;NSM;GNO;One:0.9995,0.13|Two:0.9991,0.55|Three:0.9996,0.33|Four:0.9986,0.22|Five:0.9987,0.22")
# A tibble: 1 x 5 row name state age comment <dbl> <chr> <chr> <dbl> <chr> 1 8 Shawn Arizona 45 father=Alex;NSM;GNO;One:0.9995,0.13|Two:0.9991,0.55|Three:0.9996,0.33|Four:0.9986…
I would like to replace the last column with
comment
One:0.9995|Two:0.9991|Three:0.9996|Four:0.9986|Five:0.9987
and then subtract the floating number from 1:
comment
One:0.0005|Two:0.0009|Three:0.0004|Four:0.0014|Five:0.0013
See Question&Answers more detail:os