Dear all,
here are the test data and a test sweave example. I hope it works

	Species.1	Species.2	Species.3	Species.4	Species.5	Species.6	Species.7	 
Species.8	Species.9	Species.10
Sample.1	0	0	0	0	0	0	1	0	2	0
Sample.2	0	0	0	0	6	0	0	0	0	0
Sample.3	1	0	0	1	0	4	0	0	3	0
Sample.4	0	0	0	0	0	0	0	0	0	0
Sample.5	0	0	4	0	1	0	1	0	0	1
Sample.6	2	0	0	0	1	0	0	0	1	0
Sample.7	0	0	0	0	0	1	0	0	0	0
Sample.8	0	2	0	0	4	0	3	0	0	0
Sample.9	4	0	0	5	0	0	0	1	0	0


\documentclass[10 pt, a4paper]{article}
\usepackage{Sweave}
\begin{document}
<<>>=
require(vegan)
test<-read.table("test.txt", head=T)
attach(test)
dim(test)
sum(test)
@
\begin{figure}
<<fig=true>>=
pool.test<-poolaccum(test)
plot(pool.test)
@
\end{figure}
\end{document}

The file sweave_test-002.pdf is generated but cannot be opened  
(Warning message in Adobe Reader: "There was an error opening this  
document. This file ccannot be opened because it has no pages."

My computational environment: Mac 10.5.8, R 2.12.1 GUI 1.35 Leopard  
build 64-bit, TexShop 2.37

Best, Martin


On 21 Jan 2011, at 14:36, romunov wrote:

> Could you provide us with a reproducible example (R+Sweave)? This  
> sounds interesting.
>
>
>
> On Fri, Jan 21, 2011 at 2:32 PM, Martin Unterseher <martin.unterseher@uni-greifswald.de 
> > wrote:
> Dear Jari,
>
> thank you for your help. The plots are fine and really valuable.
> However, when I tried to generate a Sweave-based file, all plot()  
> commands following poolaccum() (e.g.
>
> \begin{figure}
> <<fig=true>>
> pool.data<-poolaccum(data)
> plot(pool.data)
> @
> \end{figure}
>
> resulted in empty or corrupted pdf files. I solved this problem by  
> manually saving the poolaccum- plots as pdf and including them in  
> the resulting .tex file. Some time-consuming handwork, but ok. So  
> there is no urgent need for response.
>
> Best wishes
> Martin
> On 19 Jan 2011, at 08:58, Jari Oksanen wrote:
>
> Martin,
>
> I have supposed that functions poolaccum() and estaccumR() do this. If
> they are not suitable for your needs, please tell me what you want to
> achieve.
>
> These two functions have been in vegan since release 1.15-4 (7
> September, 2009).
>
> Cheers, Jari Oksanen
>
>
> On Tue, 2011-01-18 at 09:22 +0100, Martin Unterseher wrote:
> Dear all,
>
> as far as I know, functions specpool and estimateR (both in package
> vegan) provide only the final values of the non-parametric estimators.
> In contrast to that, EstimateS calculates a real curve of each
> estimator function. To me this is of importance to evaluate the
> stability and reliability of the final value calculated by the
> respective estimator.
>
> Carsten Dormann found a way to achieve this in R and provided this
> function for me:
>
> reps=100
> sequence.abies.myk<-1:nrow(abies.myk.com) #abies.myk.com is my
> species-samples matrix from mycorrhizal fungi of Abies alba
> res.abies.myk<-matrix(ncol=9, nrow=length(sequence.abies.myk))
> colnames(res.abies.myk)<-names(est.abies.myk) #est.abies.myk is the
> result from specpool(abies.myk.com)
> for (i in sequence.abies.myk)
> {
>   sample.raw.abies.myk <- replicate(reps,
> specpool(abies.myk.com[sample(x=1:nrow(abies.myk.com), size=i),]),
> simplify=TRUE)
>   subsample.abies.myk <- matrix(unlist(sample.raw.abies.myk),
> nrow=9, ncol=reps)
>   rownames(subsample.abies.myk) <- names(sample.raw.abies.myk)
>   res.abies.myk[i, ] <- rowMeans(subsample.abies.myk)
> }
>
> It works fine. For small data sets and many replications, curves
> shapes are in concordance with the EstimateS output. For larger data
> however, calculations with high values of "reps" would take hours to
> days. If you use small values for "reps" instead the curves will
> appear jagged and are often not publishable.
>
> Does any one know of alternatives to display estimator curves in R?
>
> Thanks
> Martin
> __________
>
> Dr. Martin Unterseher
> Universität Greifswald
> Institut für Botanik und Landschaftsökologie
> Lehrstuhl für Allgemeine und Spezielle Botanik
> Grimmer Str. 88
> 17487 Greifswald
>
> Tel. 03834 / 864184
> Fax. 03834 / 864114
>
> http://www.botanik.uni-greifswald.de/100.html
> http://dgfm-ev.de/index.php?id=munterseher
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
> __________
>
> Dr. Martin Unterseher
> Universität Greifswald
> Institut für Botanik und Landschaftsökologie
> Lehrstuhl für Allgemeine und Spezielle Botanik
> Grimmer Str. 88
> 17487 Greifswald
>
> Tel. 03834 / 864184
> Fax. 03834 / 864114
>
> http://www.botanik.uni-greifswald.de/100.html
> http://dgfm-ev.de/index.php?id=munterseher
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
>
> -- 
> In God we trust, all others bring data.

__________

Dr. Martin Unterseher
Universität Greifswald
Institut für Botanik und Landschaftsökologie
Lehrstuhl für Allgemeine und Spezielle Botanik
Grimmer Str. 88
17487 Greifswald

Tel. 03834 / 864184
Fax. 03834 / 864114

http://www.botanik.uni-greifswald.de/100.html
http://dgfm-ev.de/index.php?id=munterseher






	[[alternative HTML version deleted]]

