Is it possible to assign notes to a variable in an R dataframe? This is possible in Stata and SPSS.
You can assign a comment as an attribute using the comment function.
x <- 1:5
# assign a comment
comment(x) <- 'this is a test comment'
# return a comment
comment(x)
[1] "this is a test comment"
str(x)
int [1:5] 1 2 3 4 5
- attr(*, "comment")= chr "this is a test comment"
Some additional info can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With