[R] simple example for linear mixed effects model

2009-03-28 Thread Edna Bell
Dear R Gurus:

Could someone point me to a small example of a linear mixed effects
model, please?

Ideally, this example would only have a few data points so I could
calculate by hand to compare results to R results, please.

Thanks so much!

Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] classes and methods

2009-03-19 Thread Edna Bell
I have put together a test class and methods

> setClass("foo",representation(x="numeric"))
[1] "foo"
> setMethod("plot","foo",function(x,y,...)boxplot(x,...))
[1] "plot"
> x <- rnorm(100)
> class(x) <- "foo"
> plot(x)

> y <- new("foo",x=rnorm(50))
> class(y)
[1] "foo"


My question is:  should I have a "foo" function which sets the class
to "foo", please?  or a sort of Validity checker, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] function question

2009-03-19 Thread Edna Bell
Dear R Gurus:

I read somewhere that functions are considered vectors.

Is this true, please?

thanks
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] yet another package building question please

2009-03-18 Thread Edna Bell
Hello again.

I'm trying to use package.skeleton to build my package.  However, my
package will contain a Fortran subroutine.

Can you use package.skeleton with that subroutine, please or do you
need to add it manually?

Thanks again,
Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] several package building questions: found answer to the manuals

2009-03-18 Thread Edna Bell
Hi again.

I found out how to download the manuals from the website.

Sorry

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] several package building questions

2009-03-18 Thread Edna Bell
Dear R Gurus:

I have several package building questions, please:

a.  Where do you find the list of keywords needed for the help files, please?
b.  I'm using a SuSe Linux system at the moment.  How do I download
the help manuals, please?
c.  What is the command (not in R) to compile Fortran code to be used
with R, and eventually be used in a package, please?  It used to be
something like g77 -O2 -c test.f?

Thanks for any help.

Sincerely,
Edna Bell
.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] builtin vs. closure

2009-03-14 Thread Edna Bell
Dear R Gurus:

I'm working slowly through "R Programming for Bioinformatics", which
is really interesting!

Anyway, my question now is:  what determines if a function is a
builtin vs. a closure, please?

For instance:
> typeof(sqrt)
[1] "builtin"
> typeof(mean)
[1] "closure"
>

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] primitives again

2009-03-14 Thread Edna Bell
Dear R Gurus:

How do I find the functions which are primitives, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] difference between Primitive and Generic

2009-03-08 Thread Edna Bell
Dear R Gurus:

What is the difference between a Primitive and a Generic, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] density estimate

2009-02-20 Thread Edna Bell
Hi R Gurus:

I have a tiny data set:
> xs
 [1] 0.7 2.8 0.1 1.9 0.0 1.4 0.2 2.3 0.3 0.2
>

and generate the density function for it.

I would like to replicate this.  Is there a straightforward way to do
this, please?

According to the help file, the FFT is used.

How does this compare to Silverman's version from his page 15 Equation
2.2a, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] adding S3 vs. S4 to a new package

2009-02-12 Thread Edna Bell
Dear R Gurus:

I'm building a package and am wondering whether to use S3 or S4 methods.

Any advice, please?
Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] grep question

2009-01-20 Thread Edna Bell
In grep, you can use the options "n" and "o" to get the line number
and only the matching text.

Is there a way to just get the line number, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 2^2 problem revisited

2008-11-13 Thread Edna Bell
Dear R gurus:

Here is the following from Montgomery's Design and Analysis of
Experiments, 5th edition.

> str(rout1.df)
'data.frame':   16 obs. of  3 variables:
 $ resp: num  18.2 18.9 12.9 14.4 27.2 24 22.4 22.5 15.9 14.5 ...
 $ A   : Factor w/ 2 levels "-1","1": 1 1 1 1 2 2 2 2 1 1 ...
 $ B   : Factor w/ 2 levels "-1","1": 1 1 1 1 1 1 1 1 2 2 ...
