Re: [R] Running R on read-only file system, without temporary directory

2009-09-04 Thread Gábor Csárdi
Thanks for all the answers. I have made some quick and dirty modifications to make it start without a temporary directory and so far it runs OK. Obviously, I cannot do help(), example(), install.packages() and Rprof() and maybe many more, but this is not an interactive machine, but an Rserve serve

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-04 Thread Webb Sprague
>> xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) > wkhp >  20   30   40   45   60 >   1    1   10    1    3    4 Thanks! I must say that this is slightly odd behavior to require both na.action= AND exclude=. Does anyone know of a justification? Shouldn't it be changed? Ah well, if R were i

Re: [R] Problems with Boxplot

2009-09-04 Thread gug
Hi Petr, Thanks for these comments. I'm sorry that my post was not clear. I was referring to the questions in my original post/code/file uploads, but I had forgotten to include an updated file (now attached http://www.nabble.com/file/p25304663/Post%2Btrial%2Bdata.csv Post+trial+data.csv ) to w

[R] R2WinBUGS question from beginner

2009-09-04 Thread michael curran
Hi R Users, I have--what I think--is a very basic question. I'm trying to use R2WinBUGS and am having difficulty setting up the data properly for repeated measures data in a hierarchical model. First, I know that it is me...not the package, as I sucessfully used R2WinBUGS to run a basic regr

Re: [R] Is 'history' recorded in Rscript?

2009-09-04 Thread David Winsemius
You should be looking for .Rhistory Some OSes make that task difficult. "savehistory" is not the file name but rather the name of the function that performs that operation. Try savehistory(file="text.Rhistory") and see if the history file is easier to find. Should be in your working directo

[R] error in mixed effect model when use "maximum likelihood"

2009-09-04 Thread zrl
Dear List, I tried to fit a mixed effect model. data are like this: groupid time t control 10 4.3 control 20 3.7 control 30 4.0 control 40 3.6 control 50 4.1 control 60 3.8 .. control 45 5.1 control 55 4.5

Re: [R] Redblack tree data structure

2009-09-04 Thread Michael Lawrence
Not sure of a RB tree available directly in R, but there's a nice public domain C implementation from the UCSC genome browser library. It's used by the IRanges Bioconductor package for implementing an interval tree. On Fri, Sep 4, 2009 at 9:14 AM, Rune Schjellerup Philosof < rphilo...@health.sdu.d

Re: [R] Combining expressions.

2009-09-04 Thread Gabor Grothendieck
Actually that gives a "call" object. To get an expression object: > f <- function(e1, n) as.expression(substitute(e1^n, list(e1 = e1[[1]], n = > n[[1]]))) > out <- f(expression(x^2+y^2), expression(n)); out expression((x^2 + y^2)^n) > class(out) [1] "expression" On Fri, Sep 4, 2009 at 10:59 PM,

[R] Is 'history' recorded in Rscript?

2009-09-04 Thread Peng Yu
Hi, I run the following command and try to save the commands that have been run in the script. But it seems that no history is recorded. Is it because that the history is not recorded in Rscript? Regards, Peng $ Rscript savehistory.R > f=tempfile() > f [1] "/tmp/Rtmp7WBjGG/file327b23c6" > histor

Re: [R] Combining expressions.

2009-09-04 Thread Gabor Grothendieck
Use substitute: > f <- function(e1, n) substitute(e1^n, list(e1 = e1, n = n[[1]])) > f(expression(x^2+y^2), expression(n)) expression(x^2 + y^2)^n On Fri, Sep 4, 2009 at 10:22 PM, Turner Rolf wrote: > > I am trying to construct a function to which I pass an expression as an > argument. > >From t

Re: [R] lrm in Design package--missing value where TRUE/FALSE needed

2009-09-04 Thread Frank E Harrell Jr
annie Zhang wrote: Hi, Frank, I met the same problem. My data does not have NA, when I run fit <- lrm(Y_t~.,data=X) The error message is: singular information matrix in lrm.fit (rank= 35 ). Offending variable(s): X35 Error in j:(j + params[i] - 1) : NA/NaN argument How can I avoid this? T

Re: [R] How to or or and all the values in a logical vector?

2009-09-04 Thread David Winsemius
On Sep 4, 2009, at 10:37 PM, Peng Yu wrote: Hi, Suppose I have a logical vector x, I want to compute the 'and' ?all and 'or' ?any of all its element (the result should be a single value TRUE or FALSE). I have read the R-intro.pdf logical vector section, but I don't find the answer. I

[R] How to or or and all the values in a logical vector?

