[R] What am I doing wrong with sapply ?

2011-05-26 Thread eric
Statement 9 using sapply does not seem to give the correct answer (or at least to me). Yet I do what I think is the same thing with statement 11 and I get the answer I'm looking for. 9 : s -sapply(unlist(v[c(1:length(v))]), max) 11: for(i in 1 :length(v)) v1[i] - max(unlist(v[i])) Shouldn't I

[R] all possible regression

2011-05-26 Thread Mufira Fitria
hi, I want to know how about r package  Robust CP in all possible regression   method...can you help me?? thanks before... [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] likelihood ratio test

2011-05-26 Thread karuna m
Dear R-help, Can anybody tell me which R package has Lo-Mendell Rubin LR test and Bootstrap LR test to compare the model fit between k class and k+1 class model for Latent class analysis? Thanks in advance,  warn regards,Ms.Karunambigai M PhD Scholar Dept. of Biostatistics NIMHANS Bangalore

Re: [R] What am I doing wrong with sapply ?

2011-05-26 Thread Steve Lianoglou
Hi, On Thu, May 26, 2011 at 12:49 AM, eric ericst...@aol.com wrote: Statement 9 using sapply does not seem to give the correct answer (or at least to me). Yet I do what I think is the same thing with statement 11 and I get the answer I'm looking for. 9 : s -sapply(unlist(v[c(1:length(v))]),

Re: [R] What am I doing wrong with sapply ?

2011-05-26 Thread Joshua Wiley
Hi Eric, Hopefully the following addresses your question: library(XML) ## please do not include rm(list=ls()) in code other's might copy and paste ## it could remove things precious to them url - http://webapp.montcopa.org/sherreal/salelist.asp?saledate=05/25/2011; tbl

Re: [R] ordiellipse

2011-05-26 Thread Mark Difford
On May 26, 2011 Andrew Halford wrote: I am using ordiellipse to plot the ellipses and it works fine except one of my groups contains only 2 sites and I cannot get an ellipse around them. I'm assuming that 2 points is not enough to perform the relevant calculations here, however I would

[R] dataframe - column value calculation in R

2011-05-26 Thread Vijayan Padmanabhan
Dear RGroup I have a requirement for which I am seeking help. I am looking at automating the last column calculation through R when having the data of the other columns as a dataframe, In excel I can do using the formula function as given below, however, hereagain for the number of observations

Re: [R] dataframe - column value calculation in R

2011-05-26 Thread Timothy Bates
On 26 May 2011, at 08:02, Vijayan Padmanabhan wrote: I have a requirement for which I am seeking help. Best to just ask, compactly. This is a very straightforward question: best to read on how to use R: You are just set 1 column of a dataframe to a value based on the others, applying this to

Re: [R] Subtracting rows by id

2011-05-26 Thread Kenn Konstabel
Or without plyr: # Dennis's sample data but with shortened names ds - data.frame(id = rep(1:3, each = 10), value1 = sample(seq_len(100), 30, replace = TRUE)) k - data.frame(id = 1:3, sv = c(1, 3, 5)) do.call(rbind, mapply( function(a,b) subset(ds, id==a)[-1:-b,],

[R] R proxy settings for Mac

2011-05-26 Thread Marvin Mellem
Hi, I've read through the FAQs and in the R FAQ for Windows I found a valuable section on how to configure R to work with a proxy server. A colleague tested and confirms the solution works but now I have other colleagues connecting via the same proxy server (requiring authentication) using

Re: [R] [Fwd: Re: the mgcv package can not be loaded]

2011-05-26 Thread Simon Wood
the current version of nlme depends on R=2.13, according to CRAN. I would guess that this is the problem. So I think you'll either need to re-install an older R 2.12.2 compatible version of nlme, or upgrade R. On 25/05/11 17:18, gbre...@ssc.wisc.edu wrote: Sorry, I forgot to be more

Re: [R] problems getting the splm package installed

2011-05-26 Thread Uwe Ligges
On 26.05.2011 05:51, David Winsemius wrote: On May 25, 2011, at 10:21 PM, Rafael Terra wrote: Dear R-project members, I'm a newbie in R and I'm trying to install the splm package to analyze spatial panel data. I have the R x64 2.12.0 beta version installed in my computer. When I try to

