Re: [R] Single character input without Enter

2010-02-24 Thread Henrik Bengtsson
Thanks. If you could wrap it up in a package, provide an Rd help page with an example, and make it available on for instance CRAN, that would be even better. Then one day maybe someone else contribute with a unix version etc. Make sure to credit your sources and get the licenses right. /Henrik

[R] problem with sqlSave()

2010-02-24 Thread Ivan Calandra
Dear R users, I've already asked this question yesterday, but, though I had answer for the other ones (and they helped a lot, thanks), for some reason didn't get an answer for this one (I would also appreciate to know why, so that I can improve the quality and clarity of my future questions).

[R] Remove missing observations

2010-02-24 Thread Denis . Aydin
Hi everyone I have the following problem: My dataframe has 3 variables: ID, Year and and an outcome variable. The dataframe contains repeated measurements because the subjects filled out a questionnaire every year. The time span covers 2 years. Now I want to check if there is a significant

Re: [R] Remove missing observations

2010-02-24 Thread Tal Galili
Your friends are: na.omit and is.na The easiest way (I think) will be to have your data.frame organized so you have a row for each subject. and on the row, you check the outcome variables with is.na and create a subset of your data from that. And on that data, run your tests... Tal

Re: [R] colour highlighting inputs and outputs in the R terminal?

2010-02-24 Thread Romain Francois
On 02/23/2010 03:02 PM, Marc Schwartz wrote: On Feb 23, 2010, at 7:05 AM, Liviu Andronic wrote: Dear all Is it possible to get basic colour highlighting for inputs and outputs in the R terminal? I am looking for something similar to what GUIs provide, such as JGR and (I think) the Windows R

Re: [R] problem with sqlSave()

2010-02-24 Thread Ivan Calandra
Hi Dennis, Actually, this data.frame is an output from a test. And there are 2 'Group' variables because it is a pairwise comparison test. Up to now, I've used write.csv() and I've never had such problems. I've tried changing the names to 'Group1' and 'Group2', and it indeed was the problem.

[R] Question on Zoo object

2010-02-24 Thread Bogaso
Dear all, I would like to ask two questions on handling zoo object 1. Suppose I have following matrix : mat1 - matrix(rnorm(60), nrow=12) Now I want to create a zoo object with index should represent the month names for each row. For example first row has index jan, 2nd row is feb and so on.

Re: [R] Optimise huge data.frame construction

2010-02-24 Thread Moshe Olshansky
Hi Daniele, One possibility would be to make two runs. In the first run you are not building the matrix but just calculating the number of rows you need (in a loop). Then you allocate such matrix (only once) and fill it in the second run. Regards, Moshe. --- On Wed, 24/2/10, Daniele Amberti

Re: [R] Reading sas7bdat files directly

2010-02-24 Thread Chris Long
I suppose a link would have added usefulness: http://www.oview.co.uk/dsread Chris. -- View this message in context: http://n4.nabble.com/Reading-sas7bdat-files-directly-tp1469515p1567256.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] gdata

2010-02-24 Thread blazejneradilek
Have a similar problem. Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, : Unable to read translated csv file '/var/folders/na/na-E2tFsFOCIoeD-x5EV6k+++TI/-Tmp-//RtmpS393Mj/file10d63af1.csv'. Error in file.exists(tfn) : invalid 'file' argument Can't load

Re: [R] Optimise huge data.frame construction - [ ] Message is from an unknown sender

2010-02-24 Thread Daniele Amberti
Thanks Moshe, I already allocate a matrix and grow it by 5000 row at a time (I found empirically that there is not much performance gain going above this number). This allow me to have a close to linear behavior in computational time but it is steel slow. Accessing DB and calculations takes

Re: [R] export graphics for editing in Illustrator

2010-02-24 Thread Liviu Andronic
On 2/24/10, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Any other ideas? Perhaps SVG? Also check this wiki page [1]. Liviu [1] http://rwiki.sciviews.org/doku.php?id=tips:graphics-misc:export __ R-help@r-project.org mailing list

Re: [R] export graphics for editing in Illustrator

2010-02-24 Thread Ivan Calandra
Thanks for your help, SVG works perfectly. The package RSvgDevice does just what I need. Ivan Le 2/24/2010 11:30, Liviu Andronic a écrit : On 2/24/10, Ivan Calandraivan.calan...@uni-hamburg.de wrote: Any other ideas? Perhaps SVG? Also check this wiki page [1]. Liviu [1]