2009-09-04 Thread Peng Yu
Hi, Suppose I have a logical vector x, I want to compute the 'and' and 'or' of all its element (the result should be a single value TRUE or FALSE). I have read the R-intro.pdf logical vector section, but I don't find the answer. Can somebody let me know how to do it? >x= rep(TRUE, 3) Regards, Pe

Re: [R] lrm in Design package--missing value where TRUE/FALSE needed

2009-09-04 Thread annie Zhang
Hi, Frank, I met the same problem. My data does not have NA, when I run fit <- lrm(Y_t~.,data=X) The error message is: singular information matrix in lrm.fit (rank= 35 ). Offending variable(s): X35 Error in j:(j + params[i] - 1) : NA/NaN argument How can I avoid this? Thank you, Annie On Fri,

[R] Combining expressions.

2009-09-04 Thread Turner Rolf
I am trying to construct a function to which I pass an expression as an argument. >From that expression I want to create a somewhat more complicated expression and then differentiate it using D() or deriv(). To give a simple example, I'd like to be able to do something like e1 <- expression(x^2

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-04 Thread David Winsemius
On Sep 4, 2009, at 7:49 PM, ws wrote: Hi all, I cannot get xtabs to count NA's like I expect. Below is a sample session, and note that the last two calls to xtabs() yield exactly the same thing. I am running R-2.5.0 -- if there was a bug in xtabs that got fixed, I would love to know abo

Re: [R] Problem accessing functions in package 'roxygen'

2009-09-04 Thread Robert A LaBudde
Thanks, Uwe. Unfortunately, that doesn't work either: > library('roxygen') Warning message: package 'roxygen' was built under R version 2.9.1 > roxygen::trim(' 1234 ') Error: 'trim' is not an exported object from 'namespace:roxygen' I ended up using trim <- function(x) gsub("^[[:space:]]+|[[:sp