Re: [R] [Fwd: Re: the mgcv package can not be loaded]

2011-05-26 Thread Uwe Ligges
On 26.05.2011 10:57, Simon Wood wrote: the current version of nlme depends on R=2.13, according to CRAN. I would guess that this is the problem. So I think you'll either need to re-install an older R 2.12.2 compatible version of nlme, or upgrade R. Although upgrading is never a bad idea,

[R] Plot binomial regression line

2011-05-26 Thread Jörgen Svan
Dear all, I am quite new with R and I have a problem with plotting a binomial regression line in a plot. This is what I type in: model-glm(Para~Size,binomial) par(mfrow=c(1,1)) xv-seq(3.2,4.5,0.01) yv-predict(model,list(area=xv),type=response) plot(Size,Para) lines(xv,yv) The error

Re: [R] document

2011-05-26 Thread rgui
Hi , that's what I did: I am connected to internet I selected the option choisir le site miroir de CRAN...a list of choices comes I chose France (Toulouse), since it is the nearest to my country, but an error message comes: Notification Message: In open.connection (con, r): connection to

Re: [R] Strings from different locale

2011-05-26 Thread sunny
Phil Spector wrote: Steven - Does typing Sys.setlocale('LC_ALL','C') before the offending command suppress the message? - Phil Spector Statistical Computing Facility

Re: [R] document

2011-05-26 Thread Uwe Ligges
On 26.05.2011 10:42, rgui wrote: Hi , that's what I did: I am connected to internet I selected the option choisir le site miroir de CRAN...a list of choices comes I chose France (Toulouse), since it is the nearest to my country, but an error message comes: Notification Message: In

[R] split data frame and manipulate

2011-05-26 Thread Mathew Brown
Hello, I would like to split the attached data frame based on the DATE variable. I'm having a real problem doing this. I am able to split iso-read.table(datuh.dat, header=TRUE, sep=, dec=.) #load mylist=split(iso,iso$DATE) #split str(mylist) #result seems a bit odd However, after splitting

Re: [R] Plot binomial regression line

2011-05-26 Thread Achim Zeileis
On Thu, 26 May 2011, Jörgen Svan wrote: Dear all, I am quite new with R and I have a problem with plotting a binomial regression line in a plot. This is what I type in: model-glm(Para~Size,binomial) par(mfrow=c(1,1)) xv-seq(3.2,4.5,0.01) yv-predict(model,list(area=xv),type=response)

[R] R-2.10.1 to R-2.13.0

2011-05-26 Thread ogbos okike
Dear List, I am currently running R-2.10.1. I wish to install R-2.13.0 or update my R-2.10.1 to the R-2.13.0. I have downloaded R-2.13.0 but wish to seek your advice before installing that. Please is there a better way of updating to the newer version other than downloading and installing the

Re: [R] Plot binomial regression line

2011-05-26 Thread Uwe Ligges
On 26.05.2011 10:45, Jörgen Svan wrote: Dear all, I am quite new with R and I have a problem with plotting a binomial regression line in a plot. This is what I type in: model-glm(Para~Size,binomial) par(mfrow=c(1,1)) xv-seq(3.2,4.5,0.01) yv-predict(model,list(area=xv),type=response)

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Duncan Murdoch
On 26/05/2011 6:02 AM, ogbos okike wrote: Dear List, I am currently running R-2.10.1. I wish to install R-2.13.0 or update my R-2.10.1 to the R-2.13.0. I have downloaded R-2.13.0 but wish to seek your advice before installing that. Please is there a better way of updating to the newer version

Re: [R] split data frame and manipulate

2011-05-26 Thread Uwe Ligges
On 26.05.2011 12:01, Mathew Brown wrote: Hello, I would like to split the attached data frame based on the DATE variable. I'm having a real problem doing this. I am able to split iso-read.table(datuh.dat, header=TRUE, sep=, dec=.) #load mylist=split(iso,iso$DATE) #split str(mylist) #result

[R] Using read.xls

2011-05-26 Thread vioravis
I am using read.xls command from the gdata package. I get the following error when I try to read a work sheet from an excel sheet. Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, : Intermediate file 'C:\Tmp\RtmpYvLnAu\file7f06650f.csv' missing! In addition: Warning

[R] text mining