> rout1.df
   resp  A  B
1  18.2 -1 -1
2  18.9 -1 -1
3  12.9 -1 -1
4  14.4 -1 -1
5  27.2  1 -1
6  24.0  1 -1
7  22.4  1 -1
8  22.5  1 -1
9  15.9 -1  1
10 14.5 -1  1
11 15.1 -1  1
12 14.2 -1  1
13 41.0  1  1
14 43.9  1  1
15 36.3  1  1
16 39.9  1  1
> rout1.aov <- aov(resp~A*B,data=rout1.df)
> summary(rout1.aov)
Df  Sum Sq Mean Sq F valuePr(>F)
A1 1107.23 1107.23 185.252 1.175e-08 ***
B1  227.26  227.26  38.023 4.826e-05 ***
A:B  1  303.63  303.63  50.801 1.201e-05 ***
Residuals   12   71.725.98
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>

When you test on interaction, you reject (of course).

Now, I thought that you could not test on the main effects, A and B.
Is that true, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 2^2 factorial design question

2008-11-06 Thread Edna Bell
Dear R Gurus:

How do you put together a 2^2 (or even 2^k) factorial problem, please?

Since you have 2 levels for A and B, do you put in "A+" and "A-" as
factors, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [OT] factorial design

2008-11-03 Thread Edna Bell
Dear R Gurus:

I vaguely remember reading that if interaction was present in a
factorial design, then the main effect results were suspect.

However, I was reading a text which now uses the tests for main
effects even if interaction is present.

Which is correct, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] goodness of fit test

2008-09-30 Thread Edna Bell
Dear R Gurus;

Is there an automated process for goodness of fit tests, please?

I know there is prop.test for one at a time, but I was wondering about
this, please.

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] setting history file

2008-09-10 Thread Edna Bell
I am using R-2.7.2 on Windows XP.

Sorry for the problems.

Sincerely,
Edna


On Wed, Sep 10, 2008 at 11:54 AM, Prof Brian Ripley
<[EMAIL PROTECTED]> wrote:
> On Wed, 10 Sep 2008, Edna Bell wrote:
>
>> Dear R Gurus:
>>
>> I would like to set the number of commands in the history file as 50
>> rather than 25.
>
> It is neither of those.  That is the default value of max.show, not of the
> size of the file.
>
>> I would do this in the .First function.
>>
>> How do I set this, please?  I tried
>> history(max=50)
>> and it prints what it has.
>
> Yes, but that is the number shown, not the number saved.
>
> You failed to follow the posting guide and tell us *anything* about your OS
> etc.  But probably ?history tells you how to set the size of the history
> file via environment variable R_HISTSIZE.
>
>> I just want to set the size in .First.
>>
>> Thanks in advance,
>> Sincerely,
>> Edna
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> PLEASE do.
>
>
> --
> Brian D. Ripley,  [EMAIL PROTECTED]
> 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 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] setting history file

2008-09-10 Thread Edna Bell
Dear R Gurus:

I would like to set the number of commands in the history file as 50
rather than 25.
I would do this in the .First function.

How do I set this, please?  I tried
history(max=50)
and it prints what it has.

I just want to set the size in .First.

Thanks in advance,
Sincerely,
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] probably easy methods question

2008-09-09 Thread Edna Bell
Dear R Gurus:
I want to look at the code for the t.test function.  I did the following:

> t.test
function (x, ...)
UseMethod("t.test")

> getAnywhere("t.test")
A single object matching 't.test' was found
It was found in the following places
  package:stats
  registered S3 method for t from namespace stats
  namespace:stats
with value

function (x, ...)
UseMethod("t.test")

> methods("t.test")
[1] t.test.default* t.test.formula*

   Non-visible functions are asterisked
>

Ok. Now what, please?  I'm sure it's really simple.

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] test for a single variance

2008-09-09 Thread Edna Bell
Dear R Gurus:

Is there a test for a single variance available in R, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] creating a vignette

2008-09-07 Thread Edna Bell
Dear R Gurus:

How would I create a vignette, please?

Why would a vignette be better than examples, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Latin squares in R

2008-08-26 Thread Edna Bell
Dear R Gurus:

What would be the best way to evaluate a Latin square problem, please?

Does it work in Rcmdr, please?

thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] try question

2008-07-29 Thread Edna Bell
Hi still yet again!

I have the following code:

> try(log(rnorm(25)),silent=TRUE)
 [1] -0.26396185 NaN NaN -0.13078069 -2.44997193
-2.15603971 NaN  0.94917495  0.07244544 NaN
[11] -1.06341127 -0.42293099 -0.53769569  0.95134763  0.93403340
  NaN -0.10502078 NaN  0.30283262 NaN
[21] -0.11696872 -3.84122332 NaN NaN -0.12808690
Warning message:
In log(rnorm(25)) : NaNs produced
>

I thought that putting the "silent = TRUE" would suppress the
warnings, please.  What should I do instead, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ls() and memory question

2008-07-29 Thread Edna Bell
Hi again!

I put in ls() to check the objects in my workspace.

Is there a limit on how many objects I can have, please?  Or does it
depend on the memory, please?

TIA,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] more environment questions

2008-07-29 Thread Edna Bell
Is there a way to set the environment within a function,,  please?


On Tue, Jul 29, 2008 at 11:25 AM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> e1 <- ...
> creates a new environment e1
>
> environment(e1)
> does nothing
>
> print(environment(e1))
> print environment e1
>
> By the way, if you are doing a lot of manipulations of environments
> you might want to look at the proto package which reframes the
> whole thing in terms of object oriented programming.
>
> On Tue, Jul 29, 2008 at 12:12 PM, Edna Bell <[EMAIL PROTECTED]> wrote:
>> Hi R Gurus:
>>
>> Here is some code that I was experimenting with, please:
>>
>>> f1 <- function(x) {
>> + e1 <- new.env(parent=.GlobalEnv)
>> + environment(e1)
>> + print(environment())
>> + return(mean(x))
>> + }
>>> f1(1:15)
>> 
>> [1] 8
>>>
>>
>> My question:  why isn't the environment within the function set to e1, 
>> please?
>>
>> Thanks,
>> Edna Bell
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] table questions

2008-07-29 Thread Edna Bell
Hi again!


Suppose I have the following:

> xy <- round(rexp(20),1)
> xy
 [1] 0.1 3.4 1.6 0.4 1.0 1.4 0.2 0.3 1.6 0.2 0.0 0.1 0.1 1.0 2.0 0.9
2.5 0.1 1.5 0.4
> table(xy)
xy
  0 0.1 0.2 0.3 0.4 0.9   1 1.4 1.5 1.6   2 2.5 3.4
  1   4   2   1   2   1   2   1   1   2   1   1   1
>
Is there a way to set things up to have
0 - 0.4   0.5 - 0.9  etc. please?

I know there is the cut functions, but breaks are required.  If you
don't have breaks, what should you do, please?

Would using the breaks from the hist function work appropriately, please?

thanks
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] more environment questions

2008-07-29 Thread Edna Bell
Hi R Gurus:

Here is some code that I was experimenting with, please:

> f1 <- function(x) {
+ e1 <- new.env(parent=.GlobalEnv)
+ environment(e1)
+ print(environment())
+ return(mean(x))
+ }
> f1(1:15)

[1] 8
>

My question:  why isn't the environment within the function set to e1, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] keywords

2008-07-29 Thread Edna Bell
Hi R Gurus!

When you build a package, you need to put in keywords in the Rd files.

Where would you find the list of keywords, please?

TIA,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] environment question

2008-07-28 Thread Edna Bell
Hi R users!

I was looking at some of the example code for the "environment"
function.  Here it is:

