Re: [R] How to show number in the %f format?

2009-09-23 Thread David Winsemius
On Sep 23, 2009, at 6:42 PM, Peng Yu wrote: On Wed, Sep 23, 2009 at 5:16 PM, David Winsemius > wrote: On Sep 23, 2009, at 5:58 PM, Peng Yu wrote: Hi, I have the following matrix, which is printed %e format (in C's way). I am wondering how make it be printed in %f format (in C's way)? ?

[R] Statistical analysis

2009-09-23 Thread Chris Li
Hi all, I have got two datasets, one of them is rainfall data and the other one is groundwater level data. I would like to see whether there is a correlation between these two datasets and if there is, to what extent they are correlated. My stats background is limited, therefore any advice on w

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-23 Thread ws
Webb Sprague gmail.com> writes: > > >> xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) > > wkhp > >  20   30   40   45   60 > >   1    1   10    1    3    4 now this doesn't even work > table(wtf, exclude=NULL) wtf [0,10) [10,20) [20,30) [30,40) [40,50) [50,60) [60,70)

[R] scaled Schoenfeld residuals

2009-09-23 Thread Greg Dropkin
hi sorry if this has been discussed before, but I'm wondering why the scaled Schoenfeld residuals do not follow the defining formula for obtaining them from the ordinary Schoenfeld residuals, but are instead offset by the estimated parameter values. e.g. library(survival) attach(ovarian) sv<-Sur

[R] set choose.files directory?

2009-09-23 Thread mdusaire
Hi, I've been trying to set the directory for choose.files as follows: [R2.9.0 running on XP] setwd("C:/Documents and Settings/2/Data") getwd() infile2 = choose.files(filters = Filters[c("txt","All"),], caption = "Choose ECD datafile") #<...do a bunch of stuff...> It appears the working dir

[R] Box plot

2009-09-23 Thread alphaace
Hi, Is there a way I can plot the median as well as the quantiles in the actual boxplot using the "boxplot" command? Thanks -- View this message in context: http://www.nabble.com/Box-plot-tp25531261p25531261.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Stretch the x-axis for better alignment comparison

2009-09-23 Thread Maggie
I have the following code that aligns the two graphs. Problem is that in .pdf it gives me it x-axis (0-100) is broken down into 0-20, 20-40..and so on. I wonder if there is for it to display the x-axis (and y-axis) in more detail than that. I'd appreciate your input -- pdf(file="VECTOR & ICA ALIGN

Re: [R] any advice on web interfaces to R?

2009-09-23 Thread jverzani
Mitchell Maltenfort gmail.com> writes: > > I saw http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces > and I'm still not sure yet which platform (Linux, Windows, etc.) I'll > be working on -- and no, it's not under my control to pick. > > I was wondering if anyone out there had good a

[R] save txt file

2009-09-23 Thread Eiger
Hi, I have 2 questions: Question 1: I define 2 variables: "a", "b": > a<-rbinom(4,10,0.8) output: [1] 9 7 8 8 > b<-rbinom(2,6,0.7) output: [1] 4 5 if I write: > write.table(a, file = "filename", etc. etc. ) it save only the values of variable "a". There is a way to save in a .txt file

[R] Fw: Simulating and Plotting