Re: [R] problem with sqlSave()

2010-02-24 Thread David Winsemius
On Feb 24, 2010, at 4:50 AM, Ivan Calandra wrote: Hi Dennis, Actually, this data.frame is an output from a test. And there are 2 'Group' variables because it is a pairwise comparison test. Up to now, I've used write.csv() and I've never had such problems. I've tried changing the names to

Re: [R] plm issues: error for within or random, but not for pooling

2010-02-24 Thread Liviu Andronic
Dear Giovanni Thank you for the quick reply and sorry for not being able to respond in kind: since our last e-mail we decided to change the way we measure the variables, and this took some time. I managed to track down the original issue, I think, to an improperly specified subset vector to the

[R] How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
I'm struggling to find any help on this seemingly simple question - how does one read data with percentage (%) or currency (£,$ etc.) signs? When I try to read a data file which has any of those symbols in the data fields, they are read as characters rather than values. Is there a function or

Re: [R] export graphics for editing in Illustrator

2010-02-24 Thread David Winsemius
I don't think you understood what was being recommended. (I thought) Heimstra was suggesting that you _not_ use savePlot and instead use the functions that are designed for creating postscript or pdf files, pdf() or postscript(). -- David. On Feb 24, 2010, at 5:18 AM, Ivan Calandra

Re: [R] problem with sqlSave()

2010-02-24 Thread Ivan Calandra
Thanks David, this is exactly what I need! Ivan Le 2/24/2010 12:00, David Winsemius a écrit : On Feb 24, 2010, at 4:50 AM, Ivan Calandra wrote: Hi Dennis, Actually, this data.frame is an output from a test. And there are 2 'Group' variables because it is a pairwise comparison test. Up to

[R] how to label individuals with FactoMiner ?

2010-02-24 Thread Robert U
Dear all, i'm trying to label specific individuals (supplementary ones) after a PCA with the FactoMiner package. There is not much details (possibilities?) in the R-help of the plot.pca function. There is indeed a label parameter but i could only manage to label the supplementary individuals

Re: [R] export graphics for editing in Illustrator

2010-02-24 Thread Ivan Calandra
Thank you for warning me, but I did try pdf() and postscript(). pdf() is worse than savePlot and postscript() does the same with what I've tried. When I say better or worse, I mean in terms of dissociation potential (I'm not sure it means anything, but my problem was to dissociate the

Re: [R] How to read percentage and currency data?

2010-02-24 Thread Ista Zahn
There might be a package that will do what you want, but probably the simplest solution is to remove the unit symbols: Dat - read.table(textConnection(Store YearRevenue abc 2010$557889 def 2010$697356), header=TRUE, stringsAsFactors=FALSE) closeAllConnections() Dat$Revenue

Re: [R] how to label individuals with FactoMiner ?

