Here is a script that will find all the atomic objects of length 1 and
put them in a dataframe that you then use to determine what variables
are there.
> a <- 1 # generate some atomic objects
> b <- 1.3
> x.char <- "character string"
> x.log <- TRUE
> x.real <- pi
> # get all atomic objects of l
Everyone is assuming I know what the output data are, or that they come
out from my model in some easily called vector. But I don't, and they do
not. The outputs are hidden, and all are separate variables that need to
be called. Also which ones come out after a given run will vary each
time. Al
Here is a function that might do what you want:
> # function to create the output
> f.output <- function(dat){
+ # create the base output vector
+ output.base <- rep(NA,10)
+ names(output.base) <- paste("var", 1:10, sep='')
+ output.base[names(dat)] <- dat
+ output.base
+ }
>
>
Do this:
pfit$coefficients[is.na(pfit$coefficients)]=0
Julian
Ptit_Bleu wrote:
> Hello,
>
> I'm trying to fit some points with a 8-degrees polynom (result of lm is
> stored in pfit).
> In most of the case, it is ok but for some others, some coefficients are
> "NA".
> I don't really understand t
On 07/11/2007 7:01 PM, Peter Dunn wrote:
> Hi all
>
> I have a plot with lines, one specified as (say) lty=1,
> using standard line types, and another as (say) my
> own spec: lty="51".
>
> I can't get legend to display both. Toy example:
>
>
>> plot(1~1)
>> legend("topright", lty=c("51",1),
Yes, that's exactly it!
Many thanks, it all comes back to me now! It's the darn do.call that I can
never remember somehow. I know I've reinvented this wheel several times --
you'd think I'd learn. Sigh.
Again, my thanks!
Regards,
Mike
On Nov 7, 2007 2:35 PM, jim holtman <[EMAIL PROTECTED]>
hi, I am reading Modern Applied Statistics with S 4th ed。
page4 have these two lines:
> library(MASS)
> data(chem) # needed in R only
but I find withou the line " data(chem)"
I can still access chem, isn't it?
is it unnecessary or something i missed here?
thanks for the replay in advance.
___
On 8/11/2007, at 4:26 PM, envisage wrote:
> hi, I am reading Modern Applied Statistics with S 4th ed。
> page4 have these two lines:
>> library(MASS)
>> data(chem) # needed in R only
> but I find withou the line " data(chem)"
> I can still access chem, isn't it?
> is it unnecessary or something i
Rolf, thanks for the reply, i see now.
On Nov 8, 2007 11:43 AM, Rolf Turner <[EMAIL PROTECTED]> wrote:
>
>
> On 8/11/2007, at 4:26 PM, envisage wrote:
>
> > hi, I am reading Modern Applied Statistics with S 4th ed。
> > page4 have these two lines:
> >> library(MASS)
> >> data(chem) # needed in R on
101 - 109 of 109 matches
Mail list logo