Re: [R] problem in installing R packages on linux

2008-04-18 Thread Uwe Ligges
man4ish wrote: > I am facing problem in installing the R package on linux . > When i put the command install.packages("BART") The screenshot is not there, but I suspect you want to install package "BARD" rather than "BART". Uwe Ligges > Then it asks for selecting the mirror , i have selected

Re: [R] multivariate time series

2008-04-18 Thread Pfaff, Bernhard Dr.
Hello Erin, have you considered the package bundle "dse" on CRAN? Best, Bernhard > >Dear R People: > >I was looking to see if there are any functions for Vector >ARMA modeling. > >I found Vector AR(p) but no Vector ARMAs. > >Thanks, >Erin > > >-- >Erin Hodgess >Associate Professor >Department

Re: [R] spatialpixelsdataframe

2008-04-18 Thread Paul Hiemstra
Dave Depew wrote: > I have a spatialpixelsdataframe containing bathymetry data. Is it > possible to save this as something similar to the meuse.grid so it can > be loaded without having to run the spatial interpolation each time the > script is called? > I don't see a straightforward method in

Re: [R] vector in filename

2008-04-18 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi, Simon Blomberg wrote: > How about this: > > x <- 1 > y <- 1 > mmax <- 10 > > my.files <- paste("foo", x:mmax, ".png", sep="") > > for (i in my.files) { > png(filename=i, pointsize=20, width=600, height=600, units="px", > bg="#eaedd5") > plot(x, y) > dev.off() > x

[R] Overall p-value from a factor in a coxph fit

2008-04-18 Thread Kåre Edvardsen
Hi all. If I run the simple regression when x is a categorical variable ( x <- factor(x) ): > MyFit <-coxph( Surv(start, stop, event) ~ x ) How can I get the overall p-value on x other than for each dummy variable? > anova(MyFit) does NOT provide that information as previously suggested on the

[R] validation of logistic regression model with weighted presences and absences

2008-04-18 Thread Eva Mosner
Hello everyone! I want to validate logistic regression models of species distrubution data where presences and absences are weighted differently. I used lrm from Design package but unfortunately, validate.lrm ignores weights in the validation process. Has anyone an idea (package, code) how I can d

Re: [R] EM algorithm for multiple-locus haplotypes frequencies

2008-04-18 Thread David Duffy
From: "Marcin Kozak" <[EMAIL PROTECTED]> Subject: [R] EM algorithm for multiple-locus haplotypes frequencies > Hi all, > > I've been looking in R for an EM algorithm adjusted for multiple-locus > haplotypes frequencies, but failed in 100%. Has anyone heard of > anything of this kind in R? > Look

[R] how to find the multiregression on the

2008-04-18 Thread man4ish
I am trying to calculate the multi regression for the follwing data 0 1 2 3 7 5 0 4 4 3 0 3 4 5 4 0 5 4 5 4 0 1 1 0 1 0 1 1 1 0 1 0 4 5 6 1 2 3 2 1 keeping Ist column as dependent variable and other as independent varialbles,how can i do this using lm funciotn in stats please send me the code

[R] space between plots

2008-04-18 Thread Agustin Lobo
I've set layout(matrix(c(1,3,2,4),ncol=2)) and par(mar=c(0, 4, 4, 0) + 0.0) and par(mar=c(0, 0, 4, 3) + 0.0) for the upper-left and upper-right plots, but still get an space between both plots, is there any way to completely eliminate that space? Thanks Agus -- Dr. Agustin Lobo Institut de C

Re: [R] Help with using 'get' function and variable scope

2008-04-18 Thread Peter Waltman
Hi Duncan - Thanks for the reply. Yeah, I understand what I'm doing is a bit weird, but I'm actually calling a few functions w/in the for-loop that need the value of the "i" var, and because I was a bit confused by the concept of environments, I was hoping to avoid having to pass it in as an arg

[R] Permanent change to the working directory

2008-04-18 Thread francogrex
Dear helpers, I've looked in the help files (maybe not very thoroughly but I looked) and I couldn't find a straightforward way to permanently set the working directory (where I save and read files). Each time I startup R the working dir is automatically "C:/R/bin" [using:getwd()], and I know I can

Re: [R] Permanent change to the working directory

2008-04-18 Thread Eik Vettorazzi
On windows machines you could change the `Start in' field of the desktop shortcut for R to the desired working directory - you will find this in the properties of the shortcut. You could easily create several shortcuts for different projects this way. You may also consider changing your .Rprofi

Re: [R] problem in installing R packages on linux

2008-04-18 Thread man4ish
Uwe Ligges-3 wrote: > > > > man4ish wrote: >> I am facing problem in installing the R package on linux . >> When i put the command install.packages("BART") > > The screenshot is not there, but I suspect you want to install package > "BARD" rather than "BART". > > Uwe Ligges > > >> Then i

Re: [R] Permanent change to the working directory

2008-04-18 Thread Chuck Cleland
On 4/18/2008 3:15 AM, francogrex wrote: > Dear helpers, > I've looked in the help files (maybe not very thoroughly but I looked) and I > couldn't find a straightforward way to permanently set the working directory > (where I save and read files). Each time I startup R the working dir is > automatic

[R] Is there any function to skip a loop in a for loop ?

2008-04-18 Thread Ng Stanley
Hi, Is there any function to skip a loop in a for loop ? Thanks Stanley [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

Re: [R] Is there any function to skip a loop in a for loop ?

2008-04-18 Thread Gabor Csardi
next break Another 'Introduction to R', or even ?"for" question G. On Fri, Apr 18, 2008 at 04:55:01PM +0800, Ng Stanley wrote: > Hi, > > Is there any function to skip a loop in a for loop ? > > Thanks > Stanley > > [[alternative HTML version deleted]] > > __

Re: [R] Permanent change to the working directory

2008-04-18 Thread Udo
If you have an R-icon on the desktop, use the right mouse button and go to "properties". At the "execute in" line insert your data directory "C:/R/DATA". Hope it helps Udo Zitat von francogrex <[EMAIL PROTECTED]>: > > Dear helpers, > I've looked in the help files (maybe not very thoroughly but

Re: [R] Is there any function to skip a loop in a for loop ?

2008-04-18 Thread Eik Vettorazzi
see ?next hth. Ng Stanley schrieb: > Hi, > > Is there any function to skip a loop in a for loop ? > > Thanks > Stanley > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Permanent change to the working directory

2008-04-18 Thread Prof Brian Ripley
This is answered in rw-FAQ Q2.5 ! On Fri, 18 Apr 2008, Eik Vettorazzi wrote: On windows machines you could change the `Start in' field of the desktop shortcut for R to the desired working directory - you will find this in the properties of the shortcut. You could easily create several shortcuts

Re: [R] space between plots

2008-04-18 Thread jim holtman
When I try this: layout(matrix(c(1,3,2,4),ncol=2)) par(mar=c(0, 4, 4, 0) + 0.0) plot(1) par(mar=c(0, 0, 4, 3) + 0.0) plot(2) plot(3) plot(4) the upper left and right are butted together. Exactly what 'space' are you talking about? On Fri, Apr 18, 2008 at 4:19 AM, Agustin Lobo <[EMAIL PROTECTE

[R] spdep question - Moran's I

2008-04-18 Thread Haenlein.Michael
Dear all, I would like to calculate a Moran's I statistic using the moran function in the spdep package. The problem I'm having deals with how to create the listw object. My data stems from the area of social network analysis. I have list of poeple and for each pair of them I have a measure of

[R] Vertical bars with barchart

2008-04-18 Thread G. Draisma
Hallo, What is the right way to get vertical bars in a barchart? For instance barchart(VADeaths, key=simpleKey(colnames(VADeaths),points=F,rectangles=T)) gives what I need, only I would like the bars to be vertical. But barchart(VADeaths,horizontal=F, key=simpleKey(colnames(VADeaths),p

Re: [R] problem in installing R packages on linux

2008-04-18 Thread Neil Shephard
man4ish wrote: > > > No i am trying to install BART which is valid name , i have 30-40 times > for other packages still facing the same pblm .How can i rectify > this.Please help me out. > Rather than sending a screenshot of a terminal (and note the posting guidelines with regards to attachm

Re: [R] problem in installing R packages on linux

2008-04-18 Thread Stefan Grosse
On Fri, 18 Apr 2008 01:47:43 -0700 (PDT) man4ish wrote: M> > The screenshot is not there, but I suspect you want to install M> > package "BARD" rather than "BART". M> > M> > Uwe Ligges M> No i am trying to install BART which is valid name , i have 30-40 M> times for other packages still facing th

Re: [R] Matched pairs with two data frames

2008-04-18 Thread Patrick Connolly
On Wed, 16-Apr-2008 at 11:58AM +0200, Udo wrote: |> I only "need" line 1, 6 and 9. To show this, |> I added "needed" by hand. |> |>age school out1 out2 needed |> 11 10 9.5 1.1 yes |> 21 10 9.5 2.0 no |> 31 10 9.5 3.5 no |> 4

Re: [R] Vertical bars with barchart

2008-04-18 Thread Stefan Grosse
On Fri, 18 Apr 2008 12:00:13 +0200 G. Draisma wrote: GD>barchart(VADeaths,horizontal=F, GD>key=simpleKey(colnames(VADeaths),points=F,rectangles=T)) GD> does not give what I need, Works for me. Do you have the current R (2.6.2) and lattice? btw. it also works with barchart(VADeaths, horizo

[R] Working with graphs.

2008-04-18 Thread hoogeebear
Hi, Im created some pie charts using R. I have two segments, I am just wondering how can I add a number to each segment that represents each each segment? Also is there a way to change the colors of each segment? Sorry if this frustrates anyone because of its simplicity, but I am new to R. Tha

Re: [R] Working with graphs.

2008-04-18 Thread jim holtman
?pie Look at the example which I think addresses most of your questions On Fri, Apr 18, 2008 at 6:31 AM, hoogeebear <[EMAIL PROTECTED]> wrote: > > Hi, > > Im created some pie charts using R. I have two segments, I am just wondering > how can I add a number to each segment that represents each eac

Re: [R] Help with using 'get' function and variable scope

2008-04-18 Thread Gabor Grothendieck
If you define your functions in the loop you can it directly since then the scoping rules work in your favor: for(i in 1:4) { f <- function() i*i print(f()) } or via lapply: F <- function(i) { f <- function() i*i; print(f()) } lapply(1:4, F) Often the sort of situation you discuss is really

[R] problem in installing R packages on linux

2008-04-18 Thread Niels Steen Krogh
install.packages("BayesTree") Is my guess for using function BART /Niels Niels Steen Krogh Konsulent ZiteLab ApS Mail: -- [EMAIL PROTECTED] Telefon: --- +45 38 88 86 13 Mobil: - +45 22 67 37 38 Adresse: --- ZiteLab ApS Solsortvej 44 d

[R] [R-pkgs] RExcelInstaller

2008-04-18 Thread Erich Neuwirth
RExcelInstaller_2.0-15 installs RExcel, an add-in for Excel, which connects R and Excel. RExcel allows to transfer data between R and Excel, writing VBA macros using R as a library for Excel, and calling R functions as worksheet function in Excel. RExcel integrates nicely with R Commander (Rcmdr)

Re: [R] Problem with links in R website

2008-04-18 Thread Friedrich . Leisch
> On Thu, 17 Apr 2008 11:36:30 +0100, > Robin Taylor (RT) wrote: > Not sure who to send this to... > On the books page http://www.r-project.org/doc/bib/R-books.html the entries > from [54] down have three forward slashes in the hyperlinks to publisher > info and so they don't work

Re: [R] Help with using 'get' function and variable scope

2008-04-18 Thread Duncan Murdoch
On 18/04/2008 7:27 AM, Gabor Grothendieck wrote: > If you define your functions in the loop you can it directly > since then the scoping rules work in your favor: > > for(i in 1:4) { > f <- function() i*i > print(f()) > } f doesn't need to be in the loop, it just needs to be defined in the s

[R] ts.plot() labeling x-axis

2008-04-18 Thread Pologruto, Thomas
Hello, I have tried a few variants of a solution from the previous posts, but perhaps my syntax is wrong. I am using ts.plot(data_as_columns) and would like the label the x axis using some labels (in my case minutes after 9am). Any ideas how to use the plot params and the Axis function to accomp

Re: [R] Meaning of /, :, and %in% in lmer

2008-04-18 Thread Douglas Bates
On 4/16/08, Claus Wilke <[EMAIL PROTECTED]> wrote: > Hello, > I asked this question a little while ago ( > https://stat.ethz.ch/pipermail/r-help/2008-April/158761.html ) but got no > response. Can anybody explain to me the difference between /, :, and %in% in > the definition of random effects

[R] Function redefinition - not urgent, but I am curious

2008-04-18 Thread Alberto Monteiro
This is just my curiousity working. Suppose I write: f1 <- function(x) x + 1 f2 <- function(x) 2 * f1(x) f2(10) # 22 f1 <- function(x) x - 1 f2(10) # 18 This is quite obvious. But is there any way to define f2 in such a way that we "freeze" the definition of f1? f1 <- function(x) x + 1 f2 <- fu

Re: [R] validation of logistic regression model with weighted presences and absences

2008-04-18 Thread Frank E Harrell Jr
Eva Mosner wrote: > Hello everyone! > > I want to validate logistic regression models of species distrubution > data where presences and absences are weighted differently. > I used lrm from Design package but unfortunately, validate.lrm ignores > weights in the validation process. > Has anyone an

Re: [R] Function redefinition - not urgent, but I am curious

2008-04-18 Thread Gabor Grothendieck
Try f2 <- local({f1 <- f1; function(x) 2 * f1(x) }) On Fri, Apr 18, 2008 at 8:22 AM, Alberto Monteiro <[EMAIL PROTECTED]> wrote: > This is just my curiousity working. > > Suppose I write: > > f1 <- function(x) x + 1 > f2 <- function(x) 2 * f1(x) > f2(10) > # 22 > f1 <- function(x) x - 1 > f2(10)

Re: [R] Constrained Nelder-Mead

2008-04-18 Thread Ben Bolker
ipc.com.co> writes: > > Dear Mr, > > I saw by the web your request about the code in Language C of the method Nelder-Mead with constraints, > I would like if you got the program, it's posible you can help us to get the code in C, > This doesn't make much sense. I can imagine that you're

[R] Labels in cluster nodes

2008-04-18 Thread Ramon Hidalgo
Hello all, I am novice in R, I've started to work with cluster, and in the cluster i obtain: $merge [,1] [,2] [1,] -1 -2 [2,] -3 1 $height [1] 2.291288 3.834058 $order [1] 1 2 3 When i use plot, obtain (in 'chargraphics'): | --- | | |

Re: [R] Function redefinition - not urgent, but I am curious

2008-04-18 Thread Dimitris Rizopoulos
you could define 'f1' inside 'f2' or assign 'f1' to a new environemnt (or use local()): # 1st f2 <- function(x){ f1 <- function(x) x + 1 2 * f1(x) } f2(10) f1 <- function(x) x - 1 f2(10) # 2nd myenv <- new.env() assign("f1", function(x) x + 1, myenv) f2 <- function(x){ f1 <- get("f1

Re: [R] 3-D-Plot

2008-04-18 Thread Uwe Ligges
Edwin Sendjaja wrote: > Hi Uwe, > > I decided to use scatterplot3d, because it looks better. > I have some questions: > > Is it possible to get 1 axis( for example: z-axis) not as numeric, but as > character. > > Because I have date set like this: > > x=relative Time: 0,3 ms; 0,5ms, etc > y=

Re: [R] space between plots

2008-04-18 Thread Agustin Lobo
ok, I see: I was confused because the box goes a bit beyond the axes: layout(matrix(c(1,3,2,4),ncol=2)) par(mar=c(0, 4, 4, 0) + 0.0) plot(1,yaxt="n") par(mar=c(0, 0, 4, 3) + 0.0) plot(2,bty="n",yaxt="n") ...and I'm not plotting the box in my graphic. Thanks Agus jim holtman escribió: > When I tr

Re: [R] spatialpixelsdataframe

2008-04-18 Thread Dave Depew
Thanks Paul, Will keep that in mind for my next query :-) Paul Hiemstra wrote: > Dave Depew wrote: >> I have a spatialpixelsdataframe containing bathymetry data. Is it >> possible to save this as something similar to the meuse.grid so it >> can be loaded without having to run the spatial in

Re: [R] survreg with frailty

2008-04-18 Thread Terry Therneau
The combination of survreg + gamma frailty = invalid model, i.e., the example that you quote. I did not realize that this had been added to the survreg help file until very recently. I will try to fix the oversight. Other, more detailed documentation states that Gaussian frailty + AIC

Re: [R] Help with using 'get' function and variable scope

2008-04-18 Thread Gabor Grothendieck
On Fri, Apr 18, 2008 at 7:49 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 18/04/2008 7:27 AM, Gabor Grothendieck wrote: > > If you define your functions in the loop you can it directly > > since then the scoping rules work in your favor: > > > > for(i in 1:4) { > > f <- function() i*i > > p

Re: [R] vector in filename

2008-04-18 Thread hadley wickham
On Thu, Apr 17, 2008 at 8:05 PM, [Ricardo Rodriguez] Your XEN ICT Team <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to generate a group of graphics with an iteration. Some > thing like this... > > x=1 > y=1 > max=10 > myfiles <- paste("foo", x:max, ".png", sep="") > while (x =< max) >

Re: [R] Help with using 'get' function and variable scope

2008-04-18 Thread Duncan Murdoch
On 4/18/2008 9:19 AM, Gabor Grothendieck wrote: > On Fri, Apr 18, 2008 at 7:49 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> On 18/04/2008 7:27 AM, Gabor Grothendieck wrote: >> > If you define your functions in the loop you can it directly >> > since then the scoping rules work in your favor: >>

Re: [R] Matched pairs with two data frames

2008-04-18 Thread David Winsemius
Udo <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Daniel, > thank you! > > I want to perfrom the simplest way of matching: > a one-to-one exact match (by age and school): > for every case in "treat" find ONE case (if there is one) in > "control" . The cases in "control" that could be ma

[R] R CMD check Error

2008-04-18 Thread Johannes Graumann
Hi, Can anyone give me a hint on what's wrong if "R CMD check " gives me this error: Rd files with unknown encoding: .Rd I have checked that file over and over and can't find any weired characters or some such. How can I fix this? Thanks for your time, Joh ___

[R] [R-pkgs] new candisc package on CRAN

2008-04-18 Thread Michael Friendly
I'm happy to announce the candisc package, v 0.5-9, now on CRAN. Generalized Canonical Discriminant Analysis Description This package includes functions for computing and visualizing generalized canonical discriminant analyses for a multivariate linear model. They are designed to provide low-ra

Re: [R] vector in filename

2008-04-18 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Hadley, hadley wickham wrote: > Have you looked at ?png : > > filename: the name of the output file. The page number is substituted > if a C integer format is included in the character string, as > in the default. (The result must be less than 'PATH_MAX' > cha

Re: [R] vector in filename

2008-04-18 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi Richard, thanks for your input! Richard Rowe wrote: > which figures if you look at what you are doing line by line ... try it > > > try something like: > > max=10 > > for (i in 1:max){ > myfiles <- paste("foo", i, ".png", sep="") # generates names > foo1.png, foo2.png, etc > png(file=m

Re: [R] R CMD check Error

2008-04-18 Thread Prof Brian Ripley
On Fri, 18 Apr 2008, Johannes Graumann wrote: > Hi, > > Can anyone give me a hint on what's wrong if "R CMD check " gives > me this error: > >Rd files with unknown encoding: > .Rd > > I have checked that file over and over and can't find any weired characters > or some such. > How

[R] rzinb (VGAM) and dnbinom in optim

2008-04-18 Thread Tim Howard
Dear R-help gurus (and T.Yee, the VGAM maintainer) - I've been banging my head against the keyboard for too long now, hopefully someone can pick up on the errors of my ways... I am trying to use optim to fit a zero-inflated negative binomial distribution. No matter what I try I can't get optim

Re: [R] vector in filename

2008-04-18 Thread [Ricardo Rodriguez] Your XEN ICT Team
Mark, Mark Leeds wrote: > Oh, I'm sorry that didn't work. If you have time, can you resend it to me if > you still have it ( I don't ) cause I'd like to see why. Thanks. My fault! It does work! I've tried it this morning quickly, before leaving my SOHO, and it seems I was making any mistake. It

[R] help me to debug this part of code?

2008-04-18 Thread jinjin
I am trying to solve the integration equation, for different values of K from 4 to 25, the integration is with respect to u, Here is the equation:gamma(k/2) / ( sqrt(k-1)*gamma((k-1)/2) ) * integrate(f= (1+u^2/k-1)^(-k/2), lower=0, upper= sqrt(a^2*k/(k+1-a^2)) ) = the similar expression as t

Re: [R] Overall p-value from a factor in a coxph fit

2008-04-18 Thread Paul Johnson
On Fri, Apr 18, 2008 at 3:06 AM, Kåre Edvardsen <[EMAIL PROTECTED]> wrote: > Hi all. > > If I run the simple regression when x is a categorical variable ( x <- > factor(x) ): > > > MyFit <-coxph( Surv(start, stop, event) ~ x ) > > How can I get the overall p-value on x other than for each dummy

Re: [R] Problems with R2WinBUGS

2008-04-18 Thread isabella
Hello, Further to my previous e-mail, I think I know why I am having problems with the initialization of model parameters in R2WinBUGS. My model.bug file contains a portion of code which defines some pairwise odds ratios (e.g., or[1,2], or[1,3], or[1,4], or[2,3], or[2,4], or[3,4]

[R] Legend Clipping

2008-04-18 Thread Beck, Kenneth (STP)
I am having trouble with legends clipping, not sure how to control that. Here is my latest code to demo. I want the legend to show up in the center of the window, in fairly large font. Right now, font is too small, but if I increase it, the legend clips even more. In this simplified example, the pl

Re: [R] rzinb (VGAM) and dnbinom in optim

2008-04-18 Thread Katharine Mullen
I'm not going to look into what's happening in-depth but it looks like the bounds for your parameters need to be set with care; the below (with slight re-def. of your residual function) gives results that seem to match vglm approximately, with 1e-10 standing in for a bound of 0 and 1-e-10 standing

Re: [R] Overall p-value from a factor in a coxph fit

2008-04-18 Thread Frank E Harrell Jr
Paul Johnson wrote: > On Fri, Apr 18, 2008 at 3:06 AM, Kåre Edvardsen <[EMAIL PROTECTED]> wrote: >> Hi all. >> >> If I run the simple regression when x is a categorical variable ( x <- >> factor(x) ): >> >> > MyFit <-coxph( Surv(start, stop, event) ~ x ) >> >> How can I get the overall p-value

Re: [R] Response to R across the university

2008-04-18 Thread Peter Dalgaard
Antony Unwin wrote: > ... > > The course itself went very well. We encouraged people to bring their > laptops and work in groups. Using JGR as the interface to R helped a > lot, as it was easier for people to load their own data and use the > help. Of course, JGR is compulsory in Augsburg

Re: [R] help me to debug this part of code?

2008-04-18 Thread Charles C. Berry
On Fri, 18 Apr 2008, jinjin wrote: > > I am trying to solve the integration equation, for different values of K from > 4 to 25, the integration is with respect to u, > > Here is the equation:gamma(k/2) / ( sqrt(k-1)*gamma((k-1)/2) ) * > integrate(f= (1+u^2/k-1)^(-k/2), lower=0, upper= sqrt(a^2

Re: [R] problem in installing R packages on linux

2008-04-18 Thread Liviu Andronic
On Fri, Apr 18, 2008 at 1:28 PM, Niels Steen Krogh <[EMAIL PROTECTED]> wrote: > install.packages("BayesTree") > What is the error message? Liviu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Legend Clipping

2008-04-18 Thread Beck, Kenneth (STP)
I am having trouble with legends clipping, not sure how to control that. Here is my latest code to demo. I want the legend to show up in the center of the window, in fairly large font. Right now, font is too small, but if I increase it, the legend clips even more. In this simplified example, the pl

Re: [R] efficiently replacing values in a matrix

2008-04-18 Thread Nnamdi
Still it is pretty slow when entering values into a large matrix. Case in point: > a <- matrix(nrow=1,ncol=1) > system.time(a[1,1] <- 1903908.80385) user system elapsed 30.840 6.226 41.416 > is.matrix(a) [1] TRUE Is there a better way to enter values into large matrices? If I hav

Re: [R] Legend Clipping

2008-04-18 Thread Beck, Kenneth (STP)
Here is a better example. I am also trying to put gaps between the bars on the graphs, and this work-around is the only way I can make it work satisfactorily. Any suggestions about that? windows(); nf <- layout(matrix(c(1,2,5,0,3,4),3,2,byrow=TRUE), c(2.2,2.2), c(2.2,1,2.2), TRUE) layout.show(nf);

[R] Fw: efficiently replacing values in a matrix

2008-04-18 Thread Nnamdi
- Forwarded Message From: Nnamdi <[EMAIL PROTECTED]> To: roger koenker <[EMAIL PROTECTED]> Sent: Friday, April 18, 2008 1:08:58 PM Subject: Re: [R] efficiently replacing values in a matrix I tried the sparse matrix implementation, still there are issues: a <- matrix(nrow=1,ncol=10

Re: [R] efficiently replacing values in a matrix

2008-04-18 Thread Matthew Keller
Nanmdi, I think this is simply because a lot of time is taken transforming the matrix from logical (default when you create it) to numeric (when you add the number to [1,1]. If you do the same thing again to [1,2], it is done instantaneously: > a <- matrix(nrow=1,ncol=1) > system.time(a[1,

[R] RPy

2008-04-18 Thread Doran, Harold
I'm curious if there are users of RPy on this list. I've recently created a gui front end using Tkinter for some python scripts I've written for some of our internal operations and I am quite pleased with how this program works. I wonder if it is possible to also get this gui to run R functions t

[R] Correspondence and detrended correspondence analysis

2008-04-18 Thread Monica Pisica
Hi, I hope someone knows the answer to this or has a real good reference about it (I am using Legendre & Legendre, Numerical Ecology, 1998) My data is a data.frame with locations as rows and vegetation assemblages / species as columns. I've done a PCA, a correspondance analysis (CA) using

[R] Embedding fonts in pdfs

2008-04-18 Thread hadley wickham
Hi all, I'm having problems embedding fonts in my graphics - and I've tried embedFonts to no avail. I have a pdf file and pdffonts tells me: name type emb sub uni object ID - --- --- --- - Z

Re: [R] Embedding fonts in pdfs

2008-04-18 Thread Jeffrey Horner
hadley wickham wrote on 04/18/2008 02:40 PM: > Hi all, > > I'm having problems embedding fonts in my graphics - and I've tried > embedFonts to no avail. I have a pdf file and pdffonts tells me: > > name type emb sub uni object ID > ---

[R] using rbind() on multiple objects at once

2008-04-18 Thread Andrew Yee
Is there an efficient way to use rbind() with the five dataframes described in the following example: a <- c(1:5) list.foo <- lapply(a, function(x) data.frame(beta=a*rnorm(10), deta=a*rnorm(10))) big.data.frame <- rbind(list.foo[[1]], list.foo[[2]], list.foo[[3]], list.foo[[4]], list.foo[[5]]) #is

Re: [R] using rbind() on multiple objects at once

2008-04-18 Thread Katharine Mullen
do.call(rbind, list.foo) On Fri, 18 Apr 2008, Andrew Yee wrote: > Is there an efficient way to use rbind() with the five dataframes described > in the following example: > > a <- c(1:5) > list.foo <- lapply(a, function(x) data.frame(beta=a*rnorm(10), > deta=a*rnorm(10))) > big.data.frame <- rbin

[R] Bug in Merge?

2008-04-18 Thread Edwin Sendjaja
Hello, I find strange number in my merge data set. My first coloumn consist row numbers. --- my.data: AbsTime RelTime PE_IDEvent Delay 4238 1208514343.812086107.153637 4 EKA

Re: [R] Response to R across the university

2008-04-18 Thread Antony Unwin
On 18 Apr 2008, at 6:42 pm, Peter Dalgaard wrote: > Antony Unwin wrote: >> ... >> >> The course itself went very well. We encouraged people to bring >> their laptops and work in groups. Using JGR as the interface to R >> helped a lot, as it was easier for people to load their own data >

Re: [R] R CMD check Error

2008-04-18 Thread Johannes Graumann
On Friday 18 April 2008 16:35:12 Prof Brian Ripley wrote: > On Fri, 18 Apr 2008, Johannes Graumann wrote: > > Hi, > > > > Can anyone give me a hint on what's wrong if "R CMD check " > > gives me this error: > > > >Rd files with unknown encoding: > > .Rd > > > > I have checked that

[R] Line-wrap problem

2008-04-18 Thread Matthew Fero
I'm wondering if someone can tell me how R determines where to wrap lines in its output. I'd like to understand this because occasionally often after running a script the output of R no longer wraps at the correct location. For example, the statement, '1:40' would ordinarily return somethin

[R] 2.2e-16 a magic number? ks.test help

2008-04-18 Thread Ashton, Gail
Hello, I'm trying to test my data for normality. I enter the data (95ish species counts) run >ks.test (data,pnorm) and get a p- value <2.2e-16 But this seems to be the p-value no matter what the data I enter. (I have multiple datasets and am testing them all for normality). [Actually, I just ente

Re: [R] Response to R across the university

2008-04-18 Thread Peter Dalgaard
Antony Unwin wrote: > >> A couple other maybe not all that trivial things to do is to improve >> the data import (it is losing out on most of the things that I tried) > > Now what would Brian say to a comment like that? Please insert your > favourite put-down here: > >

Re: [R] help me to debug this part of code?

2008-04-18 Thread francogrex
There are a lot of syntax errors such as unclosed parentheses, missing commas etc; Example: exp@(@lgamma((k+1)/2)-lgamma(k/2)*1/sqrt(k), where the parenthesis between the @s is not closed. I suggest you get an editor such as "Tinn" that can highlight those for you. In addition I notice that you us

Re: [R] Bug in Merge?

2008-04-18 Thread Peter Dalgaard
Edwin Sendjaja wrote: > Hello, > > > I find strange number in my merge data set. > > My first coloumn consist row numbers. > > --- > my.data: > > > AbsTime RelTime PE_IDEvent Delay > > 4238 12085143

Re: [R] using rbind() on multiple objects at once

2008-04-18 Thread Andrew Yee
Thanks! On 4/18/08, Katharine Mullen <[EMAIL PROTECTED]> wrote: > do.call(rbind, list.foo) > > On Fri, 18 Apr 2008, Andrew Yee wrote: > > > Is there an efficient way to use rbind() with the five dataframes > described > > in the following example: > > > > a <- c(1:5) > > list.foo <- lapply(a, f

[R] Distribution Graph Idea/Help

2008-04-18 Thread Derek Ogle
For pedagogical reasons (i.e., moving a way from tables of distributions) I want to plot a probability density or distribution function with a shaded area corresponding to the calculated value or user input. For example, I want a plot to visually demonstrate the result of pnorm(1.3) I have

[R] Problem with JGR_1.5-18

2008-04-18 Thread Michael Kubovy
R version 2.7.0 Under development (unstable) (2008-03-04 r44677) i386-apple-darwin8.10.1 locale: C attached base packages: [1] grid grDevices datasets graphics stats utils methods base other attached packages: [1] lattice_0.17-6 MASS_7.2-41JGR_1.5-18 iplots_1.1-2 J

[R] How to insert a vector or matrix into an existing matrix

2008-04-18 Thread Ng Stanley
Hi, Is there any functions to insert a vector or matrix into an existing matrix say between row 5 and 6 or column 8 and 9, without creating a temporary matrix ? Thanks Stanley [[alternative HTML version deleted]] __ R-help@r-project.org mailin

Re: [R] eval and parent.frame [was: Error in Design package: dataset not found for options(datadist)]

2008-04-18 Thread Gad Abraham
Charles C. Berry wrote: > On Fri, 18 Apr 2008, Gad Abraham wrote: > >> Frank E Harrell Jr wrote: >>> Gad Abraham wrote: Hi, Design isn't strictly an R base package, but maybe someone can explain the following. When lrm is called within a function, it can't find the da

Re: [R] 2.2e-16 a magic number? ks.test help

2008-04-18 Thread Prof Brian Ripley
It says 'less than 2.2e-16'. The print() method does not report smaller values, because they may not be computed as accurately as they appear. Note that the tests do different things, and you have not shown us how you used them. The Shapiro-Wilk test tests normality (any normal, with variable

[R] multiple separators in sep argument for read.table?

2008-04-18 Thread Johan Jackson
Hello, Is there any way to add multiple separators in the sep= argument in read.table? I would like to be able to create different columns if I see a white space OR a "/". Thanks in advance, JJ [[alternative HTML version deleted]] __ R-help@r

Re: [R] R CMD check Error

2008-04-18 Thread Prof Brian Ripley
One thing I should add for the archives -- R 2.7.0 and later have o New function showNonASCII() in package tools to aid detection of non-ASCII characters in .R and .Rd files. On Fri, 18 Apr 2008, Prof Brian Ripley wrote: > On Fri, 18 Apr 2008, Johannes Graumann wrote: > >> Hi, >>

[R] Mantel-Haenszel for 2x2

2008-04-18 Thread Dr. Jeff Miller
Hi all, Does anyone know if an R function for the Mantel-Haenszel chi-square for a 2x2 table exists? I’ve also seen it called the randomization Q statistic. Note that I’m not looking for the Cochran-Mantel-Haenszel…I did see that out there as cmh.test. Thanks in advance, Jeff Internal

Re: [R] multiple separators in sep argument for read.table?

2008-04-18 Thread Prof Brian Ripley
On Sat, 19 Apr 2008, Johan Jackson wrote: > Hello, > > Is there any way to add multiple separators in the sep= argument in > read.table? I would like to be able to create different columns if I see a > white space OR a "/". No. read.table() uses scan(), and that requires 'sep' to be a single ch