Re: [R] a question about 'read.table' with or without 'read.table'.(urgent)

2010-08-05 Thread karena
Great! Thank you -- View this message in context: http://r.789695.n4.nabble.com/a-question-about-read-table-with-or-without-read-table-urgent-tp2314423p2314450.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Finding the right url for RCurl

2010-08-05 Thread AndrewPage
Hi all, I am using RCurl to try and download data from a website, but I'm having trouble finding out what URL to use. Here is the site: http://www.invescopowershares.com/products/holdings.aspx?ticker=PGX See how in the upper right, above the displayed sheet, there's a link to download the

[R] questions about string handling

2010-08-05 Thread karena
Hi, I have a question about the data handling. I have a dataset as following: ID snp1snp2 snp3 1001 0/0 1/11/1 1002 2/2 3/31/1 1003 4/4 3/32/2 I want to convert the dataset to the following

Re: [R] error with ReadAffy()

2010-08-05 Thread mandova
I don't know if it has anything to do with these installation warnings: * installing to library ‘/home/mandova/R/i486-pc-linux-gnu-library/2.11’ * installing *source* package ‘affy’ ... creating cache ./config.cache checking how to run the C preprocessor... cc -E checking for main in -lz... yes

[R] a question about 'read.table' with or without 'read.table'.(urgent)

2010-08-05 Thread karena
Hi, I've got a quite tricky question. I have a txt file, named 'temp.txt', as the following: snp1snp2snp3 AA 00 00 GG GG 00 00 AA 00 I want to read the file into R. 1) when I use 'read.table' without 'header=T' option,

Re: [R] questions about string handling

2010-08-05 Thread Peter Alspach
Tena koe Karena See ?sub and ?gsub HTH ... Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of karena Sent: Thursday, 5 August 2010 12:56 p.m. To: r-help@r-project.org Subject: [R] questions about string handling

Re: [R] split / lapply over multiple columns

2010-08-05 Thread Peter Dalgaard
Ralf B wrote: Besides beauty, is there an actual advantage in terms of run-time and/or memory use? If you look at the actual definition of tapply, I'm sure you realize that the answer is no: ans - lapply(split(X, group), FUN, ...) inbetween 40-odd lines of red tape is something of a

Re: [R] questions about string handling

2010-08-05 Thread Michael Bedward
How about this (df is your input data.frame) data.frame(ID=df[,1], apply(df[,2:4], 2, function(x) c(00, AA, GG, CC, TT)[match(x, c(0/0, 1/1, 2/2, 3/3, 4/4))])) Michael On 5 August 2010 10:55, karena dr.jz...@gmail.com wrote: Hi, I have a question about the data handling. I have a dataset as

[R] PageUp/Down in gnome-terminal

2010-08-05 Thread Olga Lyashevska
Dear all, I am using gnome-terminal to run R, and I noticed that standard PageUp/Down do not work but they do work for other programs within the same terminal window (e.g. irssi). Scroll bar does not work either. I run R using GNU-screen, but it doesn't seem to make any difference. Many thanks

Re: [R] applying strsplit to a whole column

2010-08-05 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.08.2010 21:03:10: I am sorry, someone said that strsplit automatically works on a column. How exactly does it work? For example, if I want to grab just the first (or the second) part of the string in nam1 that should be split based on ..

[R] Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread Ralf B
I am dealing with very large data frames, artificially created with the following code, that are combined using rbind. a - rnorm(500) b - rnorm(500) c - rnorm(500) d - rnorm(500) first - data.frame(one=a, two=b, three=c, four=d) second - data.frame(one=d, two=c, three=b, four=a)

Re: [R] offlist comment Re: KS Test question (2)

