Re: [R] Doubt about CCA and PCA

2009-11-23 Thread Jari Oksanen
Jombart, Thibaut imperial.ac.uk> writes: > > Dear Francisco, > > CCA and PCA are quite different methods. CCA regresses your 'response' data onto a set of explanatory > variables. This needs to invert the matrix of covariances of the predictors, which is only possible if > n>p, where n is the

[R] How to interpret the phase spectrum?

2009-11-23 Thread sdlywjl666
Dear all, I would like to know whether positive or negative values of the phase spectrum indicate that the time series leads or lags. In my work, x and y have peak nearly at the same frequency,(eg:f=1/56);and the coherency is peak where f=1/56,the phase is 0.5 where f=1/56. Can I get the

Re: [R] List Name help

2009-11-23 Thread Linlin Yan
On Tue, Nov 24, 2009 at 1:01 AM, Henrique Dallazuanna wrote: > Try this: > > test[grep("d2", names(test))] > Or it can be simply like this: test[names(test) == "d2"] > On Mon, Nov 23, 2009 at 2:53 PM, Rajasekaramya > wrote: >> >> Hi There, >> >> I have a named List object.I want to access all

Re: [R] how to tell if its better to standardize your data matrix first when you do principal

2009-11-23 Thread masterinex
Actually Its for an assignment Michael , all Im looking is some help and suggestions , please dont get it wrong , and I do believe that this is a helpful community . > > This sounds a bit like homework. If that is the case, please ask your > teacher rather than this list. > Anyway, it doe

[R] Cannot set wireframe ticks?

