Madana,
The code below may work (untested though):
#above is the same as you wrote
require(multicore)
read.data.exmple <- function(f)
{
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")
data_1
}
DF <- mclapply(a, read.data.example)
#you can check the components of DF by DF[[1]], DF[[2]] ..., which is a bit
different from rbind
#feel free to add more arguments to function read.data.example and add those
to mclapply accordingly
Hope this helps.
Regards,
Lei
On Fri, Jul 22, 2011 at 11:35 AM, Madana_Babu <[email protected]>wrote:
> Hi,
>
> Can you please explain me that how can i perform this on a multicore
> processor? since i have a machine with 16-cores. I can do this much faster
> if i use all cores.
>
> Thanks in advance...
>
> Regards,
> Madana
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/R-on-Multicore-for-Linux-tp3682318p3687483.html
> Sent from the R help mailing list archive at Nabble.com.
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] 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.
>
--
Lei Jiang
Center for Computation and Technology/
Department of Computer Science
Louisiana State University
E-mail: [email protected]
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.