e1 <- new.env(parent = baseenv())  # this one has enclosure package:base.
e2 <- new.env(parent = e1)
assign("a", 3, envir=e1)
ls(e1)
ls(e2)
exists("a", envir=e2)   # this succeeds by inheritance
exists("a", envir=e2, inherits = FALSE)
exists("+", envir=e2)   # this succeeds by inheritance

My question is: how can "a" exist in e2 when the ls(e2) gives
character(0), please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] read.table question

2008-07-27 Thread Edna Bell
Dear R list:

I have a data set that I would like to bring it.  The fourth column
shows as numeric, but I want it to be a factor.  Is there a way to do
this from the read.table statement, or should I just wait and use the
factor function please?

thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] still more dumb questions

2008-07-24 Thread Edna Bell
Hello.

When I type in "median", I get the following:

> median
function (x, na.rm = FALSE)
UseMethod("median")

>

How do I look at the code, please?

Thanks again,
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Cairo graphics

2008-07-24 Thread Edna Bell
Hi again.

Sorry to be a pest.

What are Cairo graphics and how to find out about them, please?

Thanks yet again,
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ggplot2 help

2008-07-24 Thread Edna Bell
Hi yet again!

Thank you for being patient with me.

Is there a "how to" for ggplot2, please?  I would like to look at it,
but have no idea where to start, please.

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] factor question

2008-07-24 Thread Edna Bell
Hi!

Suppose I have a factor:

> fac1 <- factor(rep(c("dog","cat","tree"),c(2,3,4)))
> fac1
[1] dog  dog  cat  cat  cat  tree tree tree tree
Levels: cat dog tree
> length(fac1)
[1] 9

Now I want to get rid of the dogs:
> fac1 <- fac1[3:9]
> fac1
[1] cat  cat  cat  tree tree tree tree
Levels: cat dog tree
>
How should I remove the dog from the level, please?

Thanks in advance,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] an extremely simple question

2008-07-22 Thread Edna Bell
Hi!

What is the difference between using data(somedataset) vs.
attach(somedataset), please?

thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] printing in binary

2008-06-17 Thread Edna Bell
Hi r Gurus:

Is there a way to print numbers in binary format, please?

I know that you can use sprintf for hex, but I'm not sure how to get binary.

Thanks
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] fortran question

2008-05-30 Thread Edna Bell
Hi R Gurus:

I have used the following in the past:

g77 -O2 -c test.f

g77 -shared -o test.dll test.f

with success.

Now I'm getting

ld:  dllcrt2.o  no such file
I have the latest version of Rtools28.exe

Any suggestions would be much appreciated.

Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [OT] Linux/UNIX question

2008-02-20 Thread Edna Bell
Dear R Gurus:

I'm trying to find R on another Linux system.

I'm using the find command, (surprise), but I only want to see the
output where it exists, not all of the other stuff.

Is there an option that I could select, please?

Right now I have

find / -name R


TIA,
Sincerely,
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] finding source for a function

2008-02-14 Thread Edna Bell
Dear R Gurus:

How do you get source for functions which say "UseMethod" when you
type in their names, please?

I've tried getAnywhere and getMethods...I thought that might produce them.

Thanks in advance.

Sincerely,
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] gcc and R CMD SHLIB question

2008-01-15 Thread Edna Bell
Dear R Gurus:

Is there an option for gcc and R CMD SHLIB such that it neither
compiles nor links but shows you which libraries etc would be used,
please?

I saw something like it but forgot to write it down.

Thanks in advance!

Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R extensions

2008-01-12 Thread Edna Bell
Dear R Gurus:

I'm reading through the "Writing R Extensions" manual.

I am seeing references to "load hooks" and SEXPR but have no ideas
what these are.

Could someone give me some direction as to finding out about these, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] USA map with all states

2008-01-01 Thread Edna Bell
Hi R Gurus!