2011-05-26 Thread rgui
Hi, how can I import a document whose type is. txt using the package tm? it is the command to know that my document is not placed in the library package tm. thanks. -- View this message in context: http://r.789695.n4.nabble.com/text-mining-tp3552221p3552221.html Sent from the R help mailing

Re: [R] Thiel's Uncertainty Coefficient

2011-05-26 Thread Marc Schwartz
On May 25, 2011, at 10:31 PM, Sparks, John James wrote: Dear R Helpers, I was looking at the email help threads in trying to find a calculation in R of Thiel's uncertainty coefficient. One of the writers offered to send the function in custom code to the inquirer. Can I get a copy of

[R] predictive accuracy

2011-05-26 Thread El-Tahtawy, Ahmed
I am trying to develop a prognostic model using logistic regression. I built a full , approximate models with the use of penalization - design package. Also, I tried Chi-square criteria, step-down techniques. Used BS for model validation. The main purpose is to develop a predictive model

[R] Divide matrix into multiple smaller matrices

2011-05-26 Thread mdvaan
Hi list, Using the script below, I have generated two lists (c and h) containing yearly matrices. Now I would like to divide the matrices in c into multiple matrices based on h. The number of matrices should be equal to: length(unique(DF1$B))*length(h). So each unique value in DF1$B get's a

Re: [R] R proxy settings for Mac

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 2:26 AM, Marvin Mellem wrote: Hi, I've read through the FAQs and in the R FAQ for Windows I found a valuable section on how to configure R to work with a proxy server. A colleague tested and confirms the solution works but now I have other colleagues connecting via the

Re: [R] likelihood ratio test

2011-05-26 Thread Ben Bolker
karuna m m_karuna2002 at yahoo.com writes: Can anybody tell me which R package has Lo-Mendell Rubin LR test and Bootstrap LR test to compare the model fit between k class and k+1 class model for Latent class analysis? I don't know, but library(sos) findFn(Lo-Mendell) findFn({latent

Re: [R] Time and db precision

2011-05-26 Thread Marc Schwartz
On May 25, 2011, at 6:25 PM, Mikkel Grum wrote: I have a loop that regularly checks for new data to analyse in my database. In order to facilitate this, the database table has a timestamp column with the time that the data was inserted into the database. Something like this: while ()

Re: [R] predictive accuracy

2011-05-26 Thread Claudia Beleites
Al, I'd redo everything and report in the paper that your peculiar predictor was contributing strongly to models that were built without excluding this predictor. This is an important information: your models get confused by the predictor (I'd consider this a lack of a certain kind of

Re: [R] Thiessen Method

2011-05-26 Thread Sarah Goslee
Federico, You've asked this a couple times. Did you try to find the answer yourself? If you search at rseek.org for Thiessen or Voronoi several functions appear that should do what you need. You didn't tell us anything about your data, so there's no possible way we can provide more specific

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread ogbos okike
Hi Duncan, Thanks for your time. Using ./configure as specified in the installation manual, I attempted to install R-2.13.0 but it reported an error message: checking for IceConnectionNumber in -lICE... no checking X11/Intrinsic.h usability... no checking X11/Intrinsic.h presence... no checking

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Steve Lianoglou
Hi, On Thu, May 26, 2011 at 10:05 AM, ogbos okike ogbos.ok...@gmail.com wrote: Hi Duncan, Thanks for your time. Using ./configure as specified in the installation manual, I attempted to install R-2.13.0 but it reported an error message: checking for IceConnectionNumber in -lICE... no

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Duncan Murdoch
On 26/05/2011 10:05 AM, ogbos okike wrote: Hi Duncan, Thanks for your time. Using ./configure as specified in the installation manual, I attempted to install R-2.13.0 but it reported an error message: checking for IceConnectionNumber in -lICE... no checking X11/Intrinsic.h usability... no

Re: [R] stepwise selection cox model

2011-05-26 Thread linda Porz
Sorry, my question was: Are these two functions (Stata and fastbw (rule=p) R function) should give the same results to the same data? Maybe I need to run these two functions on more than one datasets to answer myself. Many thanks, Linda 2011/5/25 David Winsemius dwinsem...@comcast.net On May

Re: [R] About Tinn-R

