| AG_insert | R Documentation | 
Calculate a new variable and insert it in a data frame
AG_insert(AG, var_name, after_var, value)
| AG | The original data frame | 
| var_name | character. The new variable name | 
| after_var | character. The existing variable name, after which to insert the new variable | 
| value | The value to assign the new variable | 
A data frame with the new variable added at the specified index
data("imu_to_collapse")
test <- imu_to_collapse[ ,1:3]
head(AG_insert(
  test, "new_variable",
  "Timestamp", "A new variable"
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.