2009-11-23 Thread Fredrik Johansson
I have an issue when making a wireframe plot. I can't find any way to change the number of ticks on the labels. I try to set it in the code below with z.ticks=1, but that doesn't work. Is there anything that works? (Note. I need to use wireframe. persp is out of the question since I want mathematic

Re: [R] ow to have R automatically print traceback upon errors

2009-11-23 Thread jim holtman
I use this: options(error=utils::recover) and anytime an error occurs in the interactive mode, it will print out the traceback and then allow you to explore the variables at each level of the stack; just like putting 'browser()' in the code at the error point. Here is what I get in running under

Re: [R] Re moving rows which do not satisfy a condition

2009-11-23 Thread David Winsemius
Bill Dunlap sent me a couple of more compact versions and perhaps forgot the hit "reply all": Data[ Data[,1]^2 + Data[,2]^2 >= 49, , drop=FALSE] And a second one that handles higher dimensions than 2, still with and L2 metric: Data[ rowSums(Data^2)>49, , drop=FALSE] -- David Winsemius

Re: [R] Adding to the years ...

2009-11-23 Thread Gabor Grothendieck
There is some question of what should be returned if its Feb 29th and in 6 years Feb only has 28 days; however, that aside try this which does not involve any internals and works for both Date and chron dates: > y6 <- function(x) { + for(i in seq_along(x)) x[i] <- tail(seq(x[i], len = 7, by = "yea

[R] Grouped Boxplot

2009-11-23 Thread Gary
Hi R Users, I'm interested in plotting a grouped boxplot (please see attached file for sample). Can anyone suggest a function{package} which can help me achieve this. Thanks, Gary __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] how to tell if its better to standardize your data matrix first when you do principal

2009-11-23 Thread Michael Kubovy
On Nov 22, 2009, at 10:22 AM, Uwe Ligges wrote: > masterinex wrote: >> Hi guys , Im trying to do principal component analysis in R . There is 2 >> ways of doing >> it , I believe. One is doing principal component analysis right away the >> other way is standardizing the matrix first using s =

[R] Adding to the years ...

2009-11-23 Thread Rolf Turner
I have a character vector of dates, comme ci: > irving [1] "12/05/1987" "11/07/1986" "08/29/1987" "01/26/1988" "06/21/1988" [6] "03/17/1987" "02/24/1988" "10/04/1986" "03/19/1987" "01/02/1987" For reasons best known to myself ( ;-) ) I want to add six years to the year in each of these dates

Re: [R] Configuring R-2.10 help html server on Linux?

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 7:13 PM, Tom Wainwright wrote: On 11/23/2009 04:39 PM, Marc Schwartz wrote: ... The proxy issue is referenced in ?tools::startDynamicHelp, which is linked from ?help.start: "Details ... The browser in use does need to be able to connect to the loopback interface: occasio

[R] R 2.10.0 (Snow Leopard) doesn't remember updates

2009-11-23 Thread Michael Kubovy
I'm writing to this list rather than the Mac one, b/c I don't know if this problem is particular to the OS. I recently moved to 2.10 under Snow Leopard: R version 2.10.0 (2009-10-26) x86_64-apple-darwin9.8.0 locale: [1] C/C/en_US/C/C/C attached base packages: [1] stats graphics grDevice

[R] random effects correlation in lmer

2009-11-23 Thread Kurt Smith
I am having an issue with lmer that I wonder if someone could explain. I am trying to fit a mixed effects model to a set of longitudinal data over a set of individual subjects: (fm1 <- lmer(x ~ time + (time|ID),aa)) I quite often find that the correlation between the random effects is 1.0: Linea

Re: [R] Configuring R-2.10 help html server on Linux?

2009-11-23 Thread Tom Wainwright
On 11/23/2009 04:39 PM, Marc Schwartz wrote: ... The proxy issue is referenced in ?tools::startDynamicHelp, which is linked from ?help.start: "Details ... The browser in use does need to be able to connect to the loopback interface: occasionally it is set to use a proxy for HTTP on all interf

[R] R extra package problem.

2009-11-23 Thread loderunner
Hi there, After a little work i got R2.10.0 to compile on my solaris 10 64 bit computers. However the extra packages dont seem to install when i run: install.packages(CRAN.packages()[,1]) Also at the tail end of the make there was an error that stated it could not compile certain recommended pac

Re: [R] Doubt about CCA and PCA

2009-11-23 Thread Jombart, Thibaut
Dear Francisco, CCA and PCA are quite different methods. CCA regresses your 'response' data onto a set of explanatory variables. This needs to invert the matrix of covariances of the predictors, which is only possible if n>p, where n is the number of observations and p the number of explanator

Re: [R] can't use function vcov with a GAMLSS object??

2009-11-23 Thread Chris Howden
Hi everyone, I'm trying to use function vcov to extract the covariance matrix from a GAMLSS object. But I'm getting some strange errors and I was hoping someone could help me out? Vcov works with the same model for lm and glm objects, but not gamlss objects. I've searched various help sites to

Re: [R] Configuring R-2.10 help html server on Linux?

2009-11-23 Thread Tom Wainwright
Rolf, Many thanks! That was it exactly. I had forgotten we use a proxy server here. Tom Wainwright On 11/23/2009 04:01 PM, Rolf Turner wrote: On 24/11/2009, at 12:21 PM, Tom Wainwright wrote: Hi, My Fedora 11 linux (version 2.6.30.9-96.fc11.x86_64 #1 SMP Wed Nov 4 00:02:04 EST 20

[R] ow to have R automatically print traceback upon errors

2009-11-23 Thread Hao Cen
Hi, I wonder how to have R automatically print stack trace produced by traceback upon errors during interactive uses. I tried the suggestions on http://old.nabble.com/Automatically-execute-traceback-when-execution-of-script-causes-error--td22368483.html#a22368775 and used options(error = recover)

Re: [R] Configuring R-2.10 help html server on Linux?

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 6:01 PM, Rolf Turner wrote: On 24/11/2009, at 12:21 PM, Tom Wainwright wrote: Hi, My Fedora 11 linux (version 2.6.30.9-96.fc11.x86_64 #1 SMP Wed Nov 4 00:02:04 EST 2009) recently updated me to R-2.10.0, and help.start() is no longer working. I see in the release note

[R] problem: howto see ylim (or equivalent) within a custom panel function

2009-11-23 Thread Dan Kortschak
Hello, I am plotting a set of data where subsets are of different length and not all sites are noted in the data sets. To indicate the extent of sites, I am marking this with a line on the xyplot being produced: require(lattice) lengths<-as.integer(runif(10)*100) results <- matrix(ncol=3) for (i

[R] How to calculate standard errors of predictions based on the fixed effects? lmer

2009-11-23 Thread willow1980
Dear R users, I have posted a similar message in the following link: http://old.nabble.com/standard-error-for-the-estimated-value-(lmer-fitted-model)-td26414507.html However, I did not get responses. I guess my question is not clear. Now, I would like to clarify it and if someone is familiar with

Re: [R] Configuring R-2.10 help html server on Linux?

2009-11-23 Thread Rolf Turner
On 24/11/2009, at 12:21 PM, Tom Wainwright wrote: Hi, My Fedora 11 linux (version 2.6.30.9-96.fc11.x86_64 #1 SMP Wed Nov 4 00:02:04 EST 2009) recently updated me to R-2.10.0, and help.start() is no longer working. I see in the release notes that R now uses an internal web server to aut

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 12:50 PM, David Winsemius wrote: On Nov 20, 2009, at 1:27 PM, David Winsemius wrote: On Nov 20, 2009, at 11:07 AM, RWilliam wrote: In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the "X2" part of coxph( S

Re: [R] how to change the class of a group of objects

2009-11-23 Thread Henrique Dallazuanna
Try this: assign("a", `class<-`(get("a"), "character")) On Mon, Nov 23, 2009 at 8:51 PM, Ben Mazzotta wrote: > Dear R users, > > I would like to change the class of a group of objects in R memory from > "numeric" to "dist". I can manipulate the class using > > class(foo) <- bar > > but I cannot

[R] Configuring R-2.10 help html server on Linux?

2009-11-23 Thread Tom Wainwright
Hi, My Fedora 11 linux (version 2.6.30.9-96.fc11.x86_64 #1 SMP Wed Nov 4 00:02:04 EST 2009) recently updated me to R-2.10.0, and help.start() is no longer working. I see in the release notes that R now uses an internal web server to autogenerate help pages. Here's what I'm getting: IN R:

Re: [R] how to change the class of a group of objects

2009-11-23 Thread Erik Iverson
Ben, In general, when you define a, b, and c as below, the c() wrapper is not needed, since the : operator returns a vector anyway. Also, best not to name variables 'c' to avoid confusion with the function you're using. Regarding your actual question, lapply(list(a, b, c), "class<-", "dist")

Re: [R] Re moving rows which do not satisfy a condition

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 2:57 PM, sandsky wrote: Hello, Considering 5 points in X-Y plain. Data is a 5*2 matrix (5 rows for samples & 2 columns for X and Y) With a distance from the origin, if a distance < 7, remove the row from the Data. After calculating the distance for each point, I can

Re: [R] Translation from R codes to SAS.

2009-11-23 Thread Gary
Until someone agrees to your request, you may want to look into this book: http://www.amazon.com/SAS-Management-Statistical-Analysis-Graphics/dp/1420070576 ~Gary On Mon, Nov 23, 2009 at 4:35 PM, ychu066 wrote: >

[R] how to change the class of a group of objects

2009-11-23 Thread Ben Mazzotta
Dear R users, I would like to change the class of a group of objects in R memory from "numeric" to "dist". I can manipulate the class using class(foo) <- bar but I cannot get the same command to work on groups of variables. When I use for() loops and lists of names, inevitably I have to specify

[R] Re moving rows which do not satisfy a condition

2009-11-23 Thread sandsky
Hello, Considering 5 points in X-Y plain. Data is a 5*2 matrix (5 rows for samples & 2 columns for X and Y) With a distance from the origin, if a distance < 7, remove the row from the Data. After calculating the distance for each point, I can't forward because of this "Removing" problem. Anyone

[R] Trellis Plot

2009-11-23 Thread ychu066
anyone know how to add text in the Trellis plot panel ?? i want to add things eg: dot dot dot. in the headrer of the panel. eg: http://old.nabble.com/file/p26486579/hist1.png hist1.png -- View this message in context: http://old.nabble.com/Trellis-Plot-tp26486579p26486579.html Sent from the R

[R] Translation from R codes to SAS.

2009-11-23 Thread ychu066
my teachers doesnt understand R and I don't know how to use SAS. Anyone interested in translating my codes to test whether your SAS codes are as good as R??? I can test it on SAS codes once you have translated it regards:working: -- View this message in context: http://old.nabble.com

Re: [R] plot filled.contour over continent map

2009-11-23 Thread Ray Brownrigg
You just have to RTFM! ?filled.contour tells you you cannot add points (or lines) to a finished plot, and tells you how to do what you want. So, based on your most recent offline message, try: filled.contour(x, y, mslp, zlim = c(1000,1020), color.palette = colorRampPalette(c("blue", "lightbl

Re: [R] problem selecting 330 to 30 longitude

2009-11-23 Thread Paul Hiemstra
Hi Nora, Take a look at using the sp-classes to represent spatial data. Take a look at the spatial task view [1] for some pointers on how to read data into sp-objects (rgdal package) and at solving your particular problem (overlay from the sp-package). Also you could consider reposting your q

Re: [R] compiling addons

2009-11-23 Thread Paul Hiemstra
stephen sefick schreef: I am trying to compile the r.stream* set of addons. Ubuntu 9.10 64 bit I have installed the grass packages from the repositories I have also compiled grass 6.5 from source. I have taken the r.stream* from the addons svn and placed the sources in the grass source tree - in

[R] Doubt about CCA and PCA

2009-11-23 Thread Francisco Javier Santos Alamillos
Dear R community, I'm working with PCA and CCA methods, and I have a theoretical question. Why is it necesary to have more temporal values than variables when the CCA O PCA are going to be used? Could you advise to me some any paper about it? Thanks in advance, [[alternative HTML versi

Re: [R] using contents of one column to direct addition of new rows indataframe

2009-11-23 Thread Peter Alspach
Tena koe Jessi One solution: > jessi ID Date Time 1 N123 2 N264 > Jessi <- jessi[rep(1:nrow(jessi), jessi[,3]),-3] > Jessi ID Date 1 N12 1.1 N12 1.2 N12 2 N26 2.1 N26 2.2 N26 2.3 N26 > Jessi[,2] <- Jessi[,2]+unlist(apply(as.matrix(jessi[,3]),

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
I don't think that there are any multivariate equivalents to aproxfun and spline fun, but you could create your own function that takes whatever inputs you want and uses predict.loess with the prefit loess object to create predictions. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Int

[R] S4method with special character

2009-11-23 Thread Droit Arnaud
Hi everyone, I've set some method "[", "|", "&", etc.. to work with specific S4 object. So now, I'm trying to comment this functions in a Rd file. Usual functions are describe as : \S4method{length}{motiv}(x) where "motiv" is my S4 object taking an argument x. Unfortunatly, \S4method{[}{motiv

Re: [R] Loess Fit

2009-11-23 Thread Christian Miner
What if you wanted to do this with multiple x's, multivariate, rather than just 1 x variable? On Mon, Nov 23, 2009 at 1:09 PM, Greg Snow wrote: > approxfun returns a function, give this function an x-value and it will > give you the prediction (linear interpolation from the points that you gave

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
approxfun returns a function, give this function an x-value and it will give you the prediction (linear interpolation from the points that you gave to approxfun). The splinefun function also returns a function, but it gives a spline interpolation rather than a linear one. -- Gregory (Greg) L.

Re: [R] serialized plot object (2 years later)

2009-11-23 Thread Tobias Verbeke
Hi Jack, Jack Tanner wrote: About 2 years ago, Tobias Verbeke asked: "I am looking for a way to capture the binary string that in normal use of graphics devices will bewritten to (most commonly) a file connection... Is there a way of capturing the binary `jpeg string' [generated by jpeg()]?"

Re: [R] Loess Fit

2009-11-23 Thread Christian Miner
Thanks, I'll try that. What is the output of approxfun? On Mon, Nov 23, 2009 at 1:03 PM, Greg Snow wrote: > If the client is always right, then what do they need us for? > > If you need a function to reproducibly generate predictions, then use loess > to generate a set of predictions for a reaso

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
If the client is always right, then what do they need us for? If you need a function to reproducibly generate predictions, then use loess to generate a set of predictions for a reasonably dense set of x-values, then use approxfun or splinefun to create a function to interpolate for you. Then th

Re: [R] How to make a cartesian pairlist from a vector?

2009-11-23 Thread newbyr
This is very helpful. Thank you very much. Charles C. Berry wrote: > > On Fri, 20 Nov 2009, newbyr wrote: > >> >> Hi, >> >> I'm looking for a function that will take a list of columns or data.frame >> and corvert it to cartesian pairlist. For example for this data.frame >> (see >> below), I'd

Re: [R] testing of randomness of residuals in the lm function in R

2009-11-23 Thread Tal Galili
Hi Ashok, You can try : *shapiro.test(**my.lm$resid**)* But I remember reading that "good" tests for the normality assumptions (specifically that of the residuals), do not exist as we would have hoped them to. Good luck, Tal Contact Details:---

Re: [R] Loess Fit

2009-11-23 Thread Thomas S. Dye
Thanks Christian. The client is always right ... Tom On Nov 23, 2009, at 10:32 AM, Christian Miner wrote: > sorry, I don't. I have data that I can estimate, but my client wants > to "What if..." 20 separate scenarios, and that requires a function. > > On Mon, Nov 23, 2009 at 12:22 PM, Thomas

[R] using contents of one column to direct addition of new rows in dataframe

2009-11-23 Thread Jessi Brown
Hello, R gurus. I've been trying to get R to do some data manipulation for me, and so far have been stumped in figuring out any elegant way to do so. Searches through the R-help archive haven't helped, so now I'm trying plan B. Suppose I have a dataframe that summarizes events that took place betw

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
Check out the loess.demo function in the TeachingDemos package. Using this function with your data will show the scatterplot with the loess curve. Then if you click in the plot it will show the line/curve used to do the prediction for that x-value, click on another x-value and you will see tha

Re: [R] Loess Fit

2009-11-23 Thread Thomas S. Dye
Hi Christian, Do you have a reference to a publication where this has been done? All the best, Tom On Nov 23, 2009, at 10:15 AM, Christian Miner wrote: > it's a tricky maneuver. When I finish the fit, the predict function > will give me the values, and I can smooth this out so it looks like

Re: [R] Loess Fit

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 2:03 PM, Christian Miner wrote: I'm working on Loess fit models using R, once I have the fit accomplished, I'm looking to back-out the equation of the fitted non-linear curve, wondering if there is a way to determine this equation in R? I've been looking but can't find any

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread jim holtman
Here is the way you can use grepl to get the various combinations: > mywords<- c("harry","met","sally","subway10","1800Movies","12345", + "not correct 123", "") > > numbers <- grepl("^[[:digit:]]+$", mywords) > letters <- grepl("^[[:alpha:]]+$", mywords) > both <- grepl("^[[:digit:][:alpha:]]+$",

Re: [R] Different fonts on the same axis

2009-11-23 Thread Peter Alspach
Tena koe Michelle ?plotmath For your particular example, try: plot(1:10, 1:10, pch=16, xlab="metric", ylab=quote(~italic(species)~ ' CPUE')) Depending on your default font, you might need to set the family argument of par(): par(family='serif') HTH Peter Alspach > -Original Message

[R] vegan package: goodness.cca function

2009-11-23 Thread L Quinn
Hello, I am posting this to R-help and Ecolog-L, in hopes that enough Ecologgers are R users and enough R-help users are ecologists. Please forgive the cross-posting. I deleted a number of species from a canonical correspondence analysis (CCA) model after using the function goodness.cca in veg

[R] NAs introduced by coercion

2009-11-23 Thread post009
I'm running cluster analysis on a data frame but when I calculate the distance I get this warning "NAs introduced by coercion". What does this mean? -- View this message in context: http://old.nabble.com/NAs-introduced-by-coercion-tp26482683p26482683.html Sent from the R help mailing list archi

Re: [R] interaction effects in a Linear model

2009-11-23 Thread ashok varma
Hi Cleland and Dennis, thanks a lot for the answer. Ashok Varma On Mon, Nov 23, 2009 at 5:05 PM, Chuck Cleland wrote: > On 11/23/2009 1:06 AM, ashok varma wrote: > > hello, > > > > i am fitting a Linear model using R. I have to fit the model considering > all > > the interaction effects of or

[R] Different fonts on the same axis

2009-11-23 Thread MichelleJ
Hi, I need to have both italics and standard font on the y axis. This is my script: plot(x,y,pch=16,xlab="metric",ylab="species CPUE") I want species in italics and CPUE in standard text. Any tips would be appreciated. Thanks. -- View this message in context: http://old.nabble.com/Different-

[R] Loess Fit

2009-11-23 Thread Christian Miner
I'm working on Loess fit models using R, once I have the fit accomplished, I'm looking to back-out the equation of the fitted non-linear curve, wondering if there is a way to determine this equation in R? I've been looking but can't find any literature. For me, the graph of the function is great, b

[R] Analyzing XML data

2009-11-23 Thread skyjo
I would like to analyze XML data from MLB's website. I do the following steps: library(XML) dat<-"http://gd2.mlb.com/components/game/mlb/year_2007/month_05/day_02/gid_2007_05_02_arimlb_lanmlb_1/inning/inning_1.xml"; example<- xmlTreeParse(dat, useInternalNodes=T) ex<-xpathApply(example, "//i

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-23 Thread David Winsemius
On Nov 20, 2009, at 1:27 PM, David Winsemius wrote: On Nov 20, 2009, at 11:07 AM, RWilliam wrote: In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the "X2" part of coxph( Surv(Time,Censor)~X1, offset=log(4.3*X2), data= a ). Als

Re: [R] Error using 32-bit R and RODBC package on 64-bit Windows Server OS with R version 2.10

2009-11-23 Thread helpme
Thank you for the link to the 32 bit Windows Oracle downloads for the Instant Client. That solved the problem. I'm now able to connect to Oracle database from R using the RODBC library. Thank you Mark! -Melanie On Wed, Nov 18, 2009 at 6:23 PM, Marc Schwartz wrote: > Just to clarify on your fi

[R] NAs introduced by coercion warning?

2009-11-23 Thread Omar Gonzalez Post
I'm running cluster analysis on a data frame but when I calculate the distance I get this warning "NAs introduced by coercion". What does this mean? [[alternative HTML version deleted]] __ R-help

Re: [R] non-intuitive behaviour after type conversion

2009-11-23 Thread Don MacQueen
When you attach() something, it loads it into memory and there it stays. It is not a link, reference, or pointer to the original. Changing the original (the version in the dataframe), which is what you did, does not change the attached copy in memory. In essence, you did a type conversion on on

Re: [R] testing of randomness of residuals in the lm function in R

2009-11-23 Thread Uwe Ligges
ashok varma wrote: Hello, I am fitting a Linear model using R. Now, i want to know how to test whether my model is following the homoscadasticity and residuals being random assumptions or not while fitting the model. See ?lm. For accessing residuals, see ?residuals. Or use plot() on a lm o

Re: [R] Fitting a mixture of poisson

2009-11-23 Thread Jim Silverton
Hello, I would like to find out how to get the fit from a mixture of poisson. For example, suppose I know the Y = 0.25*Poisson(2) + 0.75*Poisson(10) then if I have say y = 4, how do I get the fitted value for y? [[alternative HTML version deleted]] ___

Re: [R] Define return values of a function

2009-11-23 Thread Greg Snow
If you want to control what gets printed in the output of your function, then you need to get into creating classes and methods. Choose a class to return from your function, and create a print method for that class, then when you run your function the output will cause the print method to be ca

Re: [R] Natural colours for topographic data

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 11:52 AM, Karl Ove Hufthammer wrote: Dear list members I'm currently working on some topographic (elevation) data, and was somewhat surprised that the 'topo.colors' and 'terrain.colors' are of little to no use here. The problem is that these functions only return a palette

Re: [R] get.gpar, grid.Call

2009-11-23 Thread Uwe Ligges
Christian Hoffmann wrote: Hi I have been unable to find information on the following problem: Error in get.gpar(): unable to find function "grid.Call" Reinstalling R-2.10.0, platform: i386-pc-mingw32 did not help. Before this message there was a "get.gpar" missing. We then transported the

Re: [R] List Name help

2009-11-23 Thread Henrique Dallazuanna
Try this: test[grep("d2", names(test))] On Mon, Nov 23, 2009 at 2:53 PM, Rajasekaramya wrote: > > Hi There, > > I have a named List object.I want to access all the list elements that has > the same name > for example > The List > test <- list() > $d2 > v1 v2 v3 v4 > 1 2 3 4 5 > > $d2 > v1 v2 v3

[R] Natural colours for topographic data

2009-11-23 Thread Karl Ove Hufthammer
Dear list members I'm currently working on some topographic (elevation) data, and was somewhat surprised that the 'topo.colors' and 'terrain.colors' are of little to no use here. The problem is that these functions only return a palette of colours; they don't map depth values to colours. So if

[R] List Name help

2009-11-23 Thread Rajasekaramya
Hi There, I have a named List object.I want to access all the list elements that has the same name for example The List test <- list() $d2 v1 v2 v3 v4 1 2 3 4 5 $d2 v1 v2 v3 v4 1 2 3 4 5 $d3 v1 v2 v3 v4 8 9 19 10 $d1 v1 v2 v3 v4 12 14 15 16 so if i say test[["d2"]] or test["d2"] i should get

[R] Friedman test for replicated blocked data

2009-11-23 Thread Pepe Trujillo
Dear Marco: Look in "agricolae" package. There is a Friedman test with and without replicates. In this package is used the Conover's book as a reference. Greetings, Dr. D. José Trujillo Carmona Dpt. of Mathematics Fac. of Science of Badajoz Univ. of Extremadura Spain From: Marco Chiarandini

[R] get.gpar, grid.Call

2009-11-23 Thread Christian Hoffmann
Hi I have been unable to find information on the following problem: Error in get.gpar(): unable to find function "grid.Call" Reinstalling R-2.10.0, platform: i386-pc-mingw32 did not help. Before this message there was a "get.gpar" missing. We then transported the source code from another mach

Re: [R] Excel-Export

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 7:02 AM, koj wrote: Dear all, i use the following package/syntax to export data to excel: library(xlsReadWrite) write.xls( exportdata,pfad,colNames = TRUE,sheet = 1,from = 1,rowNames = FALSE ) Everything is fine, but the format of the export is not the best. For exampl

Re: [R] Excel-Export

2009-11-23 Thread Henrique Dallazuanna
Use the RDCOMClient package from omegahat.org. On Mon, Nov 23, 2009 at 11:02 AM, koj wrote: > > Dear all, > > i use the following package/syntax to export data to excel: > > library(xlsReadWrite) > write.xls( exportdata,pfad,colNames = TRUE,sheet = 1,from = 1,rowNames = > FALSE ) > > Everything i

Re: [R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 10:02 AM, Daniel Brewer wrote: Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap. 2 (tempHeat ,symm = T ,trace ="none",cexRow=0.7,cexCol=0.7,col="redgreen",density.info="none") I have a couple

Re: [R] Re adline()

2009-11-23 Thread Peter Dalgaard
yonosoyelmejor wrote: > Hello, I would like to ask you a question.I have a program in R and I use the > readline method to ask the user some things,but i don´t use the R console > but I use Win console then not appear what I put.I put the code as you look > for: > > cat("1- 24horas\n") > cat("2- 1

[R] find distance between two points with different scale

2009-11-23 Thread marten
i have a dataset with x and y values. i want to randomly select a point on the x-axis between the smallest and largest x-value and use a y value of zero for them. Next, for each randomly selected point {x[i],0}i want to find the point in the {x,y} space which is closest to them. However, as seen

[R] calling R from java eclipse

2009-11-23 Thread thierry CHEKOUO T.
Dear R & Java users I have the problems with calling R from Java (JRE6) on Windows. After running, we have: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x6c7330c0, pid=1436, tid=6200 # # JRE version: 6.0_17-b04 # Jav

[R] anova() method for coxph objects with robust standard errors

2009-11-23 Thread Mura Tamakou
Hi all, what is the reason why the anova() method for coxph objects does not work when robust standard errors have been requested, e.g., fit <- coxph(Surv(futime, fustat) ~ resid.ds *rx + ecog.ps, data = ovarian, robust = T) anova(fit) any pointers will be much appreciated. Sincerely, Mura

Re: [R] How to add a top level title to multiple plots

2009-11-23 Thread Peter Ehlers
Jason Rupert wrote: In the example below, is there any way to get the top title, i.e. "Distribution Comparisons", in a bit from the top margin? Thanks agian Your par(oma=...) needs to come _before_ plotting; make it the first statement. In addition, title() takes a line= argument; try line=

[R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread Daniel Brewer
Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap.2(tempHeat,symm=T,trace="none",cexRow=0.7,cexCol=0.7,col="redgreen",density.info="none") I have a couple of questions: 1) The range is from -0.2 to 0.4 and the colour scheme I

[R] testing of randomness of residuals in the lm function in R

2009-11-23 Thread ashok varma
Hello, I am fitting a Linear model using R. Now, i want to know how to test whether my model is following the homoscadasticity and residuals being random assumptions or not while fitting the model. thanks a lot in advance, Ashok Varma [[alternative HTML version deleted]] __

Re: [R] R-help Digest, Vol 81, Issue 23

2009-11-23 Thread Thushyanthan Baskaran
Hi, keine ahnung. Das liegt jetzt bei Hr. Feld. Frag mal bei ihm nach. Grüße Thushyanthan r-help-requ...@r-project.org wrote: Send R-help mailing list submissions to r-help@r-project.org To subscribe or unsubscribe via the World Wide Web, visit https://stat.ethz.ch/mailman/

[R] Excel-Export

2009-11-23 Thread koj
Dear all, i use the following package/syntax to export data to excel: library(xlsReadWrite) write.xls( exportdata,pfad,colNames = TRUE,sheet = 1,from = 1,rowNames = FALSE ) Everything is fine, but the format of the export is not the best. For example, I every time have to adjust the column widt

[R] R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-23 Thread simona.racio...@libero.it
It works! But Once I have the square root of this matrix, how do I convert it to a real (not imaginary) matrix which has the same property? Is that possible? Best, Simon >Messaggio originale >Da: p.dalga...@biostat.ku.dk >Data: 21-nov-2009 18.56 >A: "Charles C. Berry" >Cc: "simona.racio

[R] R: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-23 Thread simona.racio...@libero.it
Thanks Chuck! It works! But Once I have the square root of this matrix, how do I convert it to a real (not imaginary) matrix which has the same property? Is that possible? Best, Simon >Messaggio originale >Da: cbe...@tajo.ucsd.edu >Data: 21-nov-2009 18.11 >A: "simona.racio...@libero.it"

[R] Re adline()

2009-11-23 Thread yonosoyelmejor
Hello, I would like to ask you a question.I have a program in R and I use the readline method to ask the user some things,but i don´t use the R console but I use Win console then not appear what I put.I put the code as you look for: cat("1- 24horas\n") cat("2- 12horas\n") cat("3- 8horas\n") selec

Re: [R] Speed up R code

2009-11-23 Thread AnnaFowler
Thanks Stephane, Thats a great help! SL-16 wrote: > > Loops tend to dramatically increase computation time. You may re-write > a vectorized version of your code if possible, i.e. use matrix > algebra. Calculus is a lot faster if one can avoid loops (at least > some of them) . > > Best, > Steph

Re: [R] How to add a top level title to multiple plots

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 8:58 AM, Jason Rupert wrote: In the example below, is there any way to get the top title, i.e. "Distribution Comparisons", in a bit from the top margin? You could use instead: title("\nDistribution Comparisons", outer = TRUE) And please correct the spelling of Poisson

Re: [R] other decriptive stats packages

2009-11-23 Thread Matthieu Lesnoff
> > are there any more packages that help decribe and explore data > sets package tdisplay at http://forums.cirad.fr/logiciel-R/viewtopic.php?t=2409 Details: display-packageTool Box for Data Importation and Display import Import Data From External Data Bases

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread hadley wickham
>> mywords<- c("harry","met","sally","subway10","1800Movies","12345", "not >> correct 123") >> all.letters <- grep("^[[:alpha:]]*$", mywords) >> all.numbers <- grep("^[[:digit:]]*$", mywords)  # numbers >> mixed <- grep("^[[:digit:][:alpha:]]*$", mywords) mywords<- c("harry","met","sally","subway

Re: [R] "Over-coloring" facets on persp() plot

2009-11-23 Thread Duncan Murdoch
On 23/11/2009 8:55 AM, Marc Chiarini (Tufts) wrote: Thanks Duncan (and David). I couldn't get back to my computer until today. I understand it pretty well now and I'm able to get what I need. On a side note, I have had a hard time getting rgl to work. For the moment, I have to compile witho

Re: [R] How to add a top level title to multiple plots

2009-11-23 Thread Jason Rupert
In the example below, is there any way to get the top title, i.e. "Distribution Comparisons", in a bit from the top margin?  Thanks agian   - Original Message From: Jason Rupert To: Peter Ehlers Cc: R Project Help ; Me Sent: Sat, November 21, 2009 12:31:04 AM Subject: Re: [R] How

Re: [R] "Over-coloring" facets on persp() plot

2009-11-23 Thread Marc Chiarini (Tufts)
Thanks Duncan (and David). I couldn't get back to my computer until today. I understand it pretty well now and I'm able to get what I need. On a side note, I have had a hard time getting rgl to work. For the moment, I have to compile without libpng and ftfonts, and when I load the package I

Re: [R] how do i persuade IT to install R on PCs ?? ...and should I ??

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 7:24 AM, Barry Rowlingson wrote: On Mon, Nov 23, 2009 at 1:01 PM, David Winsemius > wrote: It was a good read. We had a recent example submitted to r-help where I had occasion to test their "solution 2" (use OO.org' Calc) and found it to be just as bad at curve fitting

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread jim holtman
Added a little more: > mywords<- c("harry","met","sally","subway10","1800Movies","12345", "not > correct 123") > all.letters <- grep("^[[:alpha:]]*$", mywords) > all.numbers <- grep("^[[:digit:]]*$", mywords) # numbers > mixed <- grep("^[[:digit:][:alpha:]]*$", mywords) > all.letters [1] 1 2 3 >

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread jim holtman
try this: > mywords<- c("harry","met","sally","subway10","1800Movies","12345") > grep("^[[:alpha:]]*$", mywords) # letters [1] 1 2 3 > grep("^[[:digit:]]*$", mywords) # numbers [1] 6 > On Mon, Nov 23, 2009 at 8:28 AM, Harsh wrote: > Hi R users, > I'd like to know if anyone has come across prob

  1   2   >