2011-05-26 Thread PereiraGA
Hello JCFaria, I have the same problem Tinn-R (Marcos' problem), and your comments help me. tanks PereiraGA -- View this message in context: http://r.789695.n4.nabble.com/About-Tinn-R-tp3440475p3552593.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread ogbos okike
Hi Steve, Many thanks. I added :deb http://cran.at.r-project.org/bin/linux/ubuntu lucid/ in my source.list and then tried sudo apt-get update. The last lines of the result says: Reading package lists... Done W: GPG error: http://cran.at.r-project.org lucid/ Release: The following signatures

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Hugo Mildenberger
Ogbos, I don't use Ubunto too, but X-11 headers should be installable running apt-get xorg-dev and/or (possibly) apt-get libx11-dev xlibs-dev Best On Thursday 26 May 2011 16:13:36 Duncan Murdoch wrote: On 26/05/2011 10:05 AM, ogbos okike wrote: Hi

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of ogbos okike Sent: Thursday, May 26, 2011 7:42 AM To: Steve Lianoglou Cc: r-help@r-project.org Subject: Re: [R] R-2.10.1 to R-2.13.0 Hi Steve, Many thanks. I added :deb

Re: [R] R-2.10.1 to R-2.13.0

2011-05-26 Thread Steve Lianoglou
Hi, On Thu, May 26, 2011 at 10:42 AM, ogbos okike ogbos.ok...@gmail.com wrote: Hi Steve, Many thanks. I added :deb http://cran.at.r-project.org/bin/linux/ubuntu lucid/ in my source.list and then tried sudo apt-get update. The last lines of the result says: Reading package lists... Done W:

Re: [R] predictive accuracy

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 7:42 AM, El-Tahtawy, Ahmed wrote: I am trying to develop a prognostic model using logistic regression. I built a full , approximate models with the use of penalization - design package. Also, I tried Chi-square criteria, step-down techniques. Used BS for model

[R] table of Design regressions?

2011-05-26 Thread David Hugh-Jones
Hi all Just a quick question which I can't find an answer for in the usual places: I would like to create a table of regression output, with one or more regressions in the columns, a la xtable. But I am using models from the Design package. Is there anything out there that will play nicely with

Re: [R] Time and db precision

2011-05-26 Thread Mikkel Grum
Thanks Marc, I had just come up with another, slightly more convoluted solution. Add as.is = TRUE to the query and then get the timetoken with timetoken - df$timestamp[df$timestamp == max(as.POSIX(df$timestamp))] While it looks like options(digits.secs = 6) works, I worry that theoretically

[R] JGR/Deducer Installation

2011-05-26 Thread Vikas Garud
Hi, Sorry if this is to wrong mailing list. In that case, please point me to correct mailing list. Please also excuse rather long mail - I am not sure what piece of information would be useful for anybody who could help me. Couple of days back I had put a query about box-plots using GUI. I

Re: [R] Compiling Rgraphiz on Windows 7 64bit with R-2.13.0

2011-05-26 Thread jirivoller
Hello, This tread helped me to finally move somewhere with rgraphviz installation. But it seems there is a problem with vignette creation. I have the same configuration as Ben (Win7 -64bit,R-2.13.0, Rtools version 2.13.0.1901,graphviz from goodies) and did the changes suggested by Martin. The

Re: [R] Using read.xls

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 5:09 AM, vioravis wrote: I am using read.xls command from the gdata package. I get the following error when I try to read a work sheet from an excel sheet. Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, : Intermediate file

[R] Plotting device does not show all graphs

2011-05-26 Thread John S
Dear All, I am creating 4 plots (files) but I could see only 3. Here is a simple code d=data.frame(age=rnorm(100,40,8),ht=rnorm(100,170,15)) tiff(file=paste(test,%03d,.tif,sep=)) hist.data.frame(d) datadensity(d) par(mfrow=c(1,2),mar=c(3,3,3,3)) boxplot(d$age) hist(age) dev.off() PDF

Re: [R] table of Design regressions?

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 10:01 AM, David Hugh-Jones wrote: Hi all Just a quick question which I can't find an answer for in the usual places: I would like to create a table of regression output, with one or more regressions in the columns, a la xtable. But I am using models from the Design

Re: [R] Using read.xls

2011-05-26 Thread Jonathan Daily
Another workaround if you don't need to batch the process up is to highlight the cells of the excel file in question, copy it to the clipboard, and use read.table(clipboard). I also use this often when people pass me huge, unwieldy excel files that have multiple sets of data, summaries, formula,

Re: [R] Compiling Rgraphiz on Windows 7 64bit with R-2.13.0

2011-05-26 Thread Duncan Murdoch
On 26/05/2011 10:25 AM, jirivoller wrote: Hello, This tread helped me to finally move somewhere with rgraphviz installation. But it seems there is a problem with vignette creation. I have the same configuration as Ben (Win7 -64bit,R-2.13.0, Rtools version 2.13.0.1901,graphviz from goodies) and

[R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
Dear list, We have three time course profiles with very different scales, and we want to show them in one plot. Is it possible to have three y axis? I guess not, then what would be other options? something like two 2-y axis plots on a three dimensional view? Appreciate any comment. Jun Shen

Re: [R] Using read.xls

2011-05-26 Thread Gabor Grothendieck
On Thu, May 26, 2011 at 11:09 AM, Marc Schwartz marc_schwa...@me.com wrote: On May 26, 2011, at 5:09 AM, vioravis wrote: I am using read.xls command from the gdata package. I get the following error when I try to read a work sheet from an excel sheet. Error in xls2sep(xls, sheet, verbose =

Re: [R] Plotting device does not show all graphs

2011-05-26 Thread Sarah Goslee
Well, when I try to run your sample code, I get one figure and a bunch of error messages. How about an actual executable example and the requested basic information on your OS, version of R, etc? That would make it a lot easier to offer useful suggestions (by which I mean possible).

Re: [R] 3 Y axis possible?

2011-05-26 Thread jim holtman
There is nothing to prevent you from putting 3 y-axis on your plot; might be confusing, but it can be done. What have you tried and why do you say guess not? With the use of par(new=TRUE) or by doing your own scaling, you can use 'axis' to put as many axises as you want on your graph. On Thu,

Re: [R] Using read.xls

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 10:16 AM, Gabor Grothendieck wrote: On Thu, May 26, 2011 at 11:09 AM, Marc Schwartz marc_schwa...@me.com wrote: On May 26, 2011, at 5:09 AM, vioravis wrote: I am using read.xls command from the gdata package. I get the following error when I try to read a work sheet

Re: [R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
Hi, Jim, Thanks for the information. But I am still not clear how to show the 3 separated Y axis. If I just call par(new=TRUE), the three axes are overlapped. attached some test data. Thanks. Jun = structure(list(Time =

Re: [R] 3 Y axis possible?

2011-05-26 Thread jim holtman
Try this: plot(x$Time, x$y1, type='l', bty = 'c', col = 'red') par(new = TRUE) plot(x$Time, x$y2, type = 'l', axes = FALSE, xlab = '', ylab = '', col = 'green') axis(4, col='green') par(new = TRUE) plot(x$Time, x$y3, type = 'l', axes = FALSE, xlab = '', ylab = '', col = 'blue') axis(4,

[R] matrix not working

2011-05-26 Thread Dat Mai
Hello All, I'm trying to create a matrix from a dataframe (let's call it df): ..a..b.c.d a inputs output b inputs output c inputs output d inputs output e inputs output The inputs are represented by columns a and b The outputs are represented by

Re: [R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
Hi, jim That's exactly what I wanted. One more trivial thing. How do I get rid the border line on the top? Thanks again. Jun On Thu, May 26, 2011 at 11:20 AM, jim holtman jholt...@gmail.com wrote: Try this: plot(x$Time, x$y1, type='l', bty = 'c', col = 'red') par(new = TRUE) plot(x$Time,

Re: [R] Time and db precision

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 10:04 AM, Mikkel Grum wrote: Thanks Marc, I had just come up with another, slightly more convoluted solution. Add as.is = TRUE to the query and then get the timetoken with timetoken - df$timestamp[df$timestamp == max(as.POSIX(df$timestamp))] While it looks like

Re: [R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
I just found out by setting bty='l' to get rid of the border line on the top. On Thu, May 26, 2011 at 11:41 AM, Jun Shen jun.shen...@gmail.com wrote: Hi, jim That's exactly what I wanted. One more trivial thing. How do I get rid the border line on the top? Thanks again. Jun On Thu, May

Re: [R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
Jim, One more question, how do I put a label on the axes I added? Thanks. I don't see any argument in axis() for that? Thanks Jun On Thu, May 26, 2011 at 11:20 AM, jim holtman jholt...@gmail.com wrote: Try this: plot(x$Time, x$y1, type='l', bty = 'c', col = 'red') par(new = TRUE)

Re: [R] 3 Y axis possible?

2011-05-26 Thread David Winsemius
On May 26, 2011, at 1:25 PM, Jun Shen wrote: Jim, One more question, how do I put a label on the axes I added? Thanks. I don't see any argument in axis() for that? Thanks You don't see the `labels` argument in the help page for `axis`? Jun David Winsemius, MD West Hartford, CT

[R] R import glitch missing data

2011-05-26 Thread StatBat2
Hello! I am trying import data into R and im running into a snag. GOAL: Import a 4 column, 8,000 row table into R including headers. WHAT I'VE ATTEMPTED: Original data was in Excel format. Converted data to both a .txt and .csv (to see which worked better) Imported data into R via commands as

[R] bringing worldclim data into R

2011-05-26 Thread Lori12
Hi, I'm going to try to do some species distribution modeling in R using Mahalanobis distance. I have presence point locations for the species and I have ASCII files for each of the WorldClim variables for North America. My question is how do I bring these into R? If this is too complex, I have

[R] matching by gender and age

2011-05-26 Thread 1Rnwb
Hello R gurus, I have a data set from which i have to extract the gender and age matched rows from controls and disease group disease-paste(rep(c('y','n'),11)) gender-paste(rep(c('m','f'),11)) mcp-rnorm(700,1400) age-rnorm(32,34)

Re: [R] Thiessen Method

2011-05-26 Thread federico.eccel
Dear Sarah, I have a grid in which 8 raingauges are locted, in my case the dataset is composed by 8 hourly timeseries, one for each raingauge. I would like to obtain from these timeseries using the Thiessen method the values of the precipitation in all the grid. In particular I would like to

[R] interpolation and extremum location of a surface

2011-05-26 Thread Clement LAUZIN
Hello, I have a x,y,z file. Z is not corresponding to a simple analytical function of x and y. I am trying to find the minimum value of z by a spline interpolation or from a polynomial fit. I tried the akima package but as the location of the point I am looking for (the minimum) is outside of

Re: [R] R import glitch missing data

2011-05-26 Thread Peter Langfelder
On Thu, May 26, 2011 at 10:03 AM, StatBat2 nstruckme...@harryanddavid.com wrote: Hello! I am trying import data into R and im running into a snag. GOAL: Import a 4 column, 8,000 row table into R including headers. WHAT I'VE ATTEMPTED: Original data was in Excel format. Converted data to

Re: [R] matching by gender and age

2011-05-26 Thread David Winsemius
On May 26, 2011, at 11:19 AM, 1Rnwb wrote: Hello R gurus, I have a data set from which i have to extract the gender and age matched rows from controls and disease group You need to define what you mean by age-matched. Your example creates a very narrow age range which further adds

Re: [R] R import glitch missing data

2011-05-26 Thread David Winsemius
On May 26, 2011, at 1:59 PM, Peter Langfelder wrote: On Thu, May 26, 2011 at 10:03 AM, StatBat2 nstruckme...@harryanddavid.com wrote: Hello! I am trying import data into R and im running into a snag. GOAL: Import a 4 column, 8,000 row table into R including headers. WHAT I'VE ATTEMPTED:

Re: [R] R import glitch missing data

2011-05-26 Thread Struckmeier, Nathanael
That is the strange thing... I DON'T get a warning message. R behaves as if all data is being imported successfully. I don't receive a memory warning, or warning of any kind. I've scanned my data for potential problems and I do not have any ('). However... The .txt version of my file does use ()

Re: [R] R import glitch missing data

2011-05-26 Thread StatBat2
That is the strange thing... I DON’T get a warning message. R behaves as if all data is being imported successfully. I don't receive a memory warning, or warning of any kind. I've scanned my data for potential problems and I do not have any ('). However... The .txt version of my file does use ()

[R] 'constrained' negative.binomial model estimates

2011-05-26 Thread Carson Farmer
Hello list, I am not sure if the terminology that I am using here is widely used, however, I provide an example in the hopes that my problem will become clear. My basic problem is that I am unsure of how to 'constrain' my model estimates to reproduce the aggregate (by factor levels) observed

Re: [R] Thiessen Method

2011-05-26 Thread Sarah Goslee
Federico, That's an improvement, but a long way from the reproducible example requested by the posting guide. I and others who might help are more interested in the way the data and coordinates are organized and a detailed explanation of what you expect the results to look like, etc, than in a

Re: [R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
David, I surely tried the labels argument. But it seems for tick marks not for a text label. Did you see a different outcome? Thanks. Jun On Thu, May 26, 2011 at 12:38 PM, David Winsemius dwinsem...@comcast.netwrote: On May 26, 2011, at 1:25 PM, Jun Shen wrote: Jim, One more question,

Re: [R] 3 Y axis possible?

2011-05-26 Thread Walmes Zeviani
You can use mtext() par(mar=c(5.1,4.1,4.1,5.1)) plot(x$Time, x$y1, type='l', bty = 'c', col = 'red') par(new = TRUE) plot(x$Time, x$y2, type = 'l', axes = FALSE, xlab = '', ylab = '', col= 'green') axis(4, col='green') mtext(side=4, text=label green, line=2) par(new = TRUE) plot(x$Time, x$y3,

Re: [R] 3 Y axis possible?

2011-05-26 Thread David Winsemius
On May 26, 2011, at 2:18 PM, Jun Shen wrote: David, I surely tried the labels argument. But it seems for tick marks not for a text label. Did you see a different outcome? Thanks. `labels` is for labels, `at` is for tick (and label) locations. They should be the same length. One label

Re: [R] Thiessen Method

2011-05-26 Thread Thomas Adams
Federico, I understand what you are after — you want time-series estimates based on the Thiessen polygon estimates taken from the station time-series data. My recommendation is that the process of doing this would be far easier using something like GRASS GIS, possibly in conjunction with R

Re: [R] matrix not working

2011-05-26 Thread Andy Zhu
Dat: 1. you can use as.matrix to convert data.frame to matrix; 2. it is likely that the internal representation of your data.frame may not be numerical value; matrix can only take on numeric. --- On Thu, 5/26/11, Dat Mai dat.d@gmail.com wrote: From: Dat Mai dat.d@gmail.com Subject:

[R] Survival: pyears and ratetable: expected events

2011-05-26 Thread Jim Trabas
Dear all, I am having a (really) hard time getting pyears to work together with a ratetable to give me the number of expected events (deaths). I have the following data: dos, date of surgery, as.Date dof, date of last follow-up, as.Date dos, date of surgery, as.Date sex, gender, as.factor

[R] Suppress intermediate results on console

2011-05-26 Thread Lisa
Dear all, I have a question about how to suppress intermediate results in a function on console. For example, I will use summary() in my own function that looks like: myfunction - function(…) { … Summary(x) … } Then myfunction() will print “x” on console that is intermediate result and

Re: [R] Compiling Rgraphiz on Windows 7 64bit with R-2.13.0

2011-05-26 Thread jirivoller
Duncan, installing MikTeX solved the problem. thank you. -- View this message in context: http://r.789695.n4.nabble.com/Compiling-Rgraphiz-on-Windows-7-64bit-with-R-2-13-0-tp3493750p3553281.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Count of rows while looping through data

2011-05-26 Thread Jeanna
Thank you both. These solutions are far more elegant than anything I could have come up with, and I appreciate the opportunity to learn new commands within the context of my own data. I think I've got it working now. :) -- View this message in context:

Re: [R] matrix not working

2011-05-26 Thread David Winsemius
On May 26, 2011, at 1:53 PM, Andy Zhu wrote: Dat: 1. you can use as.matrix to convert data.frame to matrix; 2. it is likely that the internal representation of your data.frame may not be numerical value; matrix can only take on numeric. Not true. Can be any single mode, including

Re: [R] Suppress intermediate results on console

2011-05-26 Thread Jonathan Daily
Well, since we have no idea what x is, that is going to be hard to do. Are you calling summary because you want the info on the last iteration of a loop? If so, just put the summary call outside the loop. Otherwise, why are you calling summary if you don't want a summary? Also, the posting guide

Re: [R] text mining

2011-05-26 Thread Matevž Pavlič
HI, I do it like this : setwd(C:/Users/mpavlic/Desktop/Temp) library(tm) tekst - Corpus(DirSource(.),readerControl = list(language =ansi)) where *.txt files are stored in a folder Temp in my desktop, HTH, m -Original Message- From: r-help-boun...@r-project.org

[R] Question about ggplot2

2011-05-26 Thread Julian TszKin Chan
Hi all, Is there any way for me to to string in the argument of qplot or ggplot? for example qplot(x='carat',y='price',data=diamonds,geom=c('point','smooth')) instead of qplot(x=carat,y=price,data=diamonds,geom=c('point','smooth')) Thanks!! Regards, TszKin Julian [[alternative HTML

Re: [R] R import glitch missing data

2011-05-26 Thread StatBat2
Wierd... sorry about the double posting... -- View this message in context: http://r.789695.n4.nabble.com/R-import-glitch-missing-data-tp3553079p3553444.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] matrix not working

2011-05-26 Thread Dat Mai
When I use the as.matrix, the data.frame does turn into a matrix, but I cannot change the dimensions of the matrix. I'd still want it to have that pseudo cartesian format (e.g. [a1,b1], [a2,b2]) On Thu, May 26, 2011 at 6:58 PM, David Winsemius dwinsem...@comcast.netwrote: On May 26, 2011, at

Re: [R] matrix not working

2011-05-26 Thread Bert Gunter
Please... ?[ Online tutorial An Introduction to R. I think you'll find everything you need in these. -- Bert On Thu, May 26, 2011 at 12:39 PM, Dat Mai dat.d@gmail.com wrote: When I use the as.matrix, the data.frame does turn into a matrix, but I cannot change the dimensions of the

[R] NaN, Inf to NA

2011-05-26 Thread Albert-Jan Roskam
Hi, I want to recode all Inf and NaN values to NA, but I;m surprised to see the result of the following code. Could anybody enlighten me about this? df - data.frame(a=c(NA, NaN, Inf, 1:3)) df[is.infinite(df) | is.nan(df)] - NA df a 1 NA 2 NaN 3 Inf 4 1 5 2 6 3 Thanks!

Re: [R] What are the common Standard Statistical methods used for the analysis of a dataset

2011-05-26 Thread Greg Snow
I think the IOTT is more a general testing framework rather than a single test (like maximum likelihood, least squares, bootstrap, etc.) so a single function won't capture the whole IOTT. There are already many functions available to do IOTT for many cases (well the user needs to provide the

Re: [R] NaN, Inf to NA

2011-05-26 Thread Ian Gow
df$a[is.infinite(df$a) | is.nan(df$a) ] - NA df a 1 NA 2 NA 3 NA 4 1 5 2 6 3 On 5/26/11 3:18 PM, Albert-Jan Roskam fo...@yahoo.com wrote: Hi, I want to recode all Inf and NaN values to NA, but I;m surprised to see the result of the following code. Could anybody enlighten me about

Re: [R] 3 Y axis possible?

2011-05-26 Thread Jun Shen
Thanks a bunch, Walmes. One more concern, the new Y axes added do not extend all the way down to cross with x axis. Is there anyway to make them look like the very first Y axis on the left? Jun On Thu, May 26, 2011 at 1:24 PM, Walmes Zeviani walmeszevi...@gmail.comwrote: You can use mtext()

[R] confidence interval on mean in log-regression

2011-05-26 Thread Alice Shelly
Hello- I am looking for R function that will give me some proper confidence intervals on un-transformed mean prediction when performing a linear regression on log-transformed data. I am referring to the UMVU estimate, the el-shaarawi and viveros (1997) estimate, or the Wu, wong, and Wei (2005)

Re: [R] Suppress intermediate results on console

2011-05-26 Thread Lisa
Thanks for your comments and suggestion. I didn’t show all my own function here because it has many lines. “x” is the results of another function. I am calling summary because I want to extract some values from the results. -- View this message in context:

Re: [R] predictive accuracy

2011-05-26 Thread El-Tahtawy, Ahmed
The strong predictor is the country/region where the study was conducted. So it is not important/useful for a clinician to use it (as long he/she is in USA or Europe). Excluding that predictor will make another 2 insignificant predictors to become significant!! Can the new model have a

  1   2   >