Running examples in ‘pcrcoal-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: PCRcoal-class
> ### Title: The PCRcoal class
> ### Aliases: PCRcoal PCRcoal-class PCRcoal,missing-method
> ### Keywords: classes, coalescent, PCR, simulation
> 
> ### ** Examples
> 
> 	# Construct a PCRcoal object 
>         # and specify the experimental conditions:
>         sim <-PCRcoal(
+         initial.size    =5,
+         sample.size     =10,
+         nr.cycles       =20,
+         efficiencies    =c(rep(0.1, 30))
+         )
> 
> 	##
> 	## Method: sample.tree
> 	##
> 
> 	 # Sample a coalescent tree:
>         tree <- sample.tree(sim)
> 
>         # Print tree info:
>         print(tree)

Phylogenetic tree with 10 tips and 9 internal nodes.

Tip labels:
	m1, m2, m3, m4, m5, m6, ...

Rooted; includes branch lengths.
> 
>         # Plot the tree:
>         plot(tree)
> 	
> 	##
> 	## Method: sample.tnt
> 	##
> 
> 	# Sample a coalescent tree with subsample sizes and
> 	# size trajectories:
>         res <- sample.tnt(sim)
> 
>         # Print subsample sizes:
>         print(res$subsamples)
[1] 1 7 0 2 0
> 
>         # Print size trajectories:
>         print(res$trajectories)
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,]    1    1    2    2    2    2    2    3    3     3     3     4     4     5
[2,]    1    1    1    1    2    2    2    3    4     4     4     6     8     8
[3,]    1    1    1    1    1    1    1    1    1     1     1     1     1     1
[4,]    1    1    1    2    2    3    3    3    3     3     3     3     3     4
[5,]    1    1    1    1    1    1    1    1    1     1     1     1     1     1
     [,15] [,16] [,17] [,18] [,19] [,20] [,21]
[1,]     5     5     5     5     5     5     5
[2,]     8     8     8     9    11    12    12
[3,]     1     1     2     2     2     2     2
[4,]     4     4     4     5     6     6     6
[5,]     1     1     1     1     1     1     1
> 
>         # Print tree info:
>         print(res$phylo)

Phylogenetic tree with 10 tips and 9 internal nodes.

Tip labels:
	m1, m2, m3, m4, m5, m6, ...

Rooted; includes branch lengths.
> 	
> 	##
> 	## Method: sample.trs
> 	##
> 
> 	# Sample subsample sizes and size trajectories:
>         res <- sample.trs(sim)
> 
>         # Print subsample sizes:
>         print(res$subsamples)
[1] 0 4 1 5 0
> 
>         # Print size trajectories:
>         print(res$trajectories)
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,]    1    1    1    1    1    1    2    2    3     3     4     4     4     4
[2,]    1    1    1    1    2    2    2    2    2     3     3     3     3     3
[3,]    1    2    2    2    3    3    3    3    3     3     3     3     3     3
[4,]    1    2    4    4    5    6    7    7    8     8     9    11    12    13
[5,]    1    1    2    2    2    2    2    2    2     2     2     3     3     3
     [,15] [,16] [,17] [,18] [,19] [,20] [,21]
[1,]     5     5     5     6     6     7     8
[2,]     3     5     5     5     6     7     7
[3,]     4     5     7     8     8     9     9
[4,]    15    15    16    17    17    21    24
[5,]     3     3     3     3     3     4     4
> 
> 	##
> 	## Simulating mutations using PhyloSim
> 	##
> 
> 	# Sample tree:
> 	tree <- sample.tree(sim)
> 
> 	# Load the phylosim package
> 	library(phylosim)
> 	# Construct a PhyloSim object, set up the root
> 	# sequence and the substitution process:	
> 	psim <- PhyloSim(
+ 		phylo = tree,
+ 		root.seq=sampleStates( NucleotideSequence(length=10,processes=list(list(JC69())) ) )
+ 	)
> 	# Scale the tree:	
> 	scaleTree(psim,0.1)
> 
> 	# Simulate mutations:
> 	Simulate(psim)
Simulating edge 1 of 18 
Simulating edge 2 of 18 
Simulating edge 3 of 18 
Simulating edge 4 of 18 
Simulating edge 5 of 18 
Simulating edge 6 of 18 
Simulating edge 7 of 18 
Simulating edge 8 of 18 
Simulating edge 9 of 18 
Simulating edge 10 of 18 
Simulating edge 11 of 18 
Simulating edge 12 of 18 
Simulating edge 13 of 18 
Simulating edge 14 of 18 
Simulating edge 15 of 18 
Simulating edge 16 of 18 
Simulating edge 17 of 18 
Simulating edge 18 of 18 
> 
> 	# Plot the resulting alignment:
> 	plot(psim,plot.ancestors=FALSE)
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: plot ... push.vp.vpTree -> push.vp -> push.vp.viewport -> grid.Call.graphics
Execution halted