There was a function in S called "usa()" which would plot the US.

I found map('usa') in R for the lower 48 states.  Is there a way to
include Alaska and Hawaii as well, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [OT] putting URLs in Latex

2007-11-27 Thread Edna Bell
Hi R Gurus!

This is definitely off topic, but I thought I'd try:  what is the way
to put in url's into a Latex file, please?

I know that you start with a \newcommand statement, with some kind of
argument that will change, but I'm not sure how to set it up, please.

thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] generating .Rd files

2007-11-26 Thread Edna Bell
Thanks to all.

I did not install.

(no wonder I couldn't find them...)



On 11/26/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> On 26/11/2007 6:59 PM, Edna Bell wrote:
> > Hi R Gurus!
> >
> > I have a package that I am putting together.
> >
> > I waited until the end to do the documentation and would like to
> > generate a set of "empty" .Rd files.
> >
> > Is there a quick way to do this, please?
> >
> > Thanks,
> > Edna Bell
> > PS I can't seem to access the "Writing R Extensions" manual from 2.6.1
> > on Windows.
>
> Did you install it?  I believe it is not installed by default.
>
> Duncan Murdoch
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Please ignore previous .Rd question

2007-11-26 Thread Edna Bell
If the function is f, you can use prompt(f)

Sorry

thanks,
Edna

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] generating .Rd files

2007-11-26 Thread Edna Bell
Hi R Gurus!

I have a package that I am putting together.

I waited until the end to do the documentation and would like to
generate a set of "empty" .Rd files.

Is there a quick way to do this, please?

Thanks,
Edna Bell
PS I can't seem to access the "Writing R Extensions" manual from 2.6.1
on Windows.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] structure vs. matrix

2007-11-04 Thread Edna Bell
I was reading "S Programming" and a set of the code used structure to
set up a matrix.

I just wondered which was better and why.



On 11/4/07, Mark Difford <[EMAIL PROTECTED]> wrote:
>
> Hi Edna,
>
> >> When creating a matrix, is it better to use the structure function or the
> >> matrix function...?
>
> I hope you have a huge (empty) jar in the kitchen, and that your pantry is
> empty.
>
> R isn't too difficult, except if you're trying to do stats (and don't know
> what you are doing --- though I am not suggesting that you don't know how to
> do stats;).
>
> ## see
> ?structure
> ?matrix
>
> A structure is not a matrix.  So, if you want to make a matrix, use
> matrix().  Easy.
>
> HTH,
> Mark.
>
>
> Edna Bell wrote:
> >
> > Hi R Gurus!
> >
> > When creating a matrix, is it better to use the structure function or
> > the matrix function, please?
> >
> > Thanks,
> > Edna Bell
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/structure-vs.-matrix-tf4745521.html#a13572508
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] structure vs. matrix

2007-11-03 Thread Edna Bell
Hi R Gurus!

When creating a matrix, is it better to use the structure function or
the matrix function, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [OT] vista question

2007-11-02 Thread Edna Bell
This is way off topic, but I'll try:

On a windows vista machine, how can you run commands from the command
prompt as administrator, please?

tia

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] correct wording and notation for R stuff in LaTex

2007-11-01 Thread Edna Bell
Hi R Gurus:

I'm putting together an article about some R stuff in Latex.

I refer to packages and functions.

I think that I use {\em} for packages and {\tt} for functions.

Is that correct, please?

Thank you in advance!
Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] strsplit

2007-10-21 Thread Edna Bell
Hello R Gurus:

I would like to take a character string and split at the $ sign.

I thought that strsplit would do it, but here are the results:

> vv
[1] "whine$ts1"
> vv
[1] "whine$ts1"
> strsplit(vv,"$")
[[1]]
[1] "whine$ts1"


Does anyone have any suggestions, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] building a copy of R with certain packages in Linux

2007-10-20 Thread Edna Bell
Dear R Gurus:

