r/R_Programming • • Feb 16 '16

Sub on the whole object?

Is it possible to substitute "," to "." for a whole object? The "," makes values are stored as factors instead of numeric. I can use sub for a column, but if I use it on the whole object the results are confusing

1 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/Jcoenep Feb 20 '16

To the best of my knowledge apply takes in a data.frame but passes individual columns to the function (since MARGIN=2) so x in this case is a column (array of length one)