File: packagesTest.R

package info (click to toggle)
r-cran-foreach 1.4.0-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 784 kB
  • sloc: sh: 58; makefile: 1
file content (15 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Try loading thye package splines and running a function from it.

test01 <- function() {

# First unload the package if it is already loaded.
# eachWorker(getSleigh(),
#              function() {
# 	          pkg <- "package:splines"
#                  if(pkg %in% search()) detach(pkg)})

  d <- foreach(1:10, .packages='splines', .combine='c') %dopar%
               xyVector(c(1:3),c(4:6))[[1]]
  checkTrue(all(c(1:3)==d))
}