[R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-04 Thread ws
Hi all, I cannot get xtabs to count NA's like I expect. Below is a sample session, and note that the last two calls to xtabs() yield exactly the same thing. I am running R-2.5.0 -- if there was a bug in xtabs that got fixed, I would love to know about it. If there is a bug tracker somewhere,

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-04 Thread Matt Killingsworth
Hi Bert, Thank you for your note! I tried changing the REML default, and it still produces the same result (see below). Is that what you meant for me to try? Incidentally, I am using lmer() not lme() ### ORIGINAL ### > f1 <- (lmer(outcome ~ predictor.1 + (1 | person), data=i)) > f2 <- (lmer(o

Re: [R] Running R on read-only file system, without temporary directory

2009-09-04 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch > Sent: Friday, September 04, 2009 5:05 PM > To: Gábor Csárdi > Cc: R mailing list > Subject: Re: [R] Running R on read-only file system,without > temporary direct

Re: [R] Running R on read-only file system, without temporary directory

2009-09-04 Thread Gabor Grothendieck
If you are willing to do a bit of work you could look into linking R to an embedded file system in RAM -- maybe whefs. On Fri, Sep 4, 2009 at 3:42 PM, Gábor Csárdi wrote: > Dear All, > > I would like to do run R without having write permissions to any > directory on the system. It seems that I nee

Re: [R] Running R on read-only file system, without temporary directory

2009-09-04 Thread Duncan Murdoch
On 04/09/2009 3:42 PM, Gábor Csárdi wrote: Dear All, I would like to do run R without having write permissions to any directory on the system. It seems that I need to modify the R source code for this, to make R start without creating a temporary directory. So far, so good. But should I expect

Re: [R] How to join two matrices?

2009-09-04 Thread Jorge Ivan Velez
Hi Peng, Try rbind(x,y) cbind(x,y) HTH, Jorge On Fri, Sep 4, 2009 at 6:26 PM, Peng Yu wrote: > Hi, > > Suppose I have the following two matrices. > > x=matrix(1:4,nr=2) > > y=matrix(5:8,nr=2) > > I want to join the two matrices to get the following two new matrices. > I did a search but I don'

Re: [R] How to join two matrices?

2009-09-04 Thread David Winsemius
On Sep 4, 2009, at 6:26 PM, Peng Yu wrote: Hi, Suppose I have the following two matrices. x=matrix(1:4,nr=2) y=matrix(5:8,nr=2) I want to join the two matrices to get the following two new matrices. I did a search but I don't find any relevant webpage. Can somebody let me know how to do it?

[R] How to join two matrices?

2009-09-04 Thread Peng Yu
Hi, Suppose I have the following two matrices. > x=matrix(1:4,nr=2) > y=matrix(5:8,nr=2) I want to join the two matrices to get the following two new matrices. I did a search but I don't find any relevant webpage. Can somebody let me know how to do it? [,1] [,2] [1,]13 [2,]2

Re: [R] limmaGUI anomaly: top-table & venn-diagram for linear model

2009-09-04 Thread Martin Morgan
d.le...@warwick.ac.uk wrote: > Hello, > > In limmaGUI, after running a linear model for a single gene & time point > (mutant vs control), the venn-diagram for differentially expressed genes > with a p-value cut-off gives a different number than the top-table with > the same cut-off (2600 vs. 791).

Re: [R] Output from as.windrose() in oce package baffles me

2009-09-04 Thread Dan Kelley
Thanks for posting your code, Scott. I'll have a look at the windrose in OCE sometime next week, to see if there is anything I can do that would have made your task easier. I've never used windroses in my own work, so that may explain why the interface is clunky! Also, it's not completely

Re: [R] What is the difference between read.delim and read.delim2?

2009-09-04 Thread David Winsemius
It's pretty subtle, I will admit, but look more carefully at the dec= parameter in the help page. Kind of like the historical battles between between the Liebnizians and the Newtonians. On Sep 4, 2009, at 5:58 PM, Peng Yu wrote: Hi, I don't see what the difference between read.delim and re

[R] limmaGUI anomaly: top-table & venn-diagram for linear model

2009-09-04 Thread D . Levin
Hello, In limmaGUI, after running a linear model for a single gene & time point (mutant vs control), the venn-diagram for differentially expressed genes with a p-value cut-off gives a different number than the top-table with the same cut-off (2600 vs. 791). I have seen the same thing happen befor

Re: [R] Output from as.windrose() in oce package baffles me

2009-09-04 Thread Waichler, Scott R
Dan, > May I ask you to report this as an issue on the oce webpage, > so that others can see the discussion? (The "R help" is > perhaps not the right place to report bugs ... and, yes, this > is a bug.) > http://code.google.com/p/r-oce/issues/list Yes, I will. > A possible solu

[R] What is the difference between read.delim and read.delim2?

2009-09-04 Thread Peng Yu
Hi, I don't see what the difference between read.delim and read.delim2 after reading the help. Can somebody let me know what it is? Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posti

Re: [R] lrm in Design package--missing value where TRUE/FALSE needed

2009-09-04 Thread Frank E Harrell Jr
Ping-Hsun Hsieh wrote: Hi, A error message arose while I was trying to fit a ordinal model with lrm() I am using R 2.8 with Design package. Here is a small set of mydata: RC RS Sex CovACovBCovCCovDCovE 2 1 0 1 1 0 -0.005575280

Re: [R] lrm in Design package--missing value where TRUE/FALSE needed

2009-09-04 Thread David Winsemius
The idea of estimating 7 parameters from 11 cases using mostly binary variables just seems begging for a singular matrix. On Sep 4, 2009, at 3:59 PM, Ping-Hsun Hsieh wrote: Hi, A error message arose while I was trying to fit a ordinal model with lrm() I am using R 2.8 with Design package.

Re: [R] where did ggplot go?

2009-09-04 Thread hadley wickham
Hi Gene, Yes, ggplot2 has replaced ggplot. Hadley On Fri, Sep 4, 2009 at 12:58 PM, Gene Leynes wrote: > This must be explained somewhere, but I've been searching for a couple of > hours and not found it. > > What happened to ggplot?  It appears to be missing on CRAN, except in the > archives. >

Re: [R] Nested Fixed Effects - basic questions

2009-09-04 Thread Daniel Malter
In R and experimental or mixed-model terminology, your lm model specifies fixed effects. As long as each data row represents a unique subject, you are fine with lm. If not, you have to account for the repeated measurement of subjects and will need other methods (potentially involving random effects

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-04 Thread Bert Gunter
My guess would be: "Likelihood comparisons are not meaningful for objects fit using restricted maximum likelihood and with different fixed effects. " (from ?anova.lme in the nlme package). Are you using the REML = TRUE default? Bert Gunter Genentech Nonclinical Statistics -Original Message

[R] lrm in Design package--missing value where TRUE/FALSE needed

2009-09-04 Thread Ping-Hsun Hsieh
Hi, A error message arose while I was trying to fit a ordinal model with lrm() I am using R 2.8 with Design package. Here is a small set of mydata: RC RS Sex CovACovBCovCCovDCovE 2 1 0 1 1 0 -0.0055752802 2 1 0

[R] Running R on read-only file system, without temporary directory

2009-09-04 Thread Gábor Csárdi
Dear All, I would like to do run R without having write permissions to any directory on the system. It seems that I need to modify the R source code for this, to make R start without creating a temporary directory. So far, so good. But should I expect any more complications? Does R really need th

Re: [R] How to print a variable with in double quotes

2009-09-04 Thread Duncan Murdoch
On 9/4/2009 12:18 PM, sailu Yellaboina wrote: I want to print a variable with in double quotes. For example x = 10 ; x ;#prints 10 "x" ; #prints x \"x\" ; # Error: unexpected input in "\" I want to the out put as'10' or "10" There are lots of ways to do that. The simplest is to c

Re: [R] How to print a variable with in double quotes

2009-09-04 Thread Dimitris Rizopoulos
do you mean something like this: x <- 10 as.character(x) I hope it helps. Best, Dimitris sailu Yellaboina wrote: I want to print a variable with in double quotes. For example x = 10 ; x ;#prints 10 "x" ; #prints x \"x\" ; # Error: unexpected input in "\" I want to the out put as

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-04 Thread Deepayan Sarkar
On Fri, Sep 4, 2009 at 8:28 AM, Paul Sweeting wrote: > Hi > > Well, I think the title says it all!  I've looked through the documentation > but I can't find a way of doing this.  The situation is that I have 4 series, > say a, b, c and d.  Series a and c are plotted on the lh y axis, series b and

Re: [R] How to print a variable with in double quotes

2009-09-04 Thread baptiste auguie
Hi, Try this, x = 10 noquote(dQuote(x)) noquote(sQuote(x)) HTH, baptiste 2009/9/4 sailu Yellaboina > I want to print a variable with in double quotes. > For example > > x = 10 ; > x ;#prints 10 > "x" ; #prints x > \"x\" ; # Error: unexpected input in "\" > > I want to the out put

[R] How to print a variable with in double quotes

2009-09-04 Thread sailu Yellaboina
I want to print a variable with in double quotes. For example x = 10 ; x ;#prints 10 "x" ; #prints x \"x\" ; # Error: unexpected input in "\" I want to the out put as'10' or "10" Thank you Sailu Yellaboina __ R-help@r-project.org mailing l

[R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-04 Thread rapton
Hello, I am using R to analyze a large multilevel data set, using lmer() to model my data, and using anova() to compare the fit of various models. When I run two models, the output of each model is generated correctly as far as I can tell (e.g. summary(f1) and summary(f2) for the multilevel mode

[R] How should a SelfStart function handle illegal parameter values?

2009-09-04 Thread Keith Jewell
Hi Everyone, I'm trying to write selfStart non-linear models for use with nls. In these models some combinations of parameter values are illegal; the function value is undefined. That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; I return an appropriate non-value such as

Re: [R] eps file with embedded font

2009-09-04 Thread Jonathan Baron
A couple of other ideas about embedding fonts and setting bounding boxes. These all work on Linux, so in theory they should also work on OS X, although I have no idea how. 1. For setting bounding boxes, you can use gv, which is a PostScript viewer. As you move the pointer around, you can see the

[R] where did ggplot go?

2009-09-04 Thread Gene Leynes
This must be explained somewhere, but I've been searching for a couple of hours and not found it. What happened to ggplot? It appears to be missing on CRAN, except in the archives. http://cran.r-project.org/web/packages/ggplot/index.html Has ggplot2 replaced ggplot? I was trying to run some exam

[R] Nested Fixed Effects - basic questions

2009-09-04 Thread Jojo Ziggy
Hi R people, I have a very basic question to ask - I'm sorry if it's been asked before, but I searched the archives and could not find an answer. All the examples I found were much more complicated/nuanced versions of the problem - my question is much more simple. I have data with multiple, n

Re: [R] NA in cca (vegan)

2009-09-04 Thread Gavin Simpson
On Fri, 2009-09-04 at 17:15 +0200, Kim Vanselow wrote: > Dear all, > I would like to calculate a cca (package vegan) with species and > environmental data. One of these environmental variables is > cos(EXPOSURE). > The problem: for flat releves there is no exposure. The value is > missing and I can

Re: [R] Windows Check/Build Configuration

2009-09-04 Thread Duncan Murdoch
On 9/4/2009 1:02 PM, Gates, Michael wrote: To all (and Duncan in particular), The problem has been solved. Apparently, you cannot have directories in the path for files that contain "spaces" in their names. I noticed this problem under Vista if the build directory was nested under several direc

Re: [R] Windows Check/Build Configuration

2009-09-04 Thread Gates, Michael
To all (and Duncan in particular), The problem has been solved. Apparently, you cannot have directories in the path for files that contain "spaces" in their names. I noticed this problem under Vista if the build directory was nested under several directories within the working directory (i.e. th

Re: [R] Applying qqmath using gamma distribution...

2009-09-04 Thread David Winsemius
You should pay close attention to the definitions of the parameters passed to the various gamma functions. x <- rgamma(1000, 2, 2) library(mhsmm) qsh <- gammafit(x)$shape; qsc <- gammafit(x)$scale > qsh x x 2.009260 > qsc x x 0.4827448 On Sep 4, 2009, at 11:59 AM, Petar M

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-04 Thread Gabor Grothendieck
If you represent your series as zoo series then you can do this: library(zoo) z <- zoo(cbind(a = 1:3, b = 4:6, c = 3:1, d = 6:4)) xyplot(z, screen = 1, type = c("p", "p", "l", "l")) See the three vignettes that come with zoo and also see ?xyplot.zoo If you omit screen = 1 then the 4 will be on se

[R] Redblack tree data structure

2009-09-04 Thread Rune Schjellerup Philosof
I need to use a red-black tree, which package provides that data structure? -- Best regards Rune Schjellerup Philosof Ph.d-stipendiat, Forskningsenheden for Biostatistik Telefon: 6550 3607 E-mail: rphilo...@health.sdu.dk Adresse: J.B. Winsløwsvej 9, 5000 Odense C SYDDANSK UNIVERSITET

Re: [R] help with functions

2009-09-04 Thread baptiste auguie
Hi, I think you've got a problem with environments, testA<-function(input=1) { dat <- data.frame(A=seq(input,5), B=seq(6,10)) vec.names<- c("a", "b") env <- new.env() for(i in 1:ncol(dat)) { tab<- dat[,i]-1 assign(vec.names[i], tab, env=env) }

Re: [R] Applying qqmath using gamma distribution...

2009-09-04 Thread Petar Milin
Thank you very much for the answer! However, instead of x being some uniform values, I have real values. Hence, if I have dat$V1 of my interest, formula should be like this: qqmath(~ V1, data=dat, distribution=function(V1) qgamma(V1, shape=gammafit(dat$V1)$shape, scale=gammafit(dat$V1)$scale)) I

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-04 Thread Dylan Beaudette
Here is an example: http://casoilresource.lawr.ucdavis.edu/drupal/node/510 make.groups() is your friend. Cheers, Dylan On Fri, Sep 4, 2009 at 8:28 AM, Paul Sweeting wrote: > Hi > > Well, I think the title says it all!  I've looked through the documentation > but I can't find a way of doing thi

[R] Fwd: eps file with embedded font

2009-09-04 Thread Simone Gabbriellini
-- Forwarded message -- From: Jonathan Baron Date: 2009/9/4 Subject: Re: [R] eps file with embedded font To: Simone Gabbriellini On 09/04/09 17:16, Simone Gabbriellini wrote: > thanks Jonathan, > > I was wondering about the difference between your second option and > the Ted one

[R] Large p, small n. Impossible to calculate the p-value

2009-09-04 Thread rromero3000
Hello, I have I problem and I hope someone can help me. I have a data set with 66 variables and 30 values for each variable. I need to calculate the Pearson correlation and the p-values among variables. I have the “large p, small n” problem so I used a shrinkage process to obtain the r values. M

[R] rromero3000

2009-09-04 Thread rromero3000
Hello, I have I problem and I hope someone can help me. I have a data set with 66 variables and 30 values for each variable. I need to calculate the Pearson correlation and the p-values among variables. I have the “large p, small n” problem so I used a shrinkage process to obtain the r values. M

Re: [R] Confusion metaMDS and CA

2009-09-04 Thread swertie
Thank you very much for those useful informations. I've been reading some papers and actually different people will use different ordination methods also if the studies are very alike. So I will keep metaMDS for the moment and see if my results are interpretable :) -- View this message in contex

Re: [R] Calling R from a Perl script: much slower?

2009-09-04 Thread J . delasHeras
Ah! sorted! it was NOT running the same code. We're making a GUI using Perl (Tcl/Tkx) to facilitate a number of analyses in our lab to other people who don't necessarily want to know about R (their loss ;-) I provided the R code to my colleague and he assured me he used it without chang

[R] help with functions

2009-09-04 Thread jonas garcia
Hi all, I have got 2 function (see bellow) which are simplifications of what I need to do. These functions are precisely the same, except for the last line. My question is, why doesn't function testA work in the same way as function testB. Both functions produce two objects, "a" and "b" that

[R] Creating mixed line and point graphs with xyplot

2009-09-04 Thread Paul Sweeting
Hi Well, I think the title says it all!  I've looked through the documentation but I can't find a way of doing this.  The situation is that I have 4 series, say a, b, c and d.  Series a and c are plotted on the lh y axis, series b and d are plotted on the rh (secondary) y axis.  I've worked out

Re: [R] eps file with embedded font

2009-09-04 Thread Simone Gabbriellini
thanks Jonathan, I was wondering about the difference between your second option and the Ted one: isn't it the same thing? regards, Simone 2009/9/4 Jonathan Baron : > A couple of other ideas about embedding fonts and setting bounding > boxes.  These all work on Linux, so in theory they should al

[R] NA in cca (vegan)

2009-09-04 Thread Kim Vanselow
Dear all, I would like to calculate a cca (package vegan) with species and environmental data. One of these environmental variables is cos(EXPOSURE). The problem: for flat releves there is no exposure. The value is missing and I can't call it 0 as 0 stands for east and west. The cca does not run

Re: [R] eps file with embedded font

2009-09-04 Thread Simone Gabbriellini
Thank for the help, unfortunately it doesn't work... it looks impossible to embed fonts... cairo should do this automatically but not for eps files at the moment... really don't know how to solve it. best regards, Simone 2009/9/4 Ted Harding : > On 04-Sep-09 14:01:44, Simone Gabbriellini wrote:

Re: [R] List of tags in roxygen and use for S4 classes?

2009-09-04 Thread Bernd Bischl
Rainer M Krug wrote: Hi is there a list of all roxygen tags which are available? I couldn't find them. I am asking specifically towards the use of roxygen in documenting S4 classes - is that implemented yet (i am using roxygen 0.1 from CRAN at the moment)? Thanks Rainer I am using it do

Re: [R] eps file with embedded font

2009-09-04 Thread Ted Harding
On 04-Sep-09 14:01:44, Simone Gabbriellini wrote: > Dear list, > I am trying to make eps file with embedded font. > I use: > > postscript("ranking-exp-all.eps", horizontal=TRUE, onefile=FALSE, > paper="special", height=8, width=12, family="Helvetica") ># plot stuff > dev.off() > > since R does no

Re: [R] Confusion metaMDS and CA

2009-09-04 Thread Gavin Simpson
On Fri, 2009-09-04 at 03:36 -0700, swertie wrote: > Thank you very much. I am just concerned because I wonder if I used the best > method. I have presence/absence data. With isoMDS I can specify > "Bray-Curtis" distance method, which is adequate, but I was not sure of the > method used by metaMDS.

[R] eps file with embedded font

2009-09-04 Thread Simone Gabbriellini
Dear list, I am trying to make eps file with embedded font. I use: postscript("ranking-exp-all.eps", horizontal=TRUE, onefile=FALSE, paper="special", height=8, width=12, family="Helvetica") # plot stuff dev.off() since R does not embed font, I then use: embedFonts(file="indegdistr.eps", outfil

Re: [R] < 0 x 0 matrix >

2009-09-04 Thread Ted Harding
On 04-Sep-09 10:45:27, Markku Karhunen wrote: > True. Should have read ?diag. > > However, this provokes a more general question: Is there some way I > can declare some scalar and _all its functions_ as matrices? > > For instance, I would like to > > A = as.matrix(0.98) > B = function(A) > C =

Re: [R] Party plots SOLVED

2009-09-04 Thread AnnieE
"Quote from Petr PIKAL" > No, no. Here you need to do your plotting routine. > Something like > plot(1:10, rnorm(10)) > Now you can open it by e.g. Acrobat Reader or any suitable programme. Do > not forget to quit from Acrobat when trying to use the file again, if it > is opened it ca

Re: [R] transforming a badly organized data base into a list of data frames

2009-09-04 Thread Gabor Grothendieck
Try this: x2 <- subset(x, A != "") split(x2, cumsum(x2$B == "")) On Fri, Sep 4, 2009 at 8:57 AM, Dimitri Liakhovitski wrote: > Dear R-ers! > > I have a badly organized data base in Excel. Once I read it into R it > looks like this (all variables become factors because of many spaces > and other

Re: [R] transforming a badly organized data base into a list of data frames

2009-09-04 Thread Henrique Dallazuanna
Try this: lapply(grep("Name", x$A), function(idx)x[idx + 1:3,]) On Fri, Sep 4, 2009 at 9:57 AM, Dimitri Liakhovitski wrote: > Dear R-ers! > > I have a badly organized data base in Excel. Once I read it into R it > looks like this (all variables become factors because of many spaces > and other c

Re: [R] Windows Check/Build Configuration

2009-09-04 Thread Duncan Murdoch
On 9/4/2009 9:07 AM, Gates, Michael wrote: I recently submitted a package on CRAN. When I went to update the package, I tried to do the check/build procedures on a system with Windows XP, using the recommended R-tools available from Dr. Ripley (Rtools29). Everything works fine in the check and

[R] Windows Check/Build Configuration

2009-09-04 Thread Gates, Michael
I recently submitted a package on CRAN. When I went to update the package, I tried to do the check/build procedures on a system with Windows XP, using the recommended R-tools available from Dr. Ripley (Rtools29). Everything works fine in the check and build process except under Windows XP the p

[R] transforming a badly organized data base into a list of data frames

2009-09-04 Thread Dimitri Liakhovitski
Dear R-ers! I have a badly organized data base in Excel. Once I read it into R it looks like this (all variables become factors because of many spaces and other characters in Excel): x<-data.frame(A=c("","Name1","text1","text2","text3","","","","Name2","text1","text2","text3","","","Name3","text1

[R] creating lists in a list with loop

2009-09-04 Thread Häring, Tim (LWF)
Hello ! I want to create a spatial stratified sampling scheme with the package spsurvey. To do this with the function "grts" in spsurvey, I need to create a list containing the specifications for each stratum. This specifications were stored in a named list, where the name for each stratum is t

Re: [R] Party plots

2009-09-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.09.2009 13:53:24: > > Nordlund, Dan (DSHS/RDA) wrote: > > > > > > You need to put the filename in quotes > > > > file = "C:/Documents and Settings/aelmore/Desktop/foo.pdf" > > > > Hope this is helpful, > > > > Dan > > > Oh yes, this was very h

Re: [R] Applying qqmath using gamma distribution...

2009-09-04 Thread Duncan Murdoch
On 9/4/2009 8:36 AM, Petar Milin wrote: Hello ALL! Can anyone tell me how to specify qqmath() function with distribution qgamma? In help it is bit vague how to pass shape and scale parameters for gamma. Take a look at the first example, which passes in the df parameter for a t distribution.

[R] Applying qqmath using gamma distribution...

2009-09-04 Thread Petar Milin
Hello ALL! Can anyone tell me how to specify qqmath() function with distribution qgamma? In help it is bit vague how to pass shape and scale parameters for gamma. Thank you in advance. Best, PM __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] Best Way to Compute/Approximate(?) Probabilty of a Point in a Given Distribution

2009-09-04 Thread Ben Bolker
Gundala Viswanath wrote: > > AFAIK, R only has "pnorm" which computes the probability of getting a > value smaller or equal to "x" from > a normal distribution N[mean,stdev]. For example: > > R> pnorm(0, 4, 10) > [1] 0.3446 > > means there is 34.46% chance of getting a value equal to or smal

Re: [R] Confusion metaMDS and CA

2009-09-04 Thread swertie
Thank you very much. I am just concerned because I wonder if I used the best method. I have presence/absence data. With isoMDS I can specify "Bray-Curtis" distance method, which is adequate, but I was not sure of the method used by metaMDS. I think that it is Euclidian distance. Can I use it for p

Re: [R] Party plots

2009-09-04 Thread AnnieE
Nordlund, Dan (DSHS/RDA) wrote: > > > You need to put the filename in quotes > > file = "C:/Documents and Settings/aelmore/Desktop/foo.pdf" > > Hope this is helpful, > > Dan Oh yes, this was very helpful (and don't I feel just too silly...). I am, however, still stuck. This is like pullin

[R] Multinomial and Ordinal Logistic Regression - Probability calculation

2009-09-04 Thread OLIVIER REGNIER-COUDERT (0509785)
Dear all, I am new to R and would like to run a multinomial logistic regression on my dataset (3 predictors for 1 dependent variables) I have used the vglm function from the VGAM package and got some results. Using the predict() function, I obtained the probability table I was looking for. Ho

[R] plotting positive predictive values

2009-09-04 Thread r2L
Hi, I'm trying to fit a smooth line in a plot(y ~ x) graph. x is continuous variable y is a proportion of success in sub-samples, 0 <= y <= 1, from a Monte Carlo simulation. For each x there may be several y-values from different runs. Each run produces several sub-samples, where "0" mean no suc

Re: [R] < 0 x 0 matrix >

2009-09-04 Thread Markku Karhunen
True. Should have read ?diag. However, this provokes a more general question: Is there some way I can declare some scalar and _all its functions_ as matrices? For instance, I would like to A = as.matrix(0.98) B = function(A) C = diag(sqrt(B)) so that all scalars are explicitly [1,1] matric

[R] passing character vectors to FORTRAN

2009-09-04 Thread Silver, Jeremy David
Hi, I've been trying to pass a character vector from R to a FORTRAN subroutine. There have been several posts discussing this issue (e.g. http://tolstoy.newcastle.edu.au/R/help/98a/0547.html, http://tolstoy.newcastle.edu.au/R/help/05/10/13558.html, http://tolstoy.newcastle.edu.au/R/help/01a/25

Re: [R] saving large matrices with decimal numbers

2009-09-04 Thread Petr PIKAL
Hi image<-matrix(0.1, 768,1024) > image[1:10, 1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 [2,] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 [3,] 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 [4,] 0.1 0.1 0

Re: [R] Linear Contrasts in GLM - Query

2009-09-04 Thread ONKELINX, Thierry
Have a look at glht() from the multcomp package. That will allow you to specify the contrasts for posthoc tests. A more direct approach is the create the required dummy variables yourself. HTH, Thierry ir. Thierry Onk

Re: [R] plot positive predictive values

2009-09-04 Thread ONKELINX, Thierry
You could use a glm with the binomial family to model that. A solution with ggplot2 library(ggplot2) ggplot(dataset, aes(x = x, y = y, weights = n)) + geom_smooth(method = "glm", family = binomial) geom_point()

[R] Linear Contrasts in GLM - Query

2009-09-04 Thread Leo Guelman
Hi, Is there a way I can specify linear contrasts in glm? I'm looking for something equivalent to SAS' contrast statement. I'd like to do the following, suppose I have a categorical input with 4 levels (a,b,c,d), I'd like to test something like: (i) a+b=c+d, (ii) a=b, (iii) a=b+d, etc... Thanks

[R] plot positive predictive values

2009-09-04 Thread r2L
Hi, I'm trying to fit a smooth line in a plot(y ~ x) graph. x is continuous variable y is a proportion of success in sub-samples, 0 <= y <= 1, from a Monte Carlo simulation. For each x there may be several y-values from different runs. Each run produces several sub-samples, where "0" mean no suc

Re: [R] < 0 x 0 matrix >

2009-09-04 Thread Duncan Murdoch
Duncan Murdoch wrote: baptiste auguie wrote: it's documented as "unexpected" ?diag Note Using diag(x) can have unexpected effects if x is a vector that could be of length one. Use diag(x, nrow = length(x)) for consistent behaviour. And the result follows from this part, else if (leng

Re: [R] < 0 x 0 matrix >

2009-09-04 Thread Duncan Murdoch
baptiste auguie wrote: it's documented as "unexpected" ?diag Note Using diag(x) can have unexpected effects if x is a vector that could be of length one. Use diag(x, nrow = length(x)) for consistent behaviour. And the result follows from this part, else if (length(x) == 1L && nargs() ==

[R] power analysis for 2-way anova

2009-09-04 Thread Tammy Ma
Dear R-help list, Does anyone have a function that I could use to determine power for 2 way Anova?? an A x B repeated measures study,power is 0.95, I'd like to draw separate lines for three different combinations of A and B: (2,2), (2,5), (2,8). Thanks a lot. Tammy _

Re: [R] Problems with Boxplot

2009-09-04 Thread Petr PIKAL
Hi it is rather difficult to understand what you mean by your questions/answers without real reproducible code. r-help-boun...@r-project.org napsal dne 03.09.2009 13:41:11: > > I'm posting answers to my own Q's here - as far as I have answers - first so > that people don't spend time on them,

Re: [R] predicting from segmented regression

2009-09-04 Thread Matthieu Dubois
dear Claudia, I was recently in touch with Vito Muggeo (the developer of the segmented package) with a similar question. This is an adapted version of his answer to your problem. In fact, the essential aspect is that predict.segmented has not (yet?) been implemented. Nevertheless, you could u

Re: [R] < 0 x 0 matrix >

2009-09-04 Thread baptiste auguie
it's documented as "unexpected" ?diag Note Using diag(x) can have unexpected effects if x is a vector that could be of length one. Use diag(x, nrow = length(x)) for consistent behaviour. And the result follows from this part, else if (length(x) == 1L && nargs() == 1L) { n <- as.int

  1   2   >