I have a data.frame z
with columns Tracer
, angle
and treatment
, where angle and treatment are factors.
levels(z$angle)
[1] "0" "15" "30" "45" "60" "80" "90"
I'd like to add the value of 150 to the numeric value in angle e.g. if angle is 30 then it would become 180, 45 would be 195, etc.
Why doesn't this work?:
z$bigangle<-z$angle +150
I've read this post but can't really work that out as I don't already have the column bigangle: Replace contents of factor column in R dataframe
Any help would be much appreciated, Cheers