2010-02-24 Thread Alain Guillet
Hi, The label you want to see on the factorial map should be the row names so change first the row names and then do your analysis using FactoMineR. Then apply the code hereunder replacing res by your PCA object. plot.PCA(res, axes=c(1, 2), choix=ind, habillage=ind, col.ind=black,

Re: [R] gdata

2010-02-24 Thread Gabor Grothendieck
I have had problems with gdata 2.7.1 on Windows but have been successfully using the development version of gdata with ActivePerl likely the same applies to Mac. The development version of gdata is in the svn repository here: https://r-gregmisc.svn.sourceforge.net/svnroot/r-gregmisc/trunk/gdata

Re: [R] How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Thanks Ista, that's sort of what I'm doing at the moment. But my problem is that I don't always know if the data has such symbols or signs in them. I can do a gsub on the entire dataset but I also need to preserve the currency signs to deal with multiple columns with different currencies. Doing

Re: [R] Question on Zoo object

2010-02-24 Thread Gabor Grothendieck
See interspersed comments and be sure to read the three vignettes that come with zoo: vignette(zoo) vignette(zoo-quickref) vignette(zoo-faq) On Wed, Feb 24, 2010 at 4:52 AM, Bogaso bogaso.christo...@gmail.com wrote: Dear all, I would like to ask two questions on handling zoo object 1. Suppose

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Petr, I've tried that conversion but I get only rounded integer values. So 585% becomes 6 , 101% becomes 1 etc. I've also tried as.double and as.real but still get the same results. - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View

[R] anova.rq in quantile regression

2010-02-24 Thread Tomas
Dear list I'm trying to test for differences in slopes of the 95% quantile regression fitted to two distinct subsets of my data set, as bellow: grx - leaf.nitrogen gry - leaf.photosynthesis ab1- rq(gry[TRIP==CAM] ~ grx[TRIP==CAM],tau=.95) ab2- rq(gry[TRIP==WA] ~ grx[TRIP==WA],tau=.95) When

[R] Bimodal distribution

2010-02-24 Thread Samor Gandhi
Hello, Is there any test  for bimodality in R that x - c(rnorm(1000,0,1),rnorm(1000,3,1)) hist(x,nclass=100) Thank you in advance for any help. Regards, Samor [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Re : how to plot select points in preexisting persp plot

2010-02-24 Thread Preeti Iyer
Hello, thanks a lot! I used which function with trans3d. It worked as well. Regards, Preeti __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Opaque error message and R GUI crashing while using glmnet

2010-02-24 Thread Duncan Murdoch
On 24/02/2010 1:18 AM, Katherine Fitzgerald wrote: Hello all, I am having trouble with the glmnet package. I used it for the first time last week, after updating R to the current version (2.10.1, running in Windows XP). It seemed to be working fine as I explored what it could do with one of

Re: [R] Question on Zoo object

2010-02-24 Thread Bogaso
Thanks Gabor for this reply. Your first reply answers my question, however end is not. Here you said : set.seed(1) daily.dat - zooreg(rnorm(500), start=as.Date(2000-01-01), frequency=1) aggregate(daily.dat, as.yearmon, sd) Jan 2000 Feb 2000 Mar 2000 Apr 2000 May 2000 Jun 2000 Jul

Re: [R] Reading sas7bdat files directly

2010-02-24 Thread Frank E Harrell Jr
Chris Long wrote: I suppose a link would have added usefulness: http://www.oview.co.uk/dsread Chris. As dsread seems to work perfectly under wine on Ubuntu linux (and quite quickly), it could be quite valuable to many of us. Thanks for posting this and for developing dsread! If time

Re: [R] Bimodal distribution

2010-02-24 Thread Ingmar Visser
Samor, A somewhat indirect answer: you could fit a mixture distribution to your data and test how many components are needed to best describe your data. hth, Ingmar On Wed, Feb 24, 2010 at 1:22 PM, Samor Gandhi samorgan...@yahoo.com wrote: Hello, Is there any test for bimodality in R that

Re: [R] Reading sas7bdat files directly

2010-02-24 Thread Chris Long
No problem, Frank, I'm glad that you think it will be useful. I will be making changes to dsread in the coming weeks so you may want to hold off with your helper function in case my changes break it (the formatting of the variable metadata listing may well change). Re: the metadata, feel free

Re: [R] Error message when using error.bars(x,add=TRUE)

2010-02-24 Thread fussel
Hey hey, thanks for your answer. Yes, you are right - beautiful i something else. I found that thing in the R-help pages. But it would have been a starting point... My dataset consists of almost 1000 individual samples - each of them analysed for the different elements. I think that the sample

Re: [R] significance of coefficients in Constrained regression

2010-02-24 Thread Ravi Varadhan
Bootstrap is your friend. You can resample the data that you have and re-fit the constrained regression model to each of the resampled data set. You can then obtain the entire joint distribution of the fitted parameter estimates (this is much more than just the standard error). Ravi.

[R] Question:How to get rid of missing values

2010-02-24 Thread Lu Wang
Hi, I want to draw a pie chart of level (variable) for each ID (variable). I have a big dataset, here I attach part of it. ID level 1 G1 1 A1 1 A1 1 G1 1 G1 1 G1 1 A1 1 A1 1 G1 1 G1 1 G3 1 A1 1 G1 1 A1 1 A1 1 A2 1 A2 1 M 1 A1 1 G1 1 A1 1 1 1 A2 1 G3 1 A1 1 A1 1

Re: [R] Reading sas7bdat files directly

2010-02-24 Thread Frank E Harrell Jr
Chris Long wrote: No problem, Frank, I'm glad that you think it will be useful. I will be making changes to dsread in the coming weeks so you may want to hold off with your helper function in case my changes break it (the formatting of the variable metadata listing may well change). Re: the

[R] RODBC connection name

2010-02-24 Thread Rob Forler
Hello all, I've scoured the RODBC.pdf, but there appears to be no way to set the name of the RODBC connection. This is useful for the DBA's to know that some processes should only run for so long and can be automatically killed. But currently the name is just R. so they aren't sure if the

[R] Odp: Question:How to get rid of missing values

2010-02-24 Thread Petr PIKAL
Hi Maybe factor strikes again. r-help-boun...@r-project.org napsal dne 24.02.2010 15:21:50: Hi, I want to draw a pie chart of level (variable) for each ID (variable). I have a big dataset, here I attach part of it. ID level 1 G1 1 A1 1 A1 1 G1 1 G1 1 G1 1 A1 1 A1 1

[R] Odp: Calling Data frame objects with spaces in their names

2010-02-24 Thread Petr PIKAL
Hi I do not see any problem? zeta vzorek a b c skupina sio2 p2o5 al2o3 dus de reten1 reten2 1 179/1/1 7.517.34 0.023 0.780 5.812 ne 1.53 NA NA 2 179/2/1 7.797.34 0.011 0.784 5.819 ne 0.89 NA NA zeta[ ,2] [1] 7.51 7.79 5.14 6.35 5.82 7.13 5.95 7.27 6.29

[R] problem with looping on sqlSave()

2010-02-24 Thread Ivan Calandra
Dear R users, I have a follow-up question on sqlSave(). Since most of the output from the tests I use are lists, I would like to loop to export each element of the list and append it to the sheet. Here is what I do: library(RODBC) test - structure(list(m = structure(c(0.090909090909091,

Re: [R] ggplot2 X axis levels

2010-02-24 Thread Felipe Carrillo
Thanks Dieter, I actually adopted your example but I thought it would be an easy way to order non-factor data.   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA - Original Message From: Dieter Menne

Re: [R] RODBC connection name

2010-02-24 Thread Rob Forler
Hello, Thank you for the response, but I do not have the command called handle in my linux version. Also it isn't clear to me that you could set the name before you do the connection? Thanks, Rob On Wed, Feb 24, 2010 at 9:10 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Use the

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Petr, Removing the % signs by Ista's method works. However as I noted earlier, I was hoping there was a more elegant solution which deals with percentage and currency values without knowing about their presence beforehand. It's a shame that something which Excel deals with trivially is such a

[R] block matrices

2010-02-24 Thread Gustave Lefou
Dear all, I do not know how to deal with block matrices in R. For example I have 3 matrices A, B and C. And I want to produce a new matrix of this form ( A B 0 ) ( 0 0 C ) where A, B and C are one-row matrices. Apart from A, B and C, all the coefficients are 0. Is there an easy solution in

[R] Changing style for groups in xyplot

2010-02-24 Thread Antje Steller
Hello, I have a (hopefully) quick question concerning the xyplot function. The xyplot works very fine for me - I am using it to display functions of two variates depending on several other factors. I am therefor also using the groups argument, so that the symbols in each panel appear in different

Re: [R] block matrices

2010-02-24 Thread Kjetil Halvorsen
see below. On Wed, Feb 24, 2010 at 12:56 PM, Gustave Lefou gustave5...@gmail.com wrote: Dear all, I do not know how to deal with block matrices in R. For example I have 3 matrices A, B and C. And I want to produce a new matrix of this form ( A B 0 ) ( 0 0 C ) where A, B and C are

Re: [R] mlogit is not an S4 object error

2010-02-24 Thread Peter Ehlers
On 2010-02-24 6:51, steve_fried...@nps.gov wrote: Hello, I've been getting the following error when using the mlogit function from the mlogit package This is one of the examples provided in the Package mlogit January 27, 2010 description data(Fishing, package=mlogit) Fish-

Re: [R] block matrices

2010-02-24 Thread William Revelle
At 1:06 PM -0300 2/24/10, Kjetil Halvorsen wrote: see below. On Wed, Feb 24, 2010 at 12:56 PM, Gustave Lefou gustave5...@gmail.com wrote: Dear all, I do not know how to deal with block matrices in R. For example I have 3 matrices A, B and C. And I want to produce a new matrix of this

Re: [R] block matrices

2010-02-24 Thread Duncan Murdoch
On 24/02/2010 10:56 AM, Gustave Lefou wrote: Dear all, I do not know how to deal with block matrices in R. For example I have 3 matrices A, B and C. And I want to produce a new matrix of this form ( A B 0 ) ( 0 0 C ) where A, B and C are one-row matrices. The problem is that

[R] GenABEL - problems with load.gwaa.data

2010-02-24 Thread Euphoria
Hi all! I am using GenABEL on R for GWAS analysis. I am having a couple of issues: First, I am having a problem reading files (.map, .ped, size 900Mb, using windows 32-bit) onto R in the convert.snp.ped statement. I am thinking this problem is likely due to the large size of the files my

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 24.02.2010 16:55:49: Petr, Removing the % signs by Ista's method works. However as I noted earlier, I was hoping there was a more elegant solution which deals with percentage and currency values without knowing about their presence beforehand.

Re: [R] RODBC connection name

2010-02-24 Thread Gabor Grothendieck
If you are using Linux just grep the output of the appropriate ps command. On Wed, Feb 24, 2010 at 10:34 AM, Rob Forler rfor...@uchicago.edu wrote: Hello, Thank you for the response, but I do not have the command called handle in my linux version. Also it isn't clear to me that you could set

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Rob Forler
This seems like a case where you should have a column that is Currency or CurrencyKey. You can then do proper sql like queries on the data and convert into a base currency or something to do column wise operations. A column of data should be somehow consistent within some view. Currently your

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Hrishi Mittal
Petr and Rob, I apologise for complicating my question further. Having more than one currency in the same column is no doubt inconsistent. For now, I'm happy to have a solution for reading single currencies or percentage values in separate columns. I will use string replacement until I can think

Re: [R] heatmap.3

2010-02-24 Thread joonR
If anyone is interested, I solved the problem by modifying the lhei parameter (if ColSideColors is used, lwid for Row..) and making it parametric: lhei=c(lhei[1], 0.1*noan, lhei[2]) where noan is an additional parameter passed to the function that specifies the number of annotations. best, j

[R] Forest Plot X-axis cut-off problem

2010-02-24 Thread Scott Weichenthal
Hello R-Help, I am trying to produce a forest plot but the x-axis is being cut off at 2 for some reason. I have attached the file. How can I avoid this? Scott __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Where can I find general help on statistics?

2010-02-24 Thread rbali
Try also http://www.theforumsite.com/forum/list/Statistics/141 -- View this message in context: http://n4.nabble.com/Where-can-I-find-general-help-on-statistics-tp1565628p1567764.html Sent from the R help mailing list archive at Nabble.com. __

[R] sprintf + integer(0) problem

2010-02-24 Thread Esmail
Hello all, I am stuck with R v2.8.0 under Linux for the time being and I am running into a small problem that doesn't exist under 2.9.x and 2.10.x with sprintf. If I have the following code segment to help me determine the column number for a specific column header/label: nn = names(Dataset)

[R] Question:How to get rid of missing values

2010-02-24 Thread Lu Wang
Hi, I want to draw a pie chart of level (variable) for each ID (variable). I have a big dataset, here I attach part of it. ID level 1 G1 1 A1 1 A1 1 G1 1 G1 1 G1 1 A1 1 A1 1 G1 1 G1 1 G3 1 A1 1 G1 1 A1 1 A1 1 A2 1 A2 1 M 1 A1 1 G1 1 A1 1 1 1 A2 1 G3 1 A1 1 A1 1

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-24 Thread Lam, Tzeng Yih
Dear Dr. Zeileis, You are right, the setup of Baskerville is different than the ZINB model. In Baskerville, it was concerned with the transformation and back-transformation on the response variable. Thank you for taking the time to make the issue clearer again as well as the advices on the

Re: [R] sprintf + integer(0) problem

2010-02-24 Thread Henrique Dallazuanna
You can try this: cat(sprintf(ifelse(any(grepl(s, nn)), 'found %s in col %d\n', 'Column %s not found'), s, match(s, nn))) On Wed, Feb 24, 2010 at 3:06 PM, Esmail esmail...@gmail.com wrote: Hello all, I am stuck with R v2.8.0 under Linux for the time being and I am running into a small

Re: [R] Forest Plot X-axis cut-off problem

2010-02-24 Thread David Winsemius
On Feb 24, 2010, at 10:44 AM, Scott Weichenthal wrote: Hello R-Help, I am trying to produce a forest plot but the x-axis is being cut off at 2 for some reason. I have attached the file. How can I avoid this? You may have attached the file, but the mail-server then scrubbed it. Only

Re: [R] problem with looping on sqlSave()

2010-02-24 Thread Dieter Menne
Ivan Calandra wrote: ... for (i in 1:4){ sqlSave(xlsFile, as.data.frame(test[[i]]), tablename=test, rownames=F, addPK=T, append=T) } Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' odbcCloseAll() I have never managed to

[R] [R-pkgs] New version of rms package now on CRAN

2010-02-24 Thread Frank E Harrell Jr
Version 2.2-0 of the rms package is now available. This is a somewhat major update. One major change is not downward compatible: Instead of specifying predictor=. or predictor=NA to Predict, summary, nomogram, survplot, gendata, you just specify the name of the predictor. For example, to

Re: [R] Changing style for groups in xyplot

2010-02-24 Thread Dieter Menne
Antje Steller wrote: Hello, Now I would like to change how the different groups are displayed - now they are circles in different colors, and I would like to change those colors. .. my complete xyplot command right now looks like this: xyplot(a ~ b| t*h, groups=r, xlab=Zyklen,

[R] ggsave in Linux

2010-02-24 Thread Ryan Garner
I have a script that creates a qplot that is then saved as a .png file which works fine on Windows. But I also work on Linux servers via Putty and would like to be able to create and save my plots to my working directory. Is there a way I can ggsave my qplot without utilizing X11 in Linux? I

Re: [R] Calling Data frame objects with spaces in their names

2010-02-24 Thread Patrick Connolly
On Wed, 24-Feb-2010 at 09:36AM -0500, Luis Felipe Parra wrote: | Hello I have the following data frame which I read from an EXCEL | file, and when i try to call one of its columns with a space in | their names I am not being able to. For example if I do | EURODOLLAR$ED1.Comdty Date I obtain the

Re: [R] Turn three Columns into a Matrix?

2010-02-24 Thread David Winsemius
On Feb 24, 2010, at 2:13 PM, Ortiz, John wrote: Subject: Re: [R] Turn three Columns into a Matrix? On Feb 23, 2010, at 3:18 PM, Ortiz, John wrote: Hi all, If I have a data frame with 3 columns as follows: ta Species Depth Counts spc_a 120 60 spc_a 140 140 spc_b 140 5

Re: [R] Turn three Columns into a Matrix?

2010-02-24 Thread Ortiz, John
Subject: Re: [R] Turn three Columns into a Matrix? On Feb 23, 2010, at 3:18 PM, Ortiz, John wrote: Hi all, If I have a data frame with 3 columns as follows: ta Species Depth Counts spc_a 120 60 spc_a 140 140 spc_b 140 5 spc_b 150 4 spc_b 180 10 spc_c 180

Re: [R] ggsave in Linux

2010-02-24 Thread Ista Zahn
See below. On Wed, Feb 24, 2010 at 1:28 PM, Ryan Garner ryan.steven.gar...@gmail.com wrote: I have a script that creates a qplot that is then saved as a .png file which works fine on Windows. But I also work on Linux servers via Putty and would like to be able to create and save my plots to

[R] extracting results from wilcox_test (package::coin)

2010-02-24 Thread chipmaney
Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by() to group by site Output is a list: Herb.KW Herb.df$ID: 10-1 Kruskal-Wallis rank sum test data: Indicator_Rating by Year Kruskal-Wallis chi-squared = 15.24, df = 7, p-value = 0.03302

Re: [R] importing S4 methods using a namespace

2010-02-24 Thread Martin Morgan
Hi Aaron -- On 02/23/2010 01:30 PM, Aaron Rendahl wrote: I want to call summary on a mer object (from lme4) within my package but I can't seem to get the namespace to import the necessary method. I've simplified my package to this one function: --- ss - function(m)

[R] Defective help pages

2010-02-24 Thread Peter Danenberg
I'm trying to diagnose a bizarre problem in which the help files invoked from R are partially defective. help(), for instance, is missing the Description, Arguments and See Also sections; as are help files for other commands (see below). I've built 2.8.1, 2.10.1 and HEAD with the same results; do

Re: [R] extracting results from wilcox_test (package::coin)

2010-02-24 Thread Achim Zeileis
On Wed, 24 Feb 2010, chipmaney wrote: Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by() to group by site Output is a list: Herb.KW Herb.df$ID: 10-1 Kruskal-Wallis rank sum test data: Indicator_Rating by Year Kruskal-Wallis chi-squared = 15.24, df = 7,

[R] Inverse function

2010-02-24 Thread li li
Hi all, I have a function like the following: f - function(r, y){r/(2*pi)*exp(1)^(-y)*(1+r*(y/2)+r^(2)*(y-1)^(2)/6)} For fixed r, I want to find the inverse funtion in terms y. In other words, for fixed r, if the value of the function is given, I want to find the corrsponding y value

Re: [R] ggsave in Linux

2010-02-24 Thread Trevor Davis
On Wed, Feb 24, 2010 at 1:28 PM, Ryan Garner ryan.steven.gar...@gmail.comwrote: I have a script that creates a qplot that is then saved as a .png file which works fine on Windows. But I also work on Linux servers via Putty and would like to be able to create and save my plots to my working

[R] R error- more columns than column names

2010-02-24 Thread Euphoria
Hi all! I am desperately trying to figure out the solution to this error, but nothing as of yet is working. As noted in an earlier post I am using GenABEL. In an attempt to read in the phenotype file, in the format .dat, R keeps giving me the error more columns than column names I have tried

Re: [R] Inverse function

2010-02-24 Thread Bert Gunter
1. Is this a homework problem? 2. Etiquette on this list is to sign with your full real name. Adhering to the list etiquette may enhance your chance of a useful response, especially in view of (1), as we (or at least some of us) do not wish to do students' homework for them. 3. Hint: f(y,r) = a

Re: [R] mlogit is not an S4 object error

2010-02-24 Thread Achim Zeileis
On Wed, 24 Feb 2010, steve_fried...@nps.gov wrote: Hello, I've been getting the following error when using the mlogit function from the mlogit package This is one of the examples provided in the Package mlogit January 27, 2010 description data(Fishing, package=mlogit) Fish -

Re: [R] Inverse function

2010-02-24 Thread li li
This is not a homework problem. How to solve numerically for y from f(y,r) - a=g(y)=0? I am not too sure. Thanks! Hannah 2010/2/24 Bert Gunter gunter.ber...@gene.com 1. Is this a homework problem? 2. Etiquette on this list is to sign with your full real name.

[R] get problem

2010-02-24 Thread Georg Ehret
Dear R communtiy, I do not understand why this does not work...: betaS$SBP [1] 0.03274 -0.04216 -0.08986 -0.45980 0.60320 -0.63070 -0.05682 0.20130 t-c(betaS$SBP) t [1] betaS$SBP get(t) Error in get(t) : object 'betaS$SBP' not found [I am trying to use the variable t in a loop to call

Re: [R] get problem

2010-02-24 Thread Liviu Andronic
On 2/24/10, Georg Ehret georgeh...@gmail.com wrote: I do not understand why this does not work...: Previously I ran into this and I am also curious why it doesn't work, but you can work around so: x - NULL x$a - 1:10 x$b - 11:20 x $a [1] 1 2 3 4 5 6 7 8 9 10 $b [1] 11 12 13 14

Re: [R] mlogit is not an S4 object error

2010-02-24 Thread Steve_Friedman
Achim - Everyone Yes, I did exactly as you've suggested. I did the analysis over on both my windows XP machine and on my Linux machine. It worked correctly. I don't recall which other packages I installed the first time, but there was a conflict. Thanks you for the attention and the great

Re: [R] Question:How to get rid of missing values

2010-02-24 Thread Jim Lemon
On 02/25/2010 05:06 AM, Lu Wang wrote: ... The problem is the na.exclude function does not work here. Is it the reason that my missing values are not 'NA's but blank? How can I get the pie chart without those missing values? Hi Lu, Your problem is most easily solved when reading in the data.

Re: [R] get problem

2010-02-24 Thread David Winsemius
On Feb 24, 2010, at 4:31 PM, Georg Ehret wrote: Dear R communtiy, I do not understand why this does not work...: betaS$SBP [1] 0.03274 -0.04216 -0.08986 -0.45980 0.60320 -0.63070 -0.05682 0.20130 t-c(betaS$SBP) t [1] betaS$SBP get(t) Error in get(t) : object 'betaS$SBP' not found

Re: [R] R error- more columns than column names

2010-02-24 Thread Tal Galili
I usually found this problem to be connected to spaces in the column names. Or, a wrong sep argument (for example , instead of \t and the like) Let us know if it helped. Cheers, Tal Contact Details:--- Contact me:

Re: [R] get problem

2010-02-24 Thread Duncan Murdoch
On 24/02/2010 4:31 PM, Georg Ehret wrote: Dear R communtiy, I do not understand why this does not work...: betaS$SBP [1] 0.03274 -0.04216 -0.08986 -0.45980 0.60320 -0.63070 -0.05682 0.20130 t-c(betaS$SBP) t [1] betaS$SBP get(t) Error in get(t) : object 'betaS$SBP' not found The

Re: [R] R error- more columns than column names

2010-02-24 Thread Don MacQueen
From the help page for the read.delim() function, under See Also, suggests: 'count.fields' can be useful to determine problems with reading files which result in reports of incorrect record lengths. This is sometimes helpful. -Don At 1:14 PM -0800 2/24/10, Euphoria wrote: Hi all! I

Re: [R] R error- more columns than column names

2010-02-24 Thread Erik Iverson
I had a comment character # in my header names earlier today that threw this error. Euphoria wrote: Hi all! I am desperately trying to figure out the solution to this error, but nothing as of yet is working. As noted in an earlier post I am using GenABEL. In an attempt to read in the

[R] Adjust lattice graph axis label on final page

2010-02-24 Thread Sebastien Bihorel
Dear R-users, I was wondering if there was a way to adjust the placement of the axis titles for the last page of a multi-page lattice plot (see example below). Depending on the total number of panels, the placement of these titles might look strange on the last page, if the layout is not

Re: [R] R error- more columns than column names

2010-02-24 Thread Tal Galili
That makes me wonder, if one could devise a function to check for common reasons for this error and report them. What do you think Erik (and other R users) ? I mean, just going through the R-help list in search of this error - could yield many common reasons to check for... Tal

Re: [R] get problem

2010-02-24 Thread Douglas Bates
On Wed, Feb 24, 2010 at 3:56 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 24/02/2010 4:31 PM, Georg Ehret wrote: Dear R communtiy,   I do not understand why this does not work...: betaS$SBP [1]  0.03274 -0.04216 -0.08986 -0.45980  0.60320 -0.63070 -0.05682  0.20130 t-c(betaS$SBP)

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Gabor Grothendieck
On Wed, Feb 24, 2010 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi r-help-boun...@r-project.org napsal dne 24.02.2010 16:55:49: Petr, Removing the % signs by Ista's method works. However as I noted earlier, I was hoping there was a more elegant solution which deals with

[R] R Graphics into Latex‏

2010-02-24 Thread Lars Bishop
Hi, I'm new in Latex and I'm trying to include an R chart into a Latex document. This is what I'm doing: 1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps 2) In Latex (using TexWorks on windows xp) : In the preambule: \documentclass[11pt]{article} \usepackage{graphicx}

Re: [R] R Graphics into Latex‏

2010-02-24 Thread Ray Brownrigg
On Thu, 25 Feb 2010, Lars Bishop wrote: Hi, I'm new in Latex and I'm trying to include an R chart into a Latex document. This is what I'm doing: 1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps 2) In Latex (using TexWorks on windows xp) : In the preambule:

Re: [R] importing S4 methods using a namespace

2010-02-24 Thread Aaron Rendahl
Thanks very much! Importing from Matrix as you suggest fixes it. -- Aaron Rendahl, Ph.D. Statistical Consulting Manager School of Statistics, University of Minnesota NEW OFFICE (as of June 2009): 48C McNeal Hall, St. Paul Campus 612-625-1062 www.stat.umn.edu/consulting

[R] Sparse KMeans/KDE/Nearest Neighbors?

2010-02-24 Thread manyu_aditya
hi, I have a dataset (the netflix dataset) which is basically ~18k columns and well variable number of rows but let's assume 25 thousand for now. The dataset is very sparse. I was wondering how to do kmeans/nearest neighbors or kernel density estimation on it. I tired using the spMatrix

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread David Winsemius
On Feb 24, 2010, at 6:10 PM, Gabor Grothendieck wrote: On Wed, Feb 24, 2010 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi r-help-boun...@r-project.org napsal dne 24.02.2010 16:55:49: Petr, Removing the % signs by Ista's method works. However as I noted earlier, I was hoping

  1   2   >