Skip to content
Prev 180154 / 398502 Next

Do you use R for data manipulation?

Warren Young wrote:
you might want to learn that this is a question of appropriate
libraries.  in r, read.csv and write.csv reside in the package utils. 
in python, you'd use numpy:

    from numpy import loadtxt, savetxt
    savetxt('scaled.csv', loadtxt('original.csv', delimiter=',')*10,
delimiter=',')

this makes 2 lines, together with importing the library.
but this is really *hardly* r-specific.  you can do that in many, many
languages, be assured.  just peek out.
that's a slogan, esp. when you think of how compact (but unreadable, and
thus error-prone) can code written in perl be.  often, more lines of
code make it easier to maintain, and thus avoid bugs.
+1