October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to compare the performance of a standard R program and an R MapReduce program:
> a.time = proc.time()
> small.ints2=1:100000
> result.normal = sapply(small.ints2, function(x) x^2)
> proc.time() - a.time
> b.time = proc.time()
> small.ints= to.dfs(1:100000)
> result = mapreduce(input = small.ints, map = function(k,v) cbind(v,v^2))
> proc.time() - b.time
Read now
Unlock full access