Convert row names into first column

I have a data frame like this: df VALUE ABS_CALL DETECTION P-VALUE 1007_s_at “957.729231881542” “P” “0.00486279317241156” 1053_at “320.632701283368” “P” “0.0313356324173416” 117_at “429.842323161046” “P” “0.0170004527476119” 121_at “2395.7364289242” “P” “0.0114473584876183” 1255_g_at “116.493632746934” “A” “0.39799368200131” 1294_at “739.927122116896” “A” “0.0668649772942343” I want to convert the row names into the first column. Currently I use something like this to make … Read more

How to use R’s ellipsis feature when writing your own function?

The R language has a nifty feature for defining functions that can take a variable number of arguments. For example, the function data.frame takes any number of arguments, and each argument becomes the data for a column in the resulting data table. Example usage: > data.frame(letters=c(“a”, “b”, “c”), numbers=c(1,2,3), notes=c(“do”, “re”, “mi”)) letters numbers notes … Read more