Dear R user:
I bulid a package, and in the package I use the function "nls"
to solve some questions. If I have two sets of data, and I want to
summary these two data's nls output, I write the command in the
package source code like:
{
..........
summary(fm1)
summary(fm2)
}
then i compiler the package and use "Install package(s) from
local zip files" to install my package.
But when I run the package, it just show the summary(fm2), the
part of summary(fm1) miss, why is it so?
Any suggestions would be most helpful! Thanks!!
On Sun, 25 Sep 2005, Chun-Ying Lee wrote:> Dear R user: > I bulid a package, and in the package I use the function "nls" > to solve some questions. If I have two sets of data, and I want to > summary these two data's nls output, I write the command in the > package source code like: > { > .......... > summary(fm1) > summary(fm2) > } > then i compiler the package and use "Install package(s) from > local zip files" to install my package. > But when I run the package, it just show the summary(fm2), the > part of summary(fm1) miss, why is it so?You forgot to print it. See the FAQ 7.16 and 7.22.> Any suggestions would be most helpful! Thanks!!Did you read the posting guide? That does ask you to read the FAQ before posting. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595
This is because R only permits one object to be output. If you weould
like two objects, you might try something like
{
..........
list(fm1 = summary(fm1), fm2 = summary(fm2))
}
Good luck,
Andrew
On Sun, Sep 25, 2005 at 06:49:26PM +0800, Chun-Ying Lee
wrote:> Dear R user:
> I bulid a package, and in the package I use the function
"nls"
> to solve some questions. If I have two sets of data, and I want to
> summary these two data's nls output, I write the command in the
> package source code like:
> {
> ..........
> summary(fm1)
> summary(fm2)
> }
> then i compiler the package and use "Install package(s) from
> local zip files" to install my package.
> But when I run the package, it just show the summary(fm2), the
> part of summary(fm1) miss, why is it so?
> Any suggestions would be most helpful! Thanks!!
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
--
Andrew Robinson
Senior Lecturer in Statistics Tel: +61-3-8344-9763
Department of Mathematics and Statistics Fax: +61-3-8344-4599
University of Melbourne, VIC 3010 Australia
Email: a.robinson at ms.unimelb.edu.au Website: http://www.ms.unimelb.edu.au
Maybe Matching Threads
- lmer- why do AIC, BIC, loglik change?
- Interpretation of hypothesis tests for mixed models
- How to catch value
- MuMIn package, problem using model selection table from manually created list of models
- anova.gls from nlme on multiple arguments within a function fails