2010-08-05 Thread Ralf B
This is unbelievable. Now people like yourself start doing background searches on one and accusing one of not being professional plus posting cheeky R code. The reason why I submitted the questions I have submitted was that these answers did not satisfy my particular problem (or perhaps I

Re: [R] Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread Philipp Pagel
On Thu, Aug 05, 2010 at 03:53:21AM -0400, Ralf B wrote: a - rnorm(500) Error: cannot allocate vector of size 38.1 Mb When running memory.limit() I am getting this: memory.limit() [1] 2047 Which shows me that I have 2 GB of memory available. What is wrong? Shouldn't 38 MB be very

[R] Odp: Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 05.08.2010 09:53:21: I am dealing with very large data frames, artificially created with the following code, that are combined using rbind. a - rnorm(500) b - rnorm(500) c - rnorm(500) d - rnorm(500) first - data.frame(one=a,

Re: [R] offlist comment Re: KS Test question (2)

2010-08-05 Thread Siri Bjoner
Just my $0.02... There have been a number of postings and questions on the list in the last couple of weeks (that is, there seems to be a larger percentage of such mail than usual...). Maybe a happy monthly reminder could be sent out with the posting guide? And maybe there could be

Re: [R] PageUp/Down in gnome-terminal

2010-08-05 Thread Liviu Andronic
On Thu, 05 Aug 2010 08:56:30 +0200 Olga Lyashevska o...@herenstraat.nl wrote: I am using gnome-terminal to run R, and I noticed that standard PageUp/Down do not work but they do work for other programs within the same terminal window (e.g. irssi). Scroll bar does not work either. Try

Re: [R] PageUp/Down in gnome-terminal

2010-08-05 Thread Olga Lyashevska
Thanks Liviu, On Thu, 2010-08-05 at 09:51 +0100, Liviu Andronic wrote: On Thu, 05 Aug 2010 08:56:30 +0200 Olga Lyashevska o...@herenstraat.nl wrote: I am using gnome-terminal to run R, and I noticed that standard PageUp/Down do not work but they do work for other programs within the same

Re: [R] Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread Ralf B
Thank you for such a careful and thorough analysis of the problem and your comparison with your configuration. I very much appreciate. For completeness and (perhaps) further comparison, I have executed 'version' and sessionInfo() as well: version _ platform i386-pc-mingw32

[R] Installing packages and passing parameters

2010-08-05 Thread Alaios
Hello I am trying to install the RandomFields package by using install.packages(RandomFields) but the process fails. I think that if I pass to the g++ compiler the -lgfortran option might work. Could you please help me do this? I would like to thank you in advance for your help Best Regards

Re: [R] applying strsplit to a whole column

2010-08-05 Thread Bart Joosen
Maybe I'm completely wrong, but I get sometimes names like X..123 when I import data through read.delim, read.table, ... When it's necessary I avoid the X..123 by adding read.delim(xxx, check.names=F) HTH Bart -- View this message in context:

Re: [R] ticks label of plot

2010-08-05 Thread Jim Lemon
On 08/05/2010 07:14 AM, yan liu wrote: Hello, I had a question about how to label a axis of a plot. for example, my plot is plot(1:100, axes=F) box() axis(1) then, I want my y-axis has six ticks ( at=seq(0,100,10)) , but I don't want to label all the 11 ticks, I only want to label the 1st,

Re: [R] Installing packages and passing parameters

2010-08-05 Thread Uwe Ligges
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. This suggests to tell us: OS? R version? Output you got so far? Best, Uwe Ligges On 05.08.2010 11:16, Alaios wrote: Hello I am trying to install

Re: [R] question about SVM in e1071

2010-08-05 Thread Pau Carrio Gaspar
Jack, sorry for the late answer. I agree that my last post is misleading. Here a new try: * * Increasing the value of *C* (...) forces the creation of a more accurate model, that may not generalise well.(Try to imagine the feature space with the two mapped sets very far from each other ) A model

[R] Error in as.environment(pos): using 'as.environment(NULL)' is defunct

2010-08-05 Thread Immanuel Seeger
Hello, I’m using R 2.11.1 with Tinn-R 1.17.2.4. I hope the given informations are enough (it’s my first entry here) The as.environment(pos) error appears in using the following code which should open a function in an other R-file. Here some extractions of the code:

Re: [R] Output (graphics and table/text)

2010-08-05 Thread Liviu Andronic
On Wed, 4 Aug 2010 18:02:41 -0400 Ralf B ralf.bie...@gmail.com wrote: b) the output is actually presented as a little table without the need to use a LaTeX solution? If it's not imperative to have the ks.test output in the graphic, why not copy/paste and use some monospace font? Liviu

Re: [R] PageUp/Down in gnome-terminal

2010-08-05 Thread Liviu Andronic
On Thu, 05 Aug 2010 11:13:00 +0200 Olga Lyashevska o...@herenstraat.nl wrote: shift+pagep/pagedown doesnt work either. xfce is a desktop environment similar to gnome or kde, right? Yes, with less dependencies and less hungry on resources. I do not have any desktop environment (running R on a

Re: [R] Output (graphics and table/text)

2010-08-05 Thread baptiste auguie
Hi, To add tables, the gplots package has a textplot() function, and for Grid graphics there is a grid.table() function in gridExtra. HTH, baptiste On 5 August 2010 00:02, Ralf B ralf.bie...@gmail.com wrote: Hi R Users, I need to produce a simple report consisting of some graphs and a

Re: [R] Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread Petr PIKAL
Hi I am not an expert in such issues (never really run into problems with memory size). From what I have read in previous posts on this topic (and there are numerous) the simplest way would be to go to 64 byte system (Linux, W Vista, 7), where size of objects is limited by amount of memory

Re: [R] offlist comment Re: KS Test question (2)

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 4:10 AM, Ralf B wrote: This is unbelievable. Now people like yourself start doing background searches on one and accusing one of not being professional Your words, not mine. plus posting cheeky R code. It appeared that you were having problems and did not have an

[R] Extracting future and past workday dates

2010-08-05 Thread Sergey Goriatchev
Hello everyone I need to extract a vector of (t-3) to (t+3) dates, only working days. How can I do that? For today I need a vector: 10.08.210 09.08.2010 06.08.2010 05.08.2010 04.08.2010 03.08.2010 02.08.2010 Regards, Sergey -- Kniven skärpes bara mot stenen.

Re: [R] Error: cannot allocate vector of size xxx Mb

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 3:53 AM, Ralf B wrote: I am dealing with very large data frames, artificially created with the following code, that are combined using rbind. snipped When running memory.limit() I am getting this: memory.limit() [1] 2047 Which shows me that I have 2 GB of memory

Re: [R] Extracting future and past workday dates

2010-08-05 Thread Henrique Dallazuanna
Try this: c(Sys.Date() + 0:3, Sys.Date() - 0:3) or 0:3 %*% matrix(c(1, -1), ncol = 2) + Sys.Date() On Thu, Aug 5, 2010 at 8:36 AM, Sergey Goriatchev serg...@gmail.com wrote: Hello everyone I need to extract a vector of (t-3) to (t+3) dates, only working days. How can I do that? For

[R] multiple comparisons after glm

2010-08-05 Thread ZAUGG Isabelle
Dear list members, I have a question concerning multiple comparisons after using glm. My response variable is days until emergence of an insect species. The explanatory variables are sex (two levels), parasitoids added (two levels) and populations (34 levels). I would like to know now which

Re: [R] Extracting future and past workday dates

2010-08-05 Thread Sergey Goriatchev
Hi, Henrique Thank you for trying, but that is not what I want. You get WEEKdays, I need WORKdays, and preferably sorted in order from future to the past. Best, Sergey On Thu, Aug 5, 2010 at 14:06, Henrique Dallazuanna www...@gmail.com wrote: Try this: c(Sys.Date() + 0:3, Sys.Date() - 0:3)

Re: [R] Extracting future and past workday dates

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 8:09 AM, Sergey Goriatchev wrote: Hi, Henrique Thank you for trying, but that is not what I want. You get WEEKdays, I need WORKdays, and preferably sorted in order from future to the past. Perhaps you would be pleased to know that there is an is.holiday function in

Re: [R] Extracting future and past workday dates

2010-08-05 Thread Sergey Goriatchev
Thank you David, will check it out, as I use chron and zoo! Regards, Sergey On Thu, Aug 5, 2010 at 14:29, David Winsemius dwinsem...@comcast.net wrote: On Aug 5, 2010, at 8:09 AM, Sergey Goriatchev wrote: Hi, Henrique Thank you for trying, but that is not what I want. You get WEEKdays, I

Re: [R] Extracting future and past workday dates

2010-08-05 Thread Henrique Dallazuanna
Try this: n - 3 w - as.numeric(format(Sys.Date(), '%w')) fut - c(Sys.Date() - 0:(n + ifelse(w - n 6, (w - n) - 6, 0)), Sys.Date() + 1:(n + 1 + ifelse(w + n 6, (w + n) - 6, 0))) sort(fut[!format(fut, '%w') %in% c(6, 0)]) On Thu, Aug 5, 2010 at 9:09 AM, Sergey Goriatchev

[R] colour of label points on a boxplot

2010-08-05 Thread alison waller
Hi all, I have 6 datasets(dataframes Assem_ContigsLen7 through all_ContigsLen12) containing 3 columns (contig_id, contig_length, read_count). Each dataset is composed of 3 types of contigs (assemblies of genomic fragments), 1- all Bacterial fragments, 2 - all Viral fragments, 3 - mixed

[R] linear model with similar response predictor

2010-08-05 Thread Giuseppe Amatulli
Hi, can somebody tell me why R is not able to calculate a linear model written in this way? lm (seq(1:100)~seq(1:100)) Call: lm(formula = seq(1:100) ~ seq(1:100)) Coefficients: (Intercept) 50.5 Warning messages: 1: In model.matrix.default(mt, mf, contrasts) : the response appeared on

[R] For Loop

2010-08-05 Thread Turn Fall
I have some code that is working. The code calculates the error from the real vale when it does a run. The error in metres in called errorxy I want to do 10 runs of the code and everytime it does a run I want to an output of the errorxy, so that it can form an array. I am guessing I should

[R] Reshape? I need it?

2010-08-05 Thread spigo
Dear all, I'm new here, I'm starting to learn R (oh my God!!). So, now I'm in panic because I have this situation: TIPO Avariato A 0.05 B 0.09 A 9 B 8 A 9 B 3 and this is what I would like to do: AvariatoA B Avariato0.050.09

Re: [R] For Loop

2010-08-05 Thread Erik Iverson
Hello, Please read the posting guide found at the bottom of every post to this list. We need to be able to see a small, reproducible example of code that illustrates your question. It sounds like you might be looking for ?replicate. On 08/05/2010 03:47 AM, Turn Fall wrote: I have some code

Re: [R] offlist comment Re: KS Test question (2)

2010-08-05 Thread Stuart Luppescu
On 木, 2010-08-05 at 07:32 -0400, David Winsemius wrote: I do no see where that is posting cheeky R code. I saw it as trying to be constructive. Using it would only be part of the recommended actions to take before posting Ralf B., Dr. Wisemius is one of the most prolific, unselfish,

Re: [R] colour of label points on a boxplot

2010-08-05 Thread John Kane
It would really help if you could reduce the information below to a small reproducible example, that is, some small bit of code that a reader can paste into R and poke around at. For sending a small sample dataset have a look at ?dput I believe that this problem has been discussed on the

Re: [R] linear model with similar response predictor

2010-08-05 Thread Erik Iverson
On 08/05/2010 05:50 AM, Giuseppe Amatulli wrote: Hi, can somebody tell me why R is not able to calculate a linear model written in this way? lm (seq(1:100)~seq(1:100)) Call: lm(formula = seq(1:100) ~ seq(1:100)) Coefficients: (Intercept) 50.5 Warning messages: 1: In

Re: [R] linear model with similar response predictor

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 6:50 AM, Giuseppe Amatulli wrote: Hi, can somebody tell me why R is not able to calculate a linear model written in this way? lm (seq(1:100)~seq(1:100)) Call: lm(formula = seq(1:100) ~ seq(1:100)) Coefficients: (Intercept) 50.5 Warning messages: 1: In

Re: [R] Reshape? I need it?

2010-08-05 Thread Michael Bedward
Hello, For that simple case you could just do... newdf - data.frame(A=df[df$TIPO == A,2], B=df[df$TIPO == B,2]) where df is the name of your existing data.frame Michael On 5 August 2010 20:57, spigo nicola.spigo...@gmail.com wrote: Dear all, I'm new here, I'm starting to learn R (oh my

Re: [R] Reshape? I need it?

2010-08-05 Thread Henrique Dallazuanna
Try this: unstack(DF, Avariato ~ TIPO) On Thu, Aug 5, 2010 at 7:57 AM, spigo nicola.spigo...@gmail.com wrote: Dear all, I'm new here, I'm starting to learn R (oh my God!!). So, now I'm in panic because I have this situation: TIPO Avariato A 0.05 B 0.09 A 9 B

[R] build.pl in building library with Rtools211

2010-08-05 Thread Hintzen, Niels
Dear all, As I couldn't find any thread on the internet I hope the help-list might help me out. I've tried to update Rtools from R210 used in combination with R2.9.1 to R211 in combination with R2.11.1. However, I do not succeed. I have R2.11.1 running, as well as Inno Setup 5, HTML help and

Re: [R] a question about 'read.table' with or without 'read.table'.(urgent)

2010-08-05 Thread John Kane
I believe Wu Gong has given you a solution. As a note you were probably reading in the first two columns as either factors or characters and the last one as numeric. You might want to try it again and then do a str() on the resulting data.frame to see what was happening. It can be

Re: [R] Reshape? I need it?

2010-08-05 Thread Stefan Grosse
Am 05.08.2010 12:57, schrieb spigo: I don't know how to do it. I need to use reshape? how? thanks for your reply. example(reshape) Stefan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] plot points using vis.gam

2010-08-05 Thread mra
Hello, I'm trying to illustrate the relationships between various trait and environment data gathered from a number of sites. I've created a GAM to do this: gam1=gam(trait~s(env1)+s(env2)+te(env1,env2)) and I know how to create a 3D plot using vis.gam. I want to be able to show points on the 3D

Re: [R] REmove level with zero observations

2010-08-05 Thread Allan Engelhardt
On 03/08/10 21:50, GL wrote: If I have a column with 2 levels, but one level has no remaining observations. Can I remove the level? Like this? d - data.frame(a = factor(rep(A, 3), levels = c(A, B))) levels(d$a) # [1] A B d$a - d$a[,drop=TRUE] levels(d$a) # [1] A Hope this helps Allan

[R] A %nin% operator?

2010-08-05 Thread Ken Williams
Sometimes I write code like this: qf.a - subset(qf, pubid %in% c(104, 106, 107, 108)) qf.b - subset(qf, !pubid %in% c(104, 106, 107, 108)) and I get a little worried that maybe I've remembered the precedence rules wrong, so I change it to qf.a - subset(qf, pubid %in% c(104, 106, 107, 108))

Re: [R] A %nin% operator?

2010-08-05 Thread David Huffer
See Harrell's Hmisc package -- David Huffer, Ph.D. Deputy Director CSOSA/ORE Washington, DC -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ken Williams Sent: Thursday, August 05, 2010 11:20 AM To: r-help@r-project.org Subject:

Re: [R] A %nin% operator?

2010-08-05 Thread Erik Iverson
Just FYI, the Hmisc package has had an implementation of %nin% for some time now. Ken Williams wrote: Sometimes I write code like this: qf.a - subset(qf, pubid %in% c(104, 106, 107, 108)) qf.b - subset(qf, !pubid %in% c(104, 106, 107, 108)) and I get a little worried that maybe I've

Re: [R] A %nin% operator?

2010-08-05 Thread Ken Williams
Ha! Thanks. I should have a closer look at Hmisc in general. -Ken On 8/5/10 10:25 AM, David Huffer david.huf...@csosa.gov wrote: See Harrell's Hmisc package -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ken Williams

[R] several figures from one Sweave chunk?

2010-08-05 Thread Liviu Andronic
Dear all It seems that it is not possible [1] to generate several graphs in a loop within an Sweave document. For example, fig=TRUE for (i in 1:4) plot(rnorm(100)+i) @ will not work. Since this limitation dates from old times (at least 2005), I was curious whether workarounds other than

Re: [R] A %nin% operator?

2010-08-05 Thread baptiste Auguié
For curiosity's sake, and perhaps closer in keystrokes to R home, here's another version, `%ni%` - Negate(`%in%`) baptiste On Aug 5, 2010, at 5:30 PM, Ken Williams wrote: Ha! Thanks. I should have a closer look at Hmisc in general. -Ken On 8/5/10 10:25 AM, David Huffer

Re: [R] A %nin% operator?

2010-08-05 Thread David Winsemius
The examples in the help page for %in% (shared by match) has the definition of a %w/o% binary operator. %w/o% - function(x,y) x[!x %in% y] #-- x without y since: %in% - function(x, table) match(x, table, nomatch = 0) 0 It appears that you have just re-invented the without-wheel. (which

Re: [R] A %nin% operator?

2010-08-05 Thread Ken Williams
Yeah, and %w/o% seems to have reinvented setdiff(). =) -Ken On 8/5/10 10:53 AM, David Winsemius dwinsem...@comcast.net wrote: The examples in the help page for %in% (shared by match) has the definition of a %w/o% binary operator. %w/o% - function(x,y) x[!x %in% y] #-- x without y since:

[R] Help installation lme4a,

2010-08-05 Thread rod84
Dear R users, I recently downloaded the library lme4a by svn checkout svn://svn.r-forge.r-project.org/svnroot/lme4. I tried to install the library lme4a by copying the downloaded document in the location where all the R libraries are saved. When I try to load the library, I obtain the message

Re: [R] A %nin% operator?

2010-08-05 Thread Jeremy Miles
A related hint, Google doesn't let you search for %nin%, because it ignores % symbols (and most other punctuation), but cuil does allow you to search: http://cuil.com/search?q=%25nin%25+R On 5 August 2010 08:53, David Winsemius dwinsem...@comcast.net wrote: The examples in the help page for %in%

Re: [R] Help installation lme4a,

2010-08-05 Thread Kevin E. Thorpe
rod84 wrote: Dear R users, I recently downloaded the library lme4a by svn checkout svn://svn.r-forge.r-project.org/svnroot/lme4. I tried to install the library lme4a by copying the downloaded document in the location where all the R libraries are saved. When I try to load the library, I

[R] an issue about missing data

2010-08-05 Thread karena
Hi, I am using a function 'polygenic' in the package called 'GenABEL'. h2.gs - polygenic(b.dbp~age+age2+age3+sex+b.bmi, kin=gs.gkin, data=gs)

[R] interpretation of summary.lm() for ANOVA and ANCOVA when dealing with 2 or more factors

2010-08-05 Thread Birte Reichstein
Hi, I am having a hard time getting what the summary.lm-output for an ANOVA / ANCOVA means. Examples I find always seem to deal with simpler cases than what I meet in my data. My main problem is understanding the output when getting significant INTERACTION TERMS (what never occurs in examples

Re: [R] colour of label points on a boxplot

2010-08-05 Thread Jean V Adams
Alison, Check out the options for the function bxp(), they include control over the colors of all parts of the boxplot, e.g., whiskcol for whisker color. Jean `·.,, (((º `·.,, (((º `·.,, (((º Jean V. Adams Statistician U.S. Geological Survey Great Lakes Science Center 223 East

[R] Help installation lme4a, Error Message: lme4a is not a valid installed library

2010-08-05 Thread rod84
Dear R users, I recently downloaded the library lme4a by svn checkout svn://svn.r-forge.r-project.org/svnroot/lme4. I tried to install the library lme4a by copying the downloaded document in the location where all the R libraries are saved. When I try to load the library, I obtain the message

[R] using grib files in R

2010-08-05 Thread Janet Nye
I am not new to R, but I am new to .grib files. I am downloading some climate data and I would like to analyze it in R. R has a nice netcdf package, but I don’t see any package available to deal specifically with grib files. I see a few posts from other people using grib files in R. However, I

Re: [R] an issue about missing data

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 12:23 PM, karena wrote: Hi, I am using a function 'polygenic' in the package called 'GenABEL'. h2.gs - polygenic(b.dbp~age+age2+age3+sex+b.bmi, kin=gs.gkin, data=gs) Have you considered

[R] compare gam fits

2010-08-05 Thread Mike Lawrence
Hi folks, I originally tried R-SIG-Mixed-Models for this one (https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q3/004170.html), but I think that the final steps to a solution aren't mixed-model specific, so I thought I'd ask my final questions here. I used gamm4 to fit a generalized

Re: [R] KS Test question (2)

2010-08-05 Thread Greg Snow
The warning (with an error you would not see any results) means that there are ties in your data, the theory behind the ks test says that the probability of seeing ties is 0, so your data and the theory do not match, therefore the p-value is suspect (though an ok approximation for some uses).

Re: [R] Kolmogorov-Smirnov test, which one to use?

2010-08-05 Thread Greg Snow
It is not clear what question you are trying to answer. Perhaps if you can give us an explanation of your overall goal then we can be more helpful. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message-

Re: [R] metafor and meta-analysis at arm-level

2010-08-05 Thread Viechtbauer Wolfgang (STAT)
Dear Angelo, rma(yi=o, sei=se, mods=~s+t-1, method=REML) is *a* way to run the arm-based pairwise meta-analysis. Whether it is the *correct* way is a question I cannot answer. lme(o~s+t-1, random=~t-1 | s, weights=(~ se^2)) is a different model. First of all, it adds a random effect only to

[R] Sciviews-K -- object 'httpdPort' not found

2010-08-05 Thread Albert-Jan Roskam
Hi, I'm trying to install Sciviews-K on Linux Ubuntu 9.10 (karmic) but I'm not able to establish the connection between Komodo and R. Here;s the error I get, plus some diagnostic info: R version 2.9.2 (2009-08-24) R is SciViews ready! Error in get(name, envir = asNamespace(pkg), inherits =

Re: [R] Metafor

2010-08-05 Thread Viechtbauer Wolfgang (STAT)
Correct. -- Wolfgang Viechtbauerhttp://www.wvbauer.com/ Department of Methodology and StatisticsTel: +31 (0)43 388-2277 School for Public Health and Primary Care Office Location: Maastricht University, P.O. Box 616 Room B2.01 (second floor) 6200 MD

Re: [R] Finding the right url for RCurl

2010-08-05 Thread Brian Diggs
On 8/4/2010 2:07 PM, AndrewPage wrote: Hi all, I am using RCurl to try and download data from a website, but I'm having trouble finding out what URL to use. Here is the site: http://www.invescopowershares.com/products/holdings.aspx?ticker=PGX See how in the upper right, above the displayed

Re: [R] Help installation lme4a, Error Message: lme4a is not a valid installed library

2010-08-05 Thread Douglas Bates
On Thu, Aug 5, 2010 at 9:31 AM, rod84 ngueye...@hotmail.com wrote: Dear R users, I recently downloaded the library lme4a by svn checkout svn://svn.r-forge.r-project.org/svnroot/lme4. I tried to install the library lme4a by copying the downloaded document in the location where all the R

Re: [R] Sciviews-K -- object 'httpdPort' not found

2010-08-05 Thread Romain Francois
Hi, httpdPort arrived with R 2.10.0, apparently Sciviews-K relies on this, so you need to upgrade R to a newer version. Romain Le 05/08/10 19:16, Albert-Jan Roskam a écrit : Hi, I'm trying to install Sciviews-K on Linux Ubuntu 9.10 (karmic) but I'm not able to establish the connection

Re: [R] Help installation lme4a, Error Message: lme4a is not a valid installed library

2010-08-05 Thread Rodrigue NGUEYEP
Thank you for your prompt response,I am using Windows. Date: Thu, 5 Aug 2010 12:32:19 -0500 Subject: Re: [R] Help installation lme4a, Error Message: lme4a is not a valid installed library From: ba...@stat.wisc.edu To: ngueye...@hotmail.com CC: r-help@r-project.org On Thu, Aug

Re: [R] Help installation lme4a,

2010-08-05 Thread rod84
Thank you for your prompt response. I am not used to the process of building a package. And I am using Windows as an OS.Do you have some steps I should follow to be able to build the package.Thank you for your time and recommendations. Date: Thu, 5 Aug 2010 09:19:18 -0700 From:

Re: [R] Help installation lme4a,

2010-08-05 Thread Uwe Ligges
On 05.08.2010 19:48, rod84 wrote: Thank you for your prompt response. I am not used to the process of building a package. And I am using Windows as an OS.Do you have some steps I should follow to be able to build the package.Thank you for your time and recommendations. See the manual R

Re: [R] Finding the right url for RCurl

2010-08-05 Thread Henrique Dallazuanna
Try this: library(XML) readHTMLTable(' http://www.invescopowershares.com/products/holdings.aspx?ticker=PGX', which = 13, header = TRUE) On Wed, Aug 4, 2010 at 6:07 PM, AndrewPage savejar...@yahoo.com wrote: Hi all, I am using RCurl to try and download data from a website, but I'm having

Re: [R] offlist comment Re: KS Test question (2)

2010-08-05 Thread Ralf B
Hi David, I would like to apologize for what I wrote earlier. It was late and I was frustrated. Please give me time to adapt to the formal structures of the forum. Best, Ralf On Thu, Aug 5, 2010 at 7:32 AM, David Winsemius dwinsem...@comcast.net wrote: On Aug 5, 2010, at 4:10 AM, Ralf B

[R] Plotting range of values in barplot()

2010-08-05 Thread yankeetilidie
Hello, I am attempting to create a bar plot that contains a range of possible response values on the x-axis of 1 to 5 and contains barplots for the number of responses even in the event that there are 0 responses. For example, I have a data set that contains values of 2, 3, 4, and 5 but I would

[R] difficulties with read.table applied to files from URL

2010-08-05 Thread Archana Dayalu
Hello, I am using read.table to read files directly from a public ftp site. I have a general list of files that may or may not exist in the ftp directory, but my hope was that R would read the file if it existed and ignored it if it didn't exist and move on to the next one. However, when R

Re: [R] difficulties with read.table applied to files from URL

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 2:48 PM, Archana Dayalu wrote: Hello, I am using read.table to read files directly from a public ftp site. I have a general list of files that may or may not exist in the ftp directory, but my hope was that R would read the file if it existed and ignored it if it

[R] Exporting nlme summary

2010-08-05 Thread Ronald Wendt
I'm trying to export the results of my summary data for the object horton.nlme, but failing miserably. Running summary(horton.nlme) works fine, but both write.table and write.csv return the error cannot coerce class 'c(summary.lme, nlme, lme)' into a data.frame. I know I can copy and paste the

Re: [R] Sciviews-K -- object 'httpdPort' not found

2010-08-05 Thread Albert-Jan Roskam
Hi, Thank you, you're right. I should have read the website more carefully: Download and install R (installers for Linux, Mac OS X universal, Windows, ...; use at least R 2.10.1). http://www.sciviews.org/SciViews-K/index.html In Windows, I use that version but I didn't think about it when

Re: [R] difficulties with read.table applied to files from URL

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 3:05 PM, David Winsemius wrote: On Aug 5, 2010, at 2:48 PM, Archana Dayalu wrote: Hello, I am using read.table to read files directly from a public ftp site. I have a general list of files that may or may not exist in the ftp directory, but my hope was that R would

Re: [R] Finding the right url for RCurl

2010-08-05 Thread AndrewPage
Thanks for the help so far-- one interesting thing about this particular page is that the data displayed on the website actually differs from the data you can access with the download link. The XML package command works, but the table it produces in R has the following column names: x1 =

Re: [R] an issue about missing data

2010-08-05 Thread karena
thank you, but even after I tried 'complete.cases' function, I still get the same error messages. help. -- View this message in context: http://r.789695.n4.nabble.com/an-issue-about-missing-data-tp2315094p2315519.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] an issue about missing data

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 3:44 PM, karena wrote: thank you, but even after I tried 'complete.cases' function, How did you try? I still get the same error messages. What does str(gs) tell you? help. Plaintive cries for help are considerably less useful than details about the

[R] Multiply each depth level of an array with another vector element

2010-08-05 Thread Maurits Aben
Suppose x - array(c(1,1,1,1,2,2,2,2), dim = c(2,2,2)) y - c(5, 10) Now I would like to multiply x[, , 1] with y[1] and x[, , 2] with y[2]. Possible solution is a for-loop: for (i in 1:2) { x[, , i] * y[i] } Another possible solution is this construction:

Re: [R] Plotting range of values in barplot()

2010-08-05 Thread Marc Schwartz
On Aug 5, 2010, at 1:22 PM, yankeetilidie wrote: Hello, I am attempting to create a bar plot that contains a range of possible response values on the x-axis of 1 to 5 and contains barplots for the number of responses even in the event that there are 0 responses. For example, I have a

[R] How to extract se(coef) from cph?

2010-08-05 Thread Biau David
Hello, I am modeling some survival data wih cph (Design). I have modeled a predictor which showed non linear effect with restricted cubic splines. I would like to retrieve the se(coef) for other, linear, predictors. This is just to make nice LateX tables automatically. I have the coefficients

[R] try-error within for loop

2010-08-05 Thread Olga Lyashevska
Dear all, I run a loop wrapped in try(), and for each of the rows where try-error is true I want to fill that row with NA (at the moment it is omitted). So I would expect to get a dataframe with 1000 rows some of which would be empty, but instead I get a dataframe with 995 rows. In this case

Re: [R] How to extract se(coef) from cph?

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 4:03 PM, Biau David wrote: Hello, I am modeling some survival data wih cph (Design). I have modeled a predictor which showed non linear effect with restricted cubic splines. I would like to retrieve the se(coef) for other, linear, predictors. The cph object has a

Re: [R] an issue about missing data

2010-08-05 Thread karena
library(GenABEL) gs.b - gs ok - complete.cases(g...@phdata[,c('sex','age','b.dbp','b.bmi')]) gs.b - gs.b[ok] g...@phdata - g...@phdata[,c('id','sex','age','b.dbp','b.bmi')] index=1:g...@gtdata@nsnps ran.snp=sample(index,261,replace=F) gs.b.gkin=ibs(gs.b[,ran.snp], weight=freq)

Re: [R] How to extract se(coef) from cph?

2010-08-05 Thread Abhijit Dasgupta, PhD
if the cph model fit is m1, you can try sqrt(diag(m1$var)) This is coded in print.cph.fit (library(rms)) On 08/05/2010 04:03 PM, Biau David wrote: Hello, I am modeling some survival data wih cph (Design). I have modeled a predictor which showed non linear effect with restricted cubic

  1   2   >