Hello,
I am currently using this code to input data from numerous files into R:
library(foreign)
setwd("/Users/ericbrotto/Desktop/A_Intel/")
filelist <-list.files()
#assuming tab separated values with a header
datalist = lapply(filelist, function(x)read.table(x, header=T, sep=";", comment.char=""))
#assuming the same header/columns for all files
datafr = do.call("rbind", datalist)
The headers look like this:
TIME ;POWER SOURCE ;qty MONITORS ;NUM PROCESSORS ;freq of CPU Mhz ;SCREEN SIZE ;CPU LOAD ;BATTERY LEVEL ; KEYBOARD MVT ; MOUSE MVT ;BATTERY MWH ;HARD DISK SPACE ;NUMBER PROCESSES ;RAM ;RUNNING APPS ;FOCUS APP ;BYTES IN ;BYTES OUT ;ACTIVE NETWORKS ; IP ADDRESS ; NAMES OF FILES ;
and an example of the data looks like this:
2010-09-11-19:28:34.680 ; BA ; 1 ; 2 ; 2000 ; 1440 : 900 ; 0.224121 ; 92 ; NO ; NO ; NULL ; 92.581558 ; 57 ; 196.1484375 ; +NULL ; loginwindow-#35 ; 5259 ; 4506 ; en1 : ; 192.168.1.3 ; NULL ;
Rather then input all of the columns into a data frame I would like to just grab one, say, FOCUS APP. Any advice on how to do this?
Thanks,