Hi all,

Currently i am trying to this on R which is running on multicore processor.
I am not sure how to use mclapply() function on this task. Can anyone help
me.


# Setting up directory
setwd("/XXX/XXXXXXXX/XXXX/XXXX/2011/07/20")
library(sqldf)

# Data is available in the form of multiple structured log files (nearly 10K
log files)

# I am using the following syntax to get required fields and aggregations
from the logs and creating a file called DF (with 3 columns V2, V14 and
Min(V16))

a <- list.files(path = ".", pattern = "2011-07-20", all.files = FALSE,
full.names = FALSE, recursive = FALSE, ignore.case = FALSE)

DF <- NULL
for (f in a)
{
        dat <- read.csv(f, header=FALSE, sep="\t", na.strings="",dec=".",
strip.white=TRUE, fill=TRUE)
        data_1 <- sqldf("SELECT V2, V14, MIN(V16) FROM dat WHERE V6=104 GROUP BY
V2, V14")
        DF <- rbind(DF, data_1)
}

# Currently this process is taking almost 3 Hrs for me.

Can anyone help me to use mclapply() on this operation and get this process
completed asap.

Request you to provide me the syntax.

Thanks in advance

Regards,
Madana

--
View this message in context: 
http://r.789695.n4.nabble.com/R-on-Multicore-for-Linux-tp3682318p3684736.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to