Mimics dplyr::mutate using base R and rlang
b_mutate(.data, ...) # S3 method for default b_mutate(.data, ...) # S3 method for split_df b_mutate(.data, ...)
.data | data.frame |
---|---|
... | Name-value pairs of expressions |
data.frame
airquality%>% b_mutate( lOzone = log(Ozone), Month = factor(month.abb[Month]), cTemp = round((Temp - 32) * 5/9, 1), S.cT = Solar.R / cTemp )%>% head()#> Ozone Solar.R Wind Temp Month Day S.cT cTemp lOzone #> 1 41 190 7.4 67 May 1 9.793814 19.4 3.713572 #> 2 36 118 8.0 72 May 2 5.315315 22.2 3.583519 #> 3 12 149 12.6 74 May 3 6.394850 23.3 2.484907 #> 4 18 313 11.5 62 May 4 18.742515 16.7 2.890372 #> 5 NA NA 14.3 56 May 5 NA 13.3 NA #> 6 28 NA 14.9 66 May 6 NA 18.9 3.332205