I would like to have a version of R with certain packages only to be
put together in Linux.

Does something like that exist, please?

I'm thinking it might be a sort of
R CMD build

but I don't know how to proceed.

Thanks for any help.

Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] building packages on Windows

2007-10-01 Thread Edna Bell
Hi again.

I'm sure that this is really simple.

I'm trying to build a package on a Windows Vista machine.  I use
Rcmd build --binary test

but I get the "Please set TMPDIR to a valid temporary directory"

I tried TMPDIR=c:\temp
but to no avail.

Please help.

thanks

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] convert a tar.gz to a Windows zip

2007-10-01 Thread Edna Bell
Dear R Gurus;

Is there a simple way to convert a Linux produced tar.gz file (a
package) to a Windows binary zip package, please?

Thanks in advance

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] convert time series to data.frame

2007-09-30 Thread Edna Bell
Hi again
Here is the sample:
> yuk
   Jan   Feb   Mar   Apr   May   Jun   Jul   Aug   Sep   Oct   Nov   Dec
2005 41.26 40.02 38.24 35.37 39.35 38.90 43.51 40.32 38.14 41.04 41.78 40.48
2006 40.55 42.15 42.30 39.93 38.12 35.79 34.71 34.29 36.27 37.33 37.97 40.16
2007 40.74 39.59 36.74 37.87 38.87 39.35 37.17 38.31 32.44
> as.data.frame(yuk)
   zoo(coredata(x), tt)
1 41.26
2 40.02
3 38.24
4 35.37
5 39.35
6 38.90
7 43.51
8 40.32
9 38.14
1041.04
1141.78
1240.48
1340.55
1442.15
1542.30
1639.93
1738.12
1835.79
1934.71
2034.29
2136.27
2237.33
2337.97
2440.16
2540.74
2639.59
2736.74
2837.87
2938.87
3039.35
3137.17
3238.31
3332.44
>

Ideally, the time element would be there for plotting purposes.

thanks


On 9/30/07, Jeffrey Robert Spies <[EMAIL PROTECTED]> wrote:
> Hi Edna,
>
> Can you send a small subset of the data as an example and the
> function call you used to read the data in originally?  It might be
> helpful in understanding why you're losing the "time element".
>
> Jeff.
>
> On Oct 1, 2007, at 12:27 AM, Edna Bell wrote:
>
> > Dear R gurus
> >
> > I would like to take a monthly time series and convert it to a data
> > frame without losing the tsp items, pleae
> >
> > I've tried as.data.frame and data.frame but I get the series without
> > the time element.
> >
> > Any suggestions, please?
> >
> > tia
> >
> > Edna Bell
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-
> > guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] convert time series to data.frame

2007-09-30 Thread Edna Bell
Dear R gurus

I would like to take a monthly time series and convert it to a data
frame without losing the tsp items, pleae

I've tried as.data.frame and data.frame but I get the series without
the time element.

Any suggestions, please?

tia

Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] fuzzy logic

2007-09-24 Thread Edna Bell
Hi R Gurus!

Is there a fuzzy logic package please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] making R packages and compacting an entire R set up

2007-09-24 Thread Edna Bell
Hi R Gurus!

I have 2 questions, please:

a.  I'm putting together a little baby package on SUSE Linux 10.1.  I
want to create a zip of the package for windows.  How should I create
that please?

b.  I don't know if the following is possible but here it is:  I have
R and a bunch of libraries set up very nicely.  I would like to hand
off this setup to someone else.  Should I just copy things as they
stand onto a CD please or is there a better way please?

thanks in advance!
Sincerely,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Converting zoo dates to ts dates

2007-09-17 Thread Edna Bell
Hi R Gurus

I'm using get.hist.quote to obtain monthly historical data.

This results in a zoo series.

I would like to convert the zoo series to a time series within a
function.  How do I get the starting date for the ts from the zoo
series, please?

Thanks,
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.