2009-09-23 Thread KABELI MEFANE
R -helpers   i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define. I have also been able to do simple rendom sample. If possible can someone help here is the code for the graph pleae help   data.frame(ID=c(1,2,3),mu=c(1

Re: [R] stripchart with pch %in% 21:25 with bg

2009-09-23 Thread Peter Ehlers
Jean lobry wrote: I think that it's a good idea, although I have rarely made use of pch > 20. This reminds me to pass on a very belated thank-you to the developer(s) who implemented the formula version for stripchart, which I had promised to do myself quite a long time ago. Thanks, folks! Peter

Re: [R] Optimise parameter of a generic function

2009-09-23 Thread Samuel Dennis
Typical, spotted a very stupid typo in my code after posting, and when corrected I have solved my own problem. Sorry for bothering everyone. Line below should have read: optimise(f = nbinopt, interval = c(0,100), maximum=FALSE, tol=0.01) Samuel Dennis wrote: > > optimise(f = nbin063, interval =

[R] Optimise parameter of a generic function

2009-09-23 Thread Samuel Dennis
I would like to know how to determine the best value of a particular parameter in a generic function. My function is: nbin <- function(k,Dt) { R <- Dt / (k + Dt) q <- (k + Dt) / k Pt <- c(0:7) for (r in c(0:7)) { Pt[r+1] <- (factorial(k+r-1)/(factorial(r)*factorial(k-1)))*((R^r)/(q^k)) } Pt } Th

Re: [R] Newbie Question About Setting Plot Axis Limits

2009-09-23 Thread Thomas Lumley
On Wed, 23 Sep 2009, Jason Rupert wrote: Using the following: plot(c(1,1), ylim=c(0, 15), xlim=c(0, 13)) This is not what I expected because I would have expected the origin to be (0, 0), but on the plot it looks a little different on the plot. The y axis also appears to extend a little be

Re: [R] Statistical analysis

2009-09-23 Thread cls59
Chris Li wrote: > > Hi all, > > I have got two datasets, one of them is rainfall data and the other one is > groundwater level data. > > I would like to see whether there is a correlation between these two > datasets and if there is, to what extent they are correlated. > > My stats backgroun

Re: [R] Newbie Question About Setting Plot Axis Limits

2009-09-23 Thread andrew
This is not a complete answer, but try the following in order plot(c(1,1), ylim=c(0, 15), xlim=c(0, 13), axes = FALSE) axis(1) axis(2) box() If you want lines, use abline. Hacking something together can be done with these commands. On Sep 24, 9:36 am, Jason Rupert wrote: > Using the following

Re: [R] read.delim very slow in reading files with lots of columns

2009-09-23 Thread Benilton Carvalho
use the 'colClasses' argument and you can also set 'nrows'. b On Sep 23, 2009, at 8:24 PM, Ping-Hsun Hsieh wrote: Hi, I am trying to read a tab-delimited file into R (Ver. 2.8). The machine I am using is 64bit Linux with 16 GB. The file is basically a matrix(~600x70) and as large as

[R] Newbie Question About Setting Plot Axis Limits

2009-09-23 Thread Jason Rupert
Using the following: plot(c(1,1), ylim=c(0, 15), xlim=c(0, 13)) However, it produces the following: http://n2.nabble.com/Simple-Plot-Axis-Limits-Question-td3703091.html This is not what I expected because I would have expected the origin to be (0, 0), but on the plot it looks a little different

Re: [R] Creating loops with strings

2009-09-23 Thread cls59
cls59 wrote: > > > data.file <- paste( set.name, sep='' ) > > assign( set.name, read.dta( file.name ), envir = .GlobalEnv ) > > Opps, those lines should have been: data.file <- paste( set.name, '.dta', sep='' ) assign( set.name, read.dta( data.file ), envir = .GlobalEnv ) Sor

Re: [R] Creating loops with strings

2009-09-23 Thread cls59
Rakknar wrote: > > Hello. I'm trying to run a series of commands in two different datasets. > For make it efficient I want to make a loop for it. Until now the only > command for loops i found it's the for() command it's only for series of > numbers and not a series of strings, witch it's what

[R] read.delim very slow in reading files with lots of columns

2009-09-23 Thread Ping-Hsun Hsieh
Hi, I am trying to read a tab-delimited file into R (Ver. 2.8). The machine I am using is 64bit Linux with 16 GB. The file is basically a matrix(~600x70) and as large as 3GB. The read.delim() ran extremely slow (hours) even with a subset of the file (31 MB with 6x70) I monitored

Re: [R] save txt file

2009-09-23 Thread cls59
Eiger wrote: > > Hi, I have 2 questions: > > > Question 1: > > I define 2 variables: "a", "b": > >> a<-rbinom(4,10,0.8) > output: > [1] 9 7 8 8 > >> b<-rbinom(2,6,0.7) > output: > [1] 4 5 > > if I write: >> write.table(a, file = "filename", etc. etc. ) > it save only the values of va

Re: [R] How to show number in the %f format?

2009-09-23 Thread Peng Yu
On Wed, Sep 23, 2009 at 5:16 PM, David Winsemius wrote: > > On Sep 23, 2009, at 5:58 PM, Peng Yu wrote: > >> Hi, >> >> I have the following matrix, which is printed %e format (in C's way). >> I am wondering how make it be printed in %f format (in C's way)? > > ??"printf"  # scroll down to base pac

Re: [R] generate random number without repetition

2009-09-23 Thread Benilton Carvalho
if you want to sample integers in [1, 33K] without replacement: theSample = sample(33000, 18000) b On Sep 23, 2009, at 7:29 PM, phoebe kong wrote: Hi all, I would like to generate ~18K random number from range 1 to ~33K. I was thinking to use round(runif(18000,1,33000)), however the some

[R] generate random number without repetition

2009-09-23 Thread phoebe kong
Hi all, I would like to generate ~18K random number from range 1 to ~33K. I was thinking to use round(runif(18000,1,33000)), however the some random numbers generated are repeated. Do you know a better way? thanks, phoebe [[alternative HTML version deleted]] __

Re: [R] How to show number in the %f format?

2009-09-23 Thread David Winsemius
On Sep 23, 2009, at 5:58 PM, Peng Yu wrote: Hi, I have the following matrix, which is printed %e format (in C's way). I am wondering how make it be printed in %f format (in C's way)? ??"printf" # scroll down to base package listings, the C function ?sprintf# the s/r function Regard

[R] How to show number in the %f format?

2009-09-23 Thread Peng Yu
Hi, I have the following matrix, which is printed %e format (in C's way). I am wondering how make it be printed in %f format (in C's way)? Regards, Peng > significant_analysis_results[,7:8] pval(ki-wt) pval(ko-wt) Nab2 1.913348979e-06 2.731944670e-09 Rasal12.482254110e

Re: [R] Barplot+Table

2009-09-23 Thread Marc Schwartz
On Sep 23, 2009, at 3:51 PM, Andy Choens wrote: Marc Schwartz wrote: Using the data that is in the online plot rather than the above, here is a first go. Note that I am not drawing the background grid in the barplot or the lines for table below it. These could be added if you really need them.

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-23 Thread Webb Sprague
Note that the variable below has been generated with cut(), if that matters. On Wed, Sep 23, 2009 at 2:34 PM, ws wrote: > Webb Sprague gmail.com> writes: > >> >> >> xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) >> > wkhp >> >  20   30   40   45   60 >> >   1    1   10    1    3    4 > > (For

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-23 Thread ws
Webb Sprague gmail.com> writes: > > >> xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) > > wkhp > >  20   30   40   45   60 > >   1    1   10    1    3    4 (Forgive me for the repost, but I just joined the R list, so maybe this will go through.) Now the above doesn't work! See : > table(

[R] Simulating and Plotting

2009-09-23 Thread KABELI MEFANE
R-helpers   I have been learning a little bit of R. I am simulating and i want to draw a normal curve for all my variables so that i will see the overlaps and reduce them, after that i want to draw a gragh of all the values that are in the data frame to see if it follows a normal distribution al

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
Thanks Greg. I was also thinking about it after I saw my plots. Cheers../Murli -Original Message- From: Greg Snow [mailto:greg.s...@imail.org] Sent: Wednesday, September 23, 2009 3:49 PM To: Nair, Murlidharan T; Henrique Dallazuanna Cc: r-help@r-project.org Subject: RE: [R] dotchart to

Re: [R] Fortran vs R

2009-09-23 Thread John Sorkin
Because Fortan is a complied language, as opposed to R which is an interpreter, Fortran is orders of magnitude faster than R Because R is a high level programming language developed for statistical analyses, for many problems it is much easier, and faster, to program statistical analyses wtih R

Re: [R] glm analysis repeated for 900 variables

2009-09-23 Thread Christian Schulz
> > On 23/09/2009, at 11:26 PM, Christian Schulz wrote: > > > Hi, > > > > > > nvars <- 902 > > data <- as.data.frame(matrix(runif(100*nvars),ncol=nvars)) > > colnames(data)[901] <- c('phenotype') > > colnames(data)[902] <- c('outcome') > > > > Just ***WHAT*** do you think the ``c( )''

Re: [R] Barplot+Table

2009-09-23 Thread Andy Choens
Marc Schwartz wrote: >Using the data that is in the online plot rather than the above, here >is a first go. Note that I am not drawing the background grid in the >barplot or the lines for table below it. These could be added if you >really need them. Note: I snipped out the syntax from Marc'

Re: [R] stripchart with pch %in% 21:25 with bg

2009-09-23 Thread Jean lobry
I think that it's a good idea, although I have rarely made use of pch > 20. This reminds me to pass on a very belated thank-you to the developer(s) who implemented the formula version for stripchart, which I had promised to do myself quite a long time ago. Thanks, folks! Peter Ehlers Hi Peter,

Re: [R] stripchart with pch %in% 21:25 with bg

2009-09-23 Thread Peter Ehlers
I think that it's a good idea, although I have rarely made use of pch > 20. This reminds me to pass on a very belated thank-you to the developer(s) who implemented the formula version for stripchart, which I had promised to do myself quite a long time ago. Thanks, folks! Peter Ehlers Jean lobry

Re: [R] dotchart to barplots

2009-09-23 Thread Peter Ehlers
Well, it was easy to find: ?barplot and look at all the arguments. But I agree with Greg that this kind of look is (and should be) pretty much history. I'm not very fond of barplots with as many groups as you have. Since your variable X appears to be a discretized continuous variable, why not use

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
Guess, I miss the argument when I ?barplot. Cheers../Murli -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Wednesday, September 23, 2009 3:56 PM To: Nair, Murlidharan T Cc: r-help@r-project.org Subject: Re: [R] dotchart to barplots Murli, Two points: 1. I think

Re: [R] Best way to arrange data

2009-09-23 Thread David Winsemius
On Sep 23, 2009, at 3:47 PM, Jim Silverton wrote: Hello, I have the following data: gene Actualgroupsreps 11213 12 22123 23 33 2 12 44 12 2 3 51 0 1

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
Thanks Peter. Where did you find that option? It's really cool Cheers../Murli -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Wednesday, September 23, 2009 3:56 PM To: Nair, Murlidharan T Cc: r-help@r-project.org Subject: Re: [R] dotchart to barplots Murli, Two

Re: [R] glm analysis repeated for 900 variables

2009-09-23 Thread Rolf Turner
On 23/09/2009, at 11:26 PM, Christian Schulz wrote: Hi, nvars <- 902 data <- as.data.frame(matrix(runif(100*nvars),ncol=nvars)) colnames(data)[901] <- c('phenotype') colnames(data)[902] <- c('outcome') Just ***WHAT*** do you think the ``c( )'' is doing for you in the construction

Re: [R] Barplot+Table

2009-09-23 Thread gunksta
Marc Schwartz-3 wrote: > > Using the data that is in the online plot rather than the above, here > is a first go. Note that I am not drawing the background grid in the > barplot or the lines for table below it. These could be added if you > really need them. > Note: I snipped out the syn

Re: [R] dotchart to barplots

2009-09-23 Thread Peter Ehlers
Murli, Two points: 1. I think you might want las=1; 2. have a look at the density= argument, i.e. add density=c(10,20,30,40) to your call. Peter Ehlers Henrique Dallazuanna wrote: Perhaps a white border: barplot(t(as.matrix(intersect.data[,2:5])), border = 'white', beside =

Re: [R] dotchart to barplots

2009-09-23 Thread Greg Snow
The current recommendation is to not put designs/hash lines/pictures/etc. into the bars, but to use a single solid color (gray in your case). Back when a quality graph meant using a pen plotter, hash lines made sense as a way to distinguish between bars, but quality graphics no longer depend on

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
The journal wants black and white only :) -Original Message- From: Henrique Dallazuanna [mailto:www...@gmail.com] Sent: Wednesday, September 23, 2009 3:41 PM To: Nair, Murlidharan T Cc: r-help@r-project.org Subject: Re: [R] dotchart to barplots Perhaps a white border: barplot(t(as.matr

Re: [R] dotchart to barplots

2009-09-23 Thread Henrique Dallazuanna
Perhaps a white border: barplot(t(as.matrix(intersect.data[,2:5])), border = 'white', beside = T, horiz = T, legend.text = names(intersect.data)[-1], names.arg = intersect.data[,1], cex.axis = 0.7, cex.names = 0.7, las=2) Or you can use the 'col' argument to select fur

Re: [R] Best way to arrange data

2009-09-23 Thread Jim Silverton
Hello, I have the following data: gene Actualgroupsreps 11213 12 22123 23 33 2 12 44 12 2 3 51 0 1 1 62 34 2 2 73

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
What I mean by design is a black and white lines or something that is more distinguishing than the grey levels? Thanks for the legends :) Cheers../Murli -Original Message- From: Henrique Dallazuanna [mailto:www...@gmail.com] Sent: Wednesday, September 23, 2009 3:32 PM To: Nair, Murlidh

Re: [R] dotchart to barplots

2009-09-23 Thread Henrique Dallazuanna
Sorry, byt what you mean by 'designs'? You can add a legend with: barplot(t(as.matrix(intersect.data[,2:5])), beside = T, horiz = T, legend.text = names(intersect.data)[-1], names.arg = intersect.data[,1], cex.axis = 0.7, cex.names = 0.7, las=2) On Wed, Sep 23, 2009 at 4:26 PM

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
Ok, I could make it perpendicular by specifying las=2 barplot(t(as.matrix(intersect.data[,2:5])), beside = T, horiz = T, names.arg = intersect.data[,1], cex.axis = 0.7, cex.names = 0.7, las=2) Still working on the other though. Cheers../Murli -Original Message- Fro

Re: [R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
I had tried names.arg=c(intersect.data[,1]) so that was the problem. That solves part of what need. I there a way to rotate how it is written on the y-axis? Also, use designs instead of gray scale and making keys for it? Thanks for chipping in. Cheers../Murli -Original Message- From: H

[R] stripchart with pch %in% 21:25 with bg

2009-09-23 Thread Jean lobry
Dear all, consider: ### x <- round(rnorm(50)) stripchart(x, pch = 21, col = "black", bg = "pink", method = "jitter") points(0.5, 1, pch = 21, col = "black", bg = "pink", cex = 2) ### Under R 2.9.0 the points produced by stripchart are not colored, while points() gives the desidered output (mag

[R] logLik() in urca function

2009-09-23 Thread karla hernandez villafuerte
Dear Group: I want to get the loglik of the regresion associated to the estimation of the unit root test Zivot-Andrews of the package urca. I am new using R, then I simply tried the next sequence: > A<-ur.za(var,model="intercept",lag=2) > logLik(A) but the result is an error, and I thin

Re: [R] dotchart to barplots

2009-09-23 Thread Henrique Dallazuanna
Try this: barplot(t(as.matrix(intersect.data[,2:5])), beside = T, horiz = T, names.arg = intersect.data[,1], cex.axis = 0.7, cex.names = 0.7) On Wed, Sep 23, 2009 at 4:01 PM, Nair, Murlidharan T wrote: > Hi, > > I am trying to plot the following data so that it can be visuall

[R] dotchart to barplots

2009-09-23 Thread Nair, Murlidharan T
Hi, I am trying to plot the following data so that it can be visually represented well. I tried the dotchart but I felt it was too spread out. Then I tried the barplot which is good enough for me. Is there a way to give the labels for the y-axis as in the dot chart? Also, I feel the grey level

Re: [R] Compiled Rcmdr Plugin package (zip) has no etc/menus.txt

2009-09-23 Thread John Fox
Dear Tobias, To create the etc subdirectory in the installed package, or in the Windows binary package .zip file, you need an inst/etc subdirectory in the package source tree. That is, etc should be a subdirectory of inst. This isn't peculiar to Rcmdr plug-in packages but is true of any package th

Re: [R] Fortran vs R

2009-09-23 Thread Thomas Lumley
On Wed, 23 Sep 2009, Paul Simonin wrote: Hello R users, I have a basic "computer programing" question. I am a student currently taking a course that uses Fortran as the main programming language, but the instructors are open to students using any language they are familiar with. I have used R

Re: [R] memory problems for fixed effect models

2009-09-23 Thread Daniel Malter
Are y and s continuous or is one of them a factor/dummy variable? From the mle specification I grasp that s is the unit of observation and is factor-coded. If that is so, then estimating lm(o~y+s) includes a lot of dummy/factor variables (lots of columns of 0/1 in the X matrix), and then there coul

[R] any advice on web interfaces to R?

2009-09-23 Thread Mitchell Maltenfort
I saw http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces and I'm still not sure yet which platform (Linux, Windows, etc.) I'll be working on -- and no, it's not under my control to pick. I was wondering if anyone out there had good advice, that would save me time and stomach acid, on ho

[R] [R-pkgs] survey package (3.18)

2009-09-23 Thread Thomas Lumley
Version 3.18 of the survey package is now percolating through CRAN. Since the last announcement on this list, in February, the main additions are - standard errors for survival curves (both Kaplan-Meier and Cox model) - svyciprop() for confidence intervals on proportions, especially in small

Re: [R] Numerical integration problem

2009-09-23 Thread Ravi Varadhan
Hi Marcus, I always use a smaller error tolerance in `integrate' than the default value. I generally use 1.e-07, whereas the default is only about 1.e-04. Sometimes you may also need to increase the number of subdivisions from its default value of 100. Your problem disappears if you use a smalle

Re: [R] Problem in graph plotting

2009-09-23 Thread Henrique Dallazuanna
Try this: plot(tp, dp, type = 'l', ylim = rev(range(dp, na.rm = TRUE))) On Wed, Sep 23, 2009 at 1:44 PM, FMH wrote: > Thank you for the code. I found that the coding does not work if there is an > NA in dp variable. For instance; > > # > dp <- c(1,4,NA,2,5,7,9,8,9,2) > tp <

[R] Compiled Rcmdr Plugin package (zip) has no etc/menus.txt

2009-09-23 Thread Tobias Schoch
Dear Rcmdr users, I use R-2.9.2, Rcmdr 1.5-1 and the latest Rtools bundle (and the html help workshop) under Windows XP. I wrote a RcmdrPlugin for some important functions of Thomas Lumley's "survey" package. Problem: Package compilation works without displaying any errors. That is 1) "R CMD bui

Re: [R] Function to check if a vector contains a given value?

2009-09-23 Thread Henrique Dallazuanna
You can try this also: is.element(2, x) On Wed, Sep 23, 2009 at 12:37 PM, Dimitri Liakhovitski wrote: > Dear R'rs, > > is there a function that checks if a given vector contains a certain value. > E.g., x<-c(1,2,3,4). > How can I get a TRUE or FALSE for whether x contains a 2? > > -- > Dimitri L

[R] Numerical integration problem

2009-09-23 Thread Marcus Rowcliffe
Hi there I'm trying to construct a model of mortality risk in 2D space that requires numerical integration of a hazard function, for which I'm using the integrate function. I'm occasionally encountering parameter combinations that cause integrate to terminate with error "Error in integrate... the i

Re: [R] generating unordered combinations

2009-09-23 Thread Dan
Thanks Bryan, sorry for the late reply - I only just noticed this post. I'm not specifically interested in that sum, but something related to the sum so this may also be very useful. Dan On 18 Sep, 18:24, Bryan Keller wrote: > The combn solution offered by Bill is great.  It struck me that what

Re: [R] retrieve certain part from html

2009-09-23 Thread Tony Breyal
maybe you could modify the following to suit your situation (i use this xPath expression to get links from google): ?htmlTreeParse ?getNodeSet > library(XML) > link <- > 'http://www.google.co.uk/search?hl=en&client=firefox-a&rls=org.mozilla:en-GB:official&hs=2XR&ei=mxa6SojjOeaMjAfJkcDuBQ&sa=X&oi

[R] memory problems for fixed effect models

2009-09-23 Thread Jörg Schaber
Hi, I am trying to fit a simple two-way fixed effect linear model (o ~ y + s - 1). However, my problem is large (length(o)=79333). I am already using slm.fit with a dense design matrix (ddm), but still: fit <- slm.fit(ddm,o) Error: cannot allocate vector of size 9.1 Gb Is there a way to redef

Re: [R] Problem in graph plotting

2009-09-23 Thread baptiste auguie
Try this, d <- na.omit(data.frame(tp,dp)) plot(d, t="l", ylim=rev(range(d$dp))) ?na.omit HTH, baptiste 2009/9/23 FMH : > Thank you for the code. I found that the coding does not work if there is an > NA in dp variable. For instance; > > # > dp <- c(1,4,NA,2,5,7,9,8,9,2) >

[R] re peated measures

2009-09-23 Thread pompon
Hi, I am performing a repeated measures 2-way ANOVA to assess the influence of plant and leaf on aphid fecundity. Fecundity is measured for each aphid on a single leaf. Here is what I typed. wingless <- reshape(Wingless, varying = list(c("d0","d1","d2","d3","d4","d5"

Re: [R] How to read zip file?

2009-09-23 Thread Benilton Carvalho
and note that if, instead of zip files, you were using gzip files, you could: conn <- gzfile("file.gz", "rt") theData <- read.table(conn) close(conn) b On Sep 22, 2009, at 11:21 PM, Gabor Grothendieck wrote: Linux is a type of UNIX so follow the instructions I gave for UNIX. On Tue, Sep 22

Re: [R] Problem in graph plotting

2009-09-23 Thread FMH
Thank you for the code. I found that the coding does not work if there is an NA in dp variable. For instance; # dp <- c(1,4,NA,2,5,7,9,8,9,2) tp <- 1:10 plot(tp,dp, type= 'l',ylim=rev(range(dp)))  # If this is the case, how could we rewrite the coding? Th

[R] Class correlation with hierarchical clusters

2009-09-23 Thread Jonsson, Pall
Hello R gurus. I have been performing hierarchical clustering of gene expression data. I use the heatmap() function to perform the clustering and overlay classifications by using the ColSideColors parameter. In many cases I have various metadata associated with my samples, which leaves me w

[R] ROCR.plot methods, cross validation averaging

2009-09-23 Thread Tim Howard
Dear R-help and ROCR developers (Tobias Sing and Oliver Sander) - I think my first question is generic and could apply to many methods, which is why I'm directing this initially to R-help as well as Tobias and Oliver. Question 1. The plot function in ROCR will average your cross validation dat

Re: [R] No parametric methods

2009-09-23 Thread Greg Snow
For power studies you need to think about what the data will look like under the alternative hypothesis. Is the data shifted over a certain amount? (the most common assumption), or scaled? Or both? Or a completely different shape? Etc. My preferred method for power studies in this case is to u

Re: [R] Fortran vs R

2009-09-23 Thread Charles Annis, P.E.
WARNING! Biased opinion. I'm an old guy who learned programming nearly 50 years ago when FORTRAN (IV) was it, unless you wanted to write machine language which, being an engineer, I was less interested in than in getting an answer so I could get on with things. I like FORTRAN, but I can't think

Re: [R] Function to check if a vector contains a given value?

2009-09-23 Thread Dimitri Liakhovitski
Thanks a lot, Jorge! On Wed, Sep 23, 2009 at 11:42 AM, Jorge Ivan Velez wrote: > Hi Dimitri, > See either ?any,  ?"%in%", or  ?intersect > any(x == 2) > # [1] TRUE > > HTH, > Jorge > > On Wed, Sep 23, 2009 at 11:37 AM, Dimitri Liakhovitski <> wrote: >> >> Dear R'rs, >> >> is there a function that

Re: [R] Fortran vs R

2009-09-23 Thread Charlie Sharpsteen
-- Forwarded message -- From: Charlie Sharpsteen Date: Wed, Sep 23, 2009 at 8:47 AM Subject: Re: [R] Fortran vs R To: Paul Simonin Cc: r-h...@r-project.or On Wed, Sep 23, 2009 at 8:13 AM, Paul Simonin wrote: > Hello R users, > I have a basic "computer programing" question. I

Re: [R] Fortran vs R

2009-09-23 Thread Duncan Murdoch
On 9/23/2009 11:13 AM, Paul Simonin wrote: Hello R users, I have a basic "computer programing" question. I am a student currently taking a course that uses Fortran as the main programming language, but the instructors are open to students using any language they are familiar with. I have use

Re: [R] Function to check if a vector contains a given value?

2009-09-23 Thread Jorge Ivan Velez
Hi Dimitri, See either ?any, ?"%in%", or ?intersect any(x == 2) # [1] TRUE HTH, Jorge On Wed, Sep 23, 2009 at 11:37 AM, Dimitri Liakhovitski <> wrote: > Dear R'rs, > > is there a function that checks if a given vector contains a certain value. > E.g., x<-c(1,2,3,4). > How can I get a TRUE or

Re: [R] p value from F value and dfs

2009-09-23 Thread Jorge Ivan Velez
Hi Sascha, Take a look at ?pf HTH, Jorge On Wed, Sep 23, 2009 at 11:34 AM, Sascha Wolfer <> wrote: > Dear List, > > is there an easy and fast way to compute the p value from a given F value > and given degrees of freedom for an effect and the dfs for the residuals? I > think of a function like

[R] R: Function to check if a vector contains a given value?

2009-09-23 Thread Guazzetti Stefano
?any any(x==2) Stefano -Messaggio originale- Da: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]per conto di Dimitri Liakhovitski Inviato: mercoledì 23 settembre 2009 17.38 A: R-Help List Oggetto: [R] Function to check if a vector contains a given value? Dear R'rs, i

[R] Function to check if a vector contains a given value?

2009-09-23 Thread Dimitri Liakhovitski
Dear R'rs, is there a function that checks if a given vector contains a certain value. E.g., x<-c(1,2,3,4). How can I get a TRUE or FALSE for whether x contains a 2? -- Dimitri Liakhovitski Ninah.com dimitri.liakhovit...@ninah.com __ R-help@r-project.

[R] p value from F value and dfs

2009-09-23 Thread Sascha Wolfer
Dear List, is there an easy and fast way to compute the p value from a given F value and given degrees of freedom for an effect and the dfs for the residuals? I think of a function like this: compute.p(F.value, numerator.dfs, denominator.dfs) which returns the p value. Thanks, Sascha ___

[R] Fortran vs R

2009-09-23 Thread Paul Simonin
Hello R users, I have a basic "computer programing" question. I am a student currently taking a course that uses Fortran as the main programming language, but the instructors are open to students using any language they are familiar with. I have used R previously, and am wondering if there is

Re: [R] compute differences

2009-09-23 Thread jude.ryan
Thanks Petr! It is good to see multiple solutions to the same problem. Best, Jude -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: Wednesday, September 23, 2009 10:59 AM To: Ryan, Jude Cc: alxmil...@yahoo.it; r-help@r-project.org Subject: Re: [R] compute differe

Re: [R] compute differences

2009-09-23 Thread Petr PIKAL
Hi You can use outer. If your data are in data frame test then DIFF <- as.vector(t(outer(test$val, test$val, "-"))) returns a vector, You just need to add suitable names to rows. CASE <- as.vector(t(outer(test$ID, test$ID, paste, sep="-"))) data.frame(CASE, DIFF) will put it together. Regard

Re: [R] strange split behavior?

2009-09-23 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.09.2009 14:49:38: > On Wed, Sep 23, 2009 at 07:29:30AM -0500, Peng Yu wrote: > > On Wed, Sep 23, 2009 at 1:24 AM, Peter Dalgaard > > wrote: > > > Peng Yu wrote: > > > > Is there an operation on a factor to get a subset and keep only the > > correspo

Re: [R] compute differences

2009-09-23 Thread jude.ryan
Alessandro Carletti wrote: Hi, I have a problem. I have a data frame looking like: ID val A? .3 B? 1.2 C? 3.4 D? 2.2 E? 2.0 I need to CREATE the following TABLE: CASE?? DIFF A-A??? 0 A-B??? -0.9 A-C??? -3.1 A-D??? -1.9 A-E??? -1.7 B-A??? ... B-B??? ... B-C B-D

Re: [R] percent data being treated as categorical

2009-09-23 Thread Larry White
Resolved. Thanks. On Wed, Sep 23, 2009 at 9:52 AM, Larry White wrote: > I have the following data exported as a .txt file on Windows. Everything is > working fine, except that the the data in the 10th column is treated as a > factor. > > Date Week Time Completed Work_Delta Mean_Delta Balance Tot

[R] mapproject returns NAs

2009-09-23 Thread Tobias Erik Reiners
Dear Helpers, usually I try to find the answers on my own, but this one beated me. I have to use the package Geneland which requires coordinates in Lambert projection. I have latitude and longitude (please copy to an .txt and read.table() ) X Y 3458231 5544356 3458263 5544301 3459143 5

Re: [R] Reading data

2009-09-23 Thread Don MacQueen
What it is telling you is that it can't find the file. This could be because the file isn't there, or you've got a typo in the file name, that sort of thing. In your email, you have split the filename argument between two lines. I don't know whether this comes from what you did in R, or wheth

[R] Fwd: confirm 60c6d87144c82778d7053d4f81d1e06f92f9f1e7

2009-09-23 Thread Tobias Erik Reiners
-- Tobias Erik Reiners Justus Liebig University IFZ - Department of Animal Ecology Heinrich-Buff-Ring 26-32 D-35392 Giessen Germany www.uni-giessen.de/cms/fbz/fb08/biologie/tsz/tieroekologie/mitarbeiter/diplomanden-innen/tobias-erik-reiners -

[R] Error in package management on R 2.9.2 GUI 1.29 Tiger build 32-bit

2009-09-23 Thread Jean-Baptiste Marquette
Dear R gurus, I use the above release on my MacPro under Leopard 10.5.8 and I have no more access to the package manager and the CRAN binary list on package installer. Error messages in the console are : Erreur : impossible de trouver la fonction "package.manager" (impossible to find func

[R] percent data being treated as categorical

2009-09-23 Thread Larry White
I have the following data exported as a .txt file on Windows. Everything is working fine, except that the the data in the 10th column is treated as a factor. Date Week Time Completed Work_Delta Mean_Delta Balance Total Total_Delta Work Index Open_Bugs Bug_Delta Bug_Delta2 8/17/2009 4 11.8% 64 64 1

Re: [R] any way to make it work faster (deleting rows that contain certain values)

2009-09-23 Thread Dimitri Liakhovitski
Chuck, thank you, but I am not sure I understood what you meant. There are a lot of rows in "index" where at least 2 columns have equal values and a lot of rows where column 1 has 2 and some other column has 5 - same for 3 in column 1 and 6 in some other column, etc. Thanks a lot for clarifying! Di

Re: [R] Maximum Likelihood Est. regarding the degree of freedom of a multivariate skew-t copula

2009-09-23 Thread Ravi Varadhan
Why are you using "SANN" for optimizing over a smooth function of a scalar parameter? Simulated annealing is generally quite slow, and is typically used for "nasty" functions with multiple bumps and valleys. Try `optimize' instead. Ravi. --

Re: [R] Reading data

2009-09-23 Thread Keo Ormsby
Hello Ashta, You need to use double blackslashes, liike: "C:\\Documents and Settings\\ashta\\MyDocuments\\R_data\\rel.dat" I usually use the following to avoid writing the path: #select file from a popup window f <- file.choose() #read the file. the is Rese for any other arguments e.g.

Re: [R] graduation

2009-09-23 Thread David Winsemius
On Sep 23, 2009, at 8:44 AM, David Winsemius wrote: On Sep 23, 2009, at 4:54 AM, MKHABELA,SN wrote: Hi everyone I want help in graduating the attached rates and checking for goodness of fit and smoothness using R please help. females.txt>__

  1   2   >