Re: [R] Difference between 10 and 10L

2012-05-04 Thread Prof Brian Ripley
On 04/05/2012 00:43, William Dunlap wrote: class(10) [1] numeric class(10L) [1] integer class(10i) [1] complex Why not 10I for integer? Perhaps because I and l look too similar, perhaps because i and I sound too similar. The L does not mean long: integers are 4 bytes

Re: [R] (no subject)

2012-05-04 Thread Drew Duckett
If i am not mistaking the quantile function and percentile function and the same other than the way they are expressed in R. I think where I am losing it is just how to express the function. myvec- c(5,4,3,2,1,10,9,8,7,6) PercentileFinder- function (vec,p){ sortedlist- sort(vec) count-

[R] Finding local maxima on a loess surface

2012-05-04 Thread Diego Rojas
If a run a LOESS model and then produce a smoothed surface: Is there any way to determine the coordinates of the local maxima on the surface? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] * operator overloading setOldClass

2012-05-04 Thread Jan Wijffels
Dear R gurus, I am trying to overload some operators in order to let these work with the ff package by registering the S3 objects from the ff package and overloading the operators as shown below in a reproducible example where the * operator is overloaded. require(ff)

Re: [R] Counting cases within present ranges

2012-05-04 Thread Rui Barradas
Hello, I have a vector wherein the cases are either uniform or mixed-strings (so AAA vs ABABABABA). Different parts of the vector apply to different users, so [1:29] is one guy, [30:50] is another, and [51:70] is another. There are about 100,000 users, and I have an object that

Re: [R] deparse(substitute(x)) on an object with S3 class

2012-05-04 Thread Remko Duursma
Thanks for that - too bad there isn't a simple workaround! greetings Remko -- View this message in context: http://r.789695.n4.nabble.com/deparse-substitute-x-on-an-object-with-S3-class-tp4605592p4607815.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] apply one list to another one

2012-05-04 Thread Rui Barradas
Hello, Hui Du wrote Hi All, Suppose I have the following codes: x = data.frame(A = rnorm(20), B = rnorm(20), C = rnorm(20)) a = list() a[[1.1]] = x a[[1.2]] = x b = list() b[[1.1]] = c(A, B) b[[1.2]] = c(B, C) Now I want to apply b to a like this, for each element of 'a',

[R] Using R to generate specific distributions of data

2012-05-04 Thread Mohan Radhakrishnan
Hi, I am working on a capacity planning task for a socket server. As part of the research I read Quickly Generating Billion-Record Synthetic Databases which is about benchmarking databases. I understand from that paper that there are specific datasets with statistics properties that can

[R] How to write a BMP file pixel by pixel?

2012-05-04 Thread ZHANG Yingqi
Dear all, I open a bmp device by the bmp() function in the png package, but I don't know how to write color pixel by pixel into the file? Any help or hint? What I want to do is to create a 512*512 bmp file with certain dots being red and others black. I have all the pixel

[R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread Saurav Pathak
Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l- loess(d~x+y, span=span, se=TRUE) p- predict(l, se=TRUE) I get the following error message: Error in vector(double, length) :

[R] ur.df funtion

2012-05-04 Thread severine . gaille
Dear R users, I am applying the augmented-Dickey-Fuller Unit Root Test (ur.df function of the urca package) to a time series of approximately 50 values. To be sure I understood what was going on with the ur.df function, I checked the critical values of the 3 test statistics (tau, phi2 and phi3

[R] read.table() vs read.delim() any difference??

2012-05-04 Thread Rameswara Sashi Kiran Challa
Hi, I have a tab seperated file with 206 rows and 30 columns. I read in the file into R using read.table() function. I checked the dim() of the data frame created in R, it had only 103 rows (exactly half), 30 columns. Then I tried reading in the file using read.delim() function and this time the

Re: [R] Simple plot loop

2012-05-04 Thread Ben Neal
This is correct , now working. I did not have the preceeding comma in Data2[,i] . . . Thanks very much! Very much appreciated. Ben Neal -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Thu 5/3/2012 3:04 PM To: Ben Neal Cc: Jim Lemon; r-help@r-project.org Subject:

Re: [R] Creating a point pattern with cartesian co-ordinates

2012-05-04 Thread Rolf Turner
(1) There's something funny about the data that you present below. At least in my mailer (Thunderbird) what looks like a space between the X and Y values turns into a NULL character when I try to copy and paste. (2) Create a data frame, say M with the X and Y values as given in your email. (3)

[R] Can't import this 4GB DATASET

2012-05-04 Thread iliketurtles
Dear Experienced R Practitioners, I have 4GB .txt data called dataset.txt and have attempted to use *ff, bigmemory, filehash and sqldf *packages to import it, but have had no success. The readLines output of this data is: readLines(dataset.txt,n=20) [1]

[R] LIMMA decideTests result zero from contrast matrix

2012-05-04 Thread Ekta Jain
Dear All, I am using the LIMMA package to create 2 contrasts for my data and then calculating the vennCounts of the decideTests from the contrast.fit to be able to create venn Diagrams. The code works fine but the summary(results) shows zeros for all i.e. no gene were up regulated or

[R] zoo package; a question on as.yearmon and as.yearqtr

2012-05-04 Thread jpm miao
Hello, In zoo package, if I would like the time frame to be 1981M01 to 1982M12, then I code time_0-as.yearmon(1981-01)+(0:23)/12 However, if the time frame of interest becomes 1981M01 to 2011M12, it is relatively hard to calculate the number of months. Is there any faster way to do it?

Re: [R] means by group

2012-05-04 Thread Petr Savicky
On Thu, May 03, 2012 at 09:07:39PM -0400, li li wrote: Hi all, I have a 100 by 100 matrix and I divided this matrix into 100 groups, each is a 10 by 10 submatrix. I want find out the means of each group. I know we can use apply function for mean by margins. Is there a function in R

Re: [R] Difference between 10 and 10L

2012-05-04 Thread Petr Savicky
On Thu, May 03, 2012 at 07:32:46PM -0400, brwin338 wrote: Good Evening We have been searching through the R documentation manuals without success on this one. What is the purpose or result of the L in the following? n=10 and n=10L or c(5,10) versus c(5L,10L) Hi. The help page

[R] Breaking up a Row in R (transpose)

2012-05-04 Thread marc212
I have the following: Time A1 A1 B1 B1 C1 C2 x y x y x y 0 5 6 6 7 7 9 1 3 4 4 3 9 9 2 5 2 6 4 7 4 I want to change it to the following:

Re: [R] Simple plot loop

2012-05-04 Thread Jim Lemon
On 05/04/2012 12:04 AM, Ben Neal wrote: Jim, thanks for the reply. I tried what you recommend, but I still get an error when running it, just as I did with the similar loops I was trying. Here is the error: Error in xy.coords(x, y) : 'x' and 'y' lengths differ That comes from this code:

[R] convert strings to object names: SUMMARY

2012-05-04 Thread Denis Kazakiewicz
Hello to R people This is not a question. Just found a beautiful summary dated back in 2004. Hope this will be useful for your work Thanks to Gudrun Jonasdottir gudrunj_at_math.su.se mailto:gudrunj_at_math.su.se?Subject=Re:%20[R]%20convert%20strings%20to%20object%20names:%20SUMMARY In summary:

Re: [R] zoo package; a question on as.yearmon and as.yearqtr

2012-05-04 Thread Gabor Grothendieck
On Fri, May 4, 2012 at 2:47 AM, jpm miao miao...@gmail.com wrote: Hello,   In zoo package, if I would like the time frame to be 1981M01 to 1982M12, then I code time_0-as.yearmon(1981-01)+(0:23)/12   However, if the time frame of interest becomes 1981M01 to 2011M12, it is relatively hard

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread Jan van der Laan
read.table imports the company name GREAT FALLS GAS CO as four separate columns. I think that needs to be one column. I can imagine that further one in your file you will have another company name that does not consist of four words which would cause the error you observed. From your

Re: [R] read.table() vs read.delim() any difference??

2012-05-04 Thread Jan van der Laan
read.delim calls read.table so any differences between the two are caused by differences in the default values of some of the parameters. Take a look at the help file ?read.table read.table uses white space as separator; read.delim tabs read.table uses and ' as quotes; read.delim just

Re: [R] read.table() vs read.delim() any difference??

2012-05-04 Thread peter dalgaard
On May 4, 2012, at 08:16 , Rameswara Sashi Kiran Challa wrote: Hi, I have a tab seperated file with 206 rows and 30 columns. I read in the file into R using read.table() function. I checked the dim() of the data frame created in R, it had only 103 rows (exactly half), 30 columns. Then I

Re: [R] Breaking up a Row in R (transpose)

2012-05-04 Thread Petr Savicky
On Thu, May 03, 2012 at 07:36:45PM -0700, marc212 wrote: I have the following: Time A1 A1 B1 B1 C1 C2 x y x y x y 0 5 6 6 7 7 9 1 3 4 4 3 9 9 2 5 2 6

[R] FW: Validation of logistic models in R 2.12

2012-05-04 Thread Dwaipayan Dasgupta
Could someone help me on this please? -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dwaipayan Dasgupta Sent: Thursday, May 03, 2012 1:43 PM To: r-help@r-project.org Subject: [R] Validation of logistic models in R 2.12 Hi

[R] Equality of multiple vectors

2012-05-04 Thread aaurouss
Hello, I'm writing a piece of code where I need to compare multiple same length vectors. I've gone through the basic functions like identical() or all(), but they only work for comparing 2 vectors. From 3 vectors on, it doesn't work . Example: Assuming vec1 - c (1,2,3,4,5) vec2 -

[R] Why does RODBC driver returns garbage from Sybase server on new windows 7 machine?

2012-05-04 Thread Alok Jadhav
Hi, I am trying to query a Sybase database on my new windows 7 machine. I am using native sybase driver Adaptive server Enterprise following is example code conn - sprintf(driver=Adaptive server Enterprise;server=PHKSESMD01;database=smd_live;uid=temp_user;password=temp_pass;port=2301) chan

[R] Help with biplot()

2012-05-04 Thread Christian Cole
Hi all, I want to plot the outcome of my PCA analysis (done with prcomp()), but I have so many variables that plotting them obscures the whole plot. How do I suppress the plotting of variables in a biplot? I only want to see the units. I appreciate both data constitute a biplot, so alternatively

Re: [R] read.table() vs read.delim() any difference??

2012-05-04 Thread Rameswara Sashi Kiran Challa
Thanks Peter. In my case specifying the quote=\ worked out fine with read.table(). -Sashi On Fri, May 4, 2012 at 1:53 PM, peter dalgaard pda...@gmail.com wrote: On May 4, 2012, at 08:16 , Rameswara Sashi Kiran Challa wrote: Hi, I have a tab seperated file with 206 rows and 30 columns.

[R] Summing list with NA elements

2012-05-04 Thread Evgenia
I have a list ( in my real problem a double list y[[1:24]][[1:15]] but I think the solution would be the same) m - matrix(1:3, 3, 3) x - list(m, m+3, m+6) and as I want to have the sum of elements I use Reduce(`+`, x) having as result Reduce(`+`, x) [,1] [,2] [,3] [1,] 12 12 12

[R] Test if a sample mean of integers with range -inf; inf is different from zero

2012-05-04 Thread Kay Cichini
Hi all, how would you test if a sample mean of integers with range -inf;inf is different from zero: # my sample of integers: c - c(-3, -1, 0, 1, 0, 3, 4, 10, 12) # is mean of c 0?: mean(c) Thanks, Kay [[alternative HTML version deleted]]

Re: [R] How to write a BMP file pixel by pixel?

2012-05-04 Thread Uwe Ligges
See package pixmap, for example. Uwe Ligges On 04.05.2012 03:10, ZHANG Yingqi wrote: Dear all, I open a bmp device by the bmp() function in the png package, but I don't know how to write color pixel by pixel into the file? Any help or hint? What I want to do is to create a

Re: [R] Equality of multiple vectors

2012-05-04 Thread Petr Savicky
On Fri, May 04, 2012 at 12:53:12AM -0700, aaurouss wrote: Hello, I'm writing a piece of code where I need to compare multiple same length vectors. I've gone through the basic functions like identical() or all(), but they only work for comparing 2 vectors. From 3 vectors on, it doesn't

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-04 Thread Bjørn-Helge Mevik
rakeshnb rakeshn...@gmail.com writes: I am using pls package but how is scaling done in R? That is documented in the help pages: library(pls) ?plsr [snip] scale: numeric vector, or logical. If numeric vector, X is scaled by dividing each variable with the corresponding element

Re: [R] Equality of multiple vectors

2012-05-04 Thread Jan van der Laan
or identical(vec1, vec2) identical(vec2, vec3) Jan Petr Savicky savi...@cs.cas.cz schreef: On Fri, May 04, 2012 at 12:53:12AM -0700, aaurouss wrote: Hello, I'm writing a piece of code where I need to compare multiple same length vectors. I've gone through the basic functions like

Re: [R] Test if a sample mean of integers with range -inf; inf is different from zero

2012-05-04 Thread R. Michael Weylandt
mean(c) != 0 But if you mean in a statistical sense... t.test() is one possibility. Michael On Fri, May 4, 2012 at 5:29 AM, Kay Cichini kay.cich...@gmail.com wrote: Hi all, how would you test  if a sample mean of integers with range -inf;inf  is different from zero: # my sample of

Re: [R] Test if a sample mean of integers with range -inf; inf is different from zero

2012-05-04 Thread Petr Savicky
On Fri, May 04, 2012 at 11:29:51AM +0200, Kay Cichini wrote: Hi all, how would you test if a sample mean of integers with range -inf;inf is different from zero: # my sample of integers: c - c(-3, -1, 0, 1, 0, 3, 4, 10, 12) # is mean of c 0?: mean(c) Hi. It is better to use a name

Re: [R] (no subject)

2012-05-04 Thread R. Michael Weylandt
quantile(myvec, 0.9) See ?quantile for the 9 different empirical quantile methods provided. Michael On Thu, May 3, 2012 at 2:20 PM, Drew Duckett dducket...@gmail.com wrote: If i am not mistaking the quantile function and percentile function and the same other than the way they are expressed

Re: [R] Summing list with NA elements

2012-05-04 Thread R. Michael Weylandt
Inelegant, but this is one way: Reduce(function(e1, e2){e1[is.na(e1)] - 0; e2[is.na(e2)] - 0; (e1 + e2)}, x) I.e., set the NAs to 0 before adding in the reduce function. Michael On Fri, May 4, 2012 at 5:19 AM, Evgenia ev...@aueb.gr wrote: I have a list ( in my real problem  a double list

[R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Hi, I'm plotting PDFs and have a problem. If I have more than 8 sources of data the colours are repeated. These plots are used to remove poor data from the sets so it would be helpful if I could expand the colour range. Is there any way to do this? The plots are coloured by defining a vector

Re: [R] colours in a pdf

2012-05-04 Thread R. Michael Weylandt
How many colors are you looking for? There are limits to how many the eye can make out, but perhaps the RColorBrewer package would be a place to start. Also check out: http://colorbrewer2.org/ To see all the builtin colors, you can simply use the colors() function, but your viewer won't be able

Re: [R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Hi, Thanks for the help. Extending the palette to 16 or 20 would be a big help. The largest number of files I've had to handle in a single group is 42 and I wouldn't expect it to get much bigger than that. I'll take a look at RColorBrewer. Cheers, Gavin. -Original Message- From: R.

Re: [R] colours in a pdf

2012-05-04 Thread R. Michael Weylandt
I'm not sure you'll be able to come up with 42 categorial colors: perhaps facetting / small-multiples here? Colorspace (on CRAN) will let you make palettes manually, so perhaps that's worth looking at. Michael On Fri, May 4, 2012 at 7:49 AM, Gavin Blackburn gavin.blackb...@strath.ac.uk wrote:

Re: [R] colours in a pdf

2012-05-04 Thread Petr PIKAL
Hi One option for substantial distinguishable range of colours is jet.colors from matlab package. Regards Petr Hi, Thanks for the help. Extending the palette to 16 or 20 would be a big help. The largest number of files I've had to handle in a single group is 42 and I wouldn't expect

Re: [R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Ok great, thanks for the help. I don't mind sectioning data off into smaller groups in this early stage, but the more I can get in one group the better. Cheers, Gavin. -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: 04 May 2012 13:04 To: Gavin

Re: [R] colours in a pdf

2012-05-04 Thread Gavin Blackburn
Thanks Petr, I'll take a look at that as well. Cheers, Gavin. -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: 04 May 2012 13:09 To: Gavin Blackburn Cc: r-help@r-project.org Subject: Re: [R] colours in a pdf Hi One option for substantial distinguishable range

[R] Absolute cumulative curve with ecdf/stepfun?

2012-05-04 Thread Johannes Radinger
Hi, I have two variables ranging both from 0 to 1 (n=500 each). Now I am interested in plotting them both in one plot (using ggplot2). So far I used ecdf() (from an example I found with google) to get values for the cumulatice distribution function which gives a relative curve. I also want to do

Re: [R] Rprofile.site under Windows 7?

2012-05-04 Thread Duncan Murdoch
On 12-05-04 12:41 AM, Spencer Graves wrote: On 5/3/2012 9:28 PM, Joshua Wiley wrote: How are you using R? Any special front ends that might be causing this? Can you try it in unsuffered consequences? I'm running R 1.15.0; sessionInfo() appears below. I get this from Rgui i386 and

Re: [R] GAM, how to set qr=TRUE

2012-05-04 Thread Simon Wood
Which version of gam are you using (i.e. which package and version number?) prediction with fitted gam objects should call predict.gam, and I'm not quite sure why this is not happening here (you do have the mgcv or gam loaded while trying to predict, I suppose?). On 03/05/12 22:56, Ben quant

Re: [R] Identifying the particular X or Y in a sorted list

2012-05-04 Thread John Kane
simply change the specification in the subset command to 0 John Kane Kingston ON Canada -Original Message- From: shankarla...@gmail.com Sent: Thu, 3 May 2012 16:51:50 -0400 To: jrkrid...@inbox.com Subject: Re: [R] Identifying the particular X or Y in a sorted

[R] Generate strings from multiple variables

2012-05-04 Thread Johannes Radinger
Hi, it is easiest to explain what I want to do by an example: lets assume there are two factors/variables: A - c(1,2,3) B - c(1,3,3) Now I would like to generate a list of strings that should look like (A1_B1,A1_B2,A2_B1,A2_B2). So actually the string contains all possible combinations of A and

Re: [R] Generate strings from multiple variables

2012-05-04 Thread R. Michael Weylandt
do.call(function(x,y) paste0(A,x,_,B,y),expand.grid(x = A,y = B)) seems to be a place to start. Robust generalization seems a hair tricky -- I'll mull on it. Michael On Fri, May 4, 2012 at 9:10 AM, Johannes Radinger jradin...@gmx.at wrote: Hi, it is easiest to explain what I want to do by an

[R] Correct Interpretation of survreg() coeffs

2012-05-04 Thread wwreith
Am I correct in assuming that the output below essentially translates to Males have a mean time that is significantly lower than Females? Is this the correct way to interpret the fact that the coefficient is negative? Assume the variale sex is treated as a factor with Female =0 and Male=1.

[R] latex, Hmisc with MikTeX 2.8 produced nmissingunique output

2012-05-04 Thread Durant, James T. (ATSDR/DCHI/SSB)
Hi - So when I run the following, I get a strange formatting output with MikTeX, and I am unsure if the behavior is due to R, Hmisc, or MikTeX or both: dfr - data.frame(x=rnorm(400),y=sample(c('male','female'),400,TRUE)) latex(describe(dfr)) What happens is that the x column is summarized in

Re: [R] GAM, how to set qr=TRUE

2012-05-04 Thread Ben quant
Solution: have package mgcv loaded when you predict...not just for the fit. :) Silly mistake... Thanks Simon! Ben On Thu, May 3, 2012 at 3:56 PM, Ben quant ccqu...@gmail.com wrote: Hello, I don't understand what went wrong or how to fix this. How do I set qr=TRUE for gam? When I produce

[R] read-in, error???

2012-05-04 Thread Istvan Nemeth
Dear Users! I encountered with some problem in data reading while I challenged R (and me too) in a validation point of view. In this issue, I tried to utilize some reference datasets ( http://www.itl.nist.gov/div898/strd/index.html). And the result departed a bit from my expectations. This

Re: [R] read-in, error???

2012-05-04 Thread Sarah Goslee
Hi Istvan, That's most unusual, and quite unlikely (and much larger than the usual floating-point rounding errors). Please provide a reproducible example. I assume you got the data from here: http://www.itl.nist.gov/div898/strd/anova/SmLs07.dat What did you do with it then? How did you delete

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-04 Thread csrabak
Em 4/5/2012 06:39, Bjørn-Helge Mevik escreveu: rakeshnbrakeshn...@gmail.com writes: [snipped] When in doubt, read the documentation. :) An obvious candidate for a fortune entry! __ R-help@r-project.org mailing list

[R] Fwd: read-in, error???

2012-05-04 Thread Sarah Goslee
Hi Istvan, Your OS and version of R (eg sessionInfo() ) would also be useful, as would sending your reply to the R-help list and not just to me. Sarah -- Forwarded message -- From: Istvan Nemeth furgeu...@gmail.com Date: Fri, May 4, 2012 at 10:20 AM Subject: Re: [R] read-in,

Re: [R] Finding local maxima on a loess surface

2012-05-04 Thread David Winsemius
On May 3, 2012, at 6:09 PM, Diego Rojas wrote: If a run a LOESS model and then produce a smoothed surface: Is there any way to determine the coordinates of the local maxima on the surface? ?predict# it has a loess method. [[alternative HTML version deleted]] -- David

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread David Winsemius
On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l- loess(d~x+y, span=span, se=TRUE) p- predict(l, se=TRUE) I don't know

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread David Winsemius
On May 4, 2012, at 1:34 AM, iliketurtles wrote: Dear Experienced R Practitioners, I have 4GB .txt data called dataset.txt and have attempted to use *ff, bigmemory, filehash and sqldf *packages to import it, but have had no success. The readLines output of this data is: Ther alignment of

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread Saurav Pathak
On 05/04/2012 10:39 AM, David Winsemius wrote: On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l- loess(d~x+y, span=span,

Re: [R] Why does RODBC driver returns garbage from Sybase server on new windows 7 machine?

2012-05-04 Thread Marc Schwartz
On May 4, 2012, at 2:38 AM, Alok Jadhav wrote: Hi, I am trying to query a Sybase database on my new windows 7 machine. I am using native sybase driver Adaptive server Enterprise following is example code conn - sprintf(driver=Adaptive server

Re: [R] Generate strings from multiple variables

2012-05-04 Thread Bert Gunter
?outer Bert Sent from my iPhone -- please excuse typos. On May 4, 2012, at 6:25 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: do.call(function(x,y) paste0(A,x,_,B,y),expand.grid(x = A,y = B)) seems to be a place to start. Robust generalization seems a hair tricky -- I'll mull

Re: [R] read-in, error???

2012-05-04 Thread William Dunlap
You didn't mention it, but did you use something like options(digits=20) before displaying that data? In any case, 1.4000244 == 1.4 [1] TRUE because R uses the IEEE-754 double precision floating point arithmetic that all modern computers support. That gives you

[R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread julia . jacobson
Dear Sweave users, Could you help me to find a way to place Sweave output files in a subdirectory of the currentfolder without giving them a subname? If the option prefix.string=foo/ is used, all files are placed in this folder, but begin with an hyphen-minus, which makes it difficult to work

Re: [R] Correct Interpretation of survreg() coeffs

2012-05-04 Thread David Winsemius
On May 4, 2012, at 9:43 AM, wwreith wrote: Am I correct in assuming that the output below essentially translates to Males have a mean time that is significantly lower than Females? Is this the correct way to interpret the fact that the coefficient is negative? I wouldn't be using

Re: [R] Summing list with NA elements

2012-05-04 Thread Evgenia
I agree with you. I used this trick to take the desired results but I posted wondering If there was any other solution. Thanks Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Summing-list-with-NA-elements-tp4608167p4608955.html Sent from the R help mailing list

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread David Winsemius
On May 4, 2012, at 10:52 AM, Saurav Pathak wrote: On 05/04/2012 10:39 AM, David Winsemius wrote: On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example,

Re: [R] Error with the 'segmented' package for R

2012-05-04 Thread Vito Muggeo (UniPa)
dear Szymon, it is a bug (in the new version), thanks. It depends on the flat underlying relationship you are trying to estimate with a small sample.. I will correct it as soon as possible. Meanwhile you can use o1-glm(gpp ~ temp) os1-segmented(o1, seg.Z=~temp, psi=15,

Re: [R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread Yihui Xie
I guess that is hard-coded in Sweave, so you probably cannot control it unless you (partially) rewrite the driver. And just FYI, you can try the knitr package, which does not add the hyphen for you, but the name of the option 'prefix.string' has been changed to 'fig.path'

Re: [R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread Rainer Schuermann
You cannot avoid the hyphen I think, but if you say (for example): prefix.string=foo/x then your files start with 'x-' (so 'graph' becomes 'foo/x-graph') which may be better for you than the hyphen at the beginning of the file name. Rgds, Rainer On Friday 04 May 2012 17:23:58

Re: [R] Generate strings from multiple variables

2012-05-04 Thread Bert Gunter
... as in: outer(paste(A,A,sep=),paste(B.B,sep=), FUN =paste,sep=_) -- Bert On Fri, May 4, 2012 at 7:59 AM, Bert Gunter bgun...@gene.com wrote: ?outer Bert Sent from my iPhone -- please excuse typos. On May 4, 2012, at 6:25 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote:

[R] add an automatized linear regression in a function

2012-05-04 Thread Rui Barradas
Em 04-05-2012 11:00, jeff6868 geoffrey_kl...@etu.u-bourgogne.fr escreveu: Date: Thu, 3 May 2012 06:45:59 -0700 (PDT) From: jeff6868geoffrey_kl...@etu.u-bourgogne.fr To:r-help@r-project.org Subject: [R] add an automatized linear regression in a function

[R] oddsratio epitool and chi-square

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat - matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) - c(treatmentA,treatmentB) row.names(mat) - paste(Cond,rep(1:10,1)) dimnames(mat) - list(Condition = row.names(mat), instrument = colnames(mat))

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread iliketurtles
Jan, thank you. table(line_sizes) line_sizes 01 97 256 1430 2860 46869069 1430 - Isaac Research Assistant Quantitative Finance Faculty, UTS -- View this message in context:

Re: [R] Summing list with NA elements

2012-05-04 Thread Dimitris Rizopoulos
one solution is to set NAs to 0, e.g., m - matrix(1:3, 3, 3) x - list(m, m+3, m+6) x[[1]][1] - NA x. - lapply(x, function (x) {x[is.na(x)] - 0; x} ) Reduce(+, x.) I hope it helps. Best, Dimitris On 5/4/2012 11:19 AM, Evgenia wrote: I have a list ( in my real problem a double list

[R] R crash when i'm using lme function

2012-05-04 Thread gaiarrido
When I try to adjust a mixed model with random effects I can make this order without problem lm.FA-lme(absFA~trait*condition,random=~1|individual) But if I try to fit a model in which the response (absFA) is not the same in all individuals at different levels of trait factor , but varies

[R] Machine Learning and Cluster-Correlated Data

2012-05-04 Thread Yohann Mansiaux
Dear R-help, I'm trying to apply machine learning methods, such as Random Forest, Boosted Trees or Multivariate Adaptive Regression Splines for supervised classification issues. In a epidemiological study, i'm dealing with high dimensional cluster-correlated data, each cluster corresponding

[R] lme or lmer for unbalance data

2012-05-04 Thread agent dunham
Dear community, I'd like to fix a mixed model. I have unbalance data, what should i use: lme in nlme package , or lmer in lme4. Thanks, u...@host.com as u...@host.com -- View this message in context: http://r.789695.n4.nabble.com/lme-or-lmer-for-unbalance-data-tp4608425.html Sent from the R

[R] Interweaving of two datasets

2012-05-04 Thread lunarossa
I have two datasets, the first has this shape (each word is a column) Name address phone .. .. The second one has the following shape Name request I need a contingency table with for example phone and request. The people registered in these datasets are present in both datasets, BUT in the

[R] weird predict function error when I use naive bayes

2012-05-04 Thread kiinalist
Hi, I tried to use naivebayes in package 'e1071'. when I use following parameter, only one predictor, there is an error. m- naiveBayes(iris[,1], iris[,5]) table(predict(m, iris[,1]), iris[,5]) Error in log(sapply(attribs, function(v) { : Non-numeric argument to mathematical function

[R] oddsratio and some basic help on epitools

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat - matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) - c(treatmentA,treatmentB) row.names(mat) - paste(Cond,rep(1:10,1)) dimnames(mat) - list(Condition = row.names(mat), instrument = colnames(mat))

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-05-04 Thread jcolomb
I have the same problem installing R on a new machine, my codes are nor working anymore (same error message as you had). Unfortunately, I do not understand what you mean by R patched and especially updating R-patched and google cannot help me this time... May you explain what I have to do?

[R] epitools question

2012-05-04 Thread David martin
Here is a working snippet. library(epitools) mat - matrix(c(10,15,60,25,98, 12,10,70,28,14, 9,11,68,10,12 ,8,13,20,11,58) ,ncol=2) colnames(mat) - c(treatmentA,treatmentB) row.names(mat) - paste(Cond,rep(1:10,1)) dimnames(mat) - list(Condition = row.names(mat), instrument = colnames(mat))

Re: [R] Interweaving of two datasets

2012-05-04 Thread Rui Barradas
Hello, lunarossa wrote I have two datasets, the first has this shape (each word is a column) Name address phone .. .. The second one has the following shape Name request I need a contingency table with for example phone and request. The people registered in these datasets are

[R] Problems Exporting R Output to an xls file need help

2012-05-04 Thread PaulJr
Hello R users, I want to export to an xls or .csv some predictions I produced with the auto.arima and forecast functions. A detail of all my work is presented below. I loaded a package called dataframes2xls and tried to use the function write.xls without any success. Can anybody help me figure

Re: [R] 7 arguments passed to .Internal(identical) which requires 6

2012-05-04 Thread krtek
You should to download this package and install it: http://cran.r-project.org/bin/windows/base/R-2.15.0patched-win.exe You can find it in R website Download R for Windows base Other builds -- View this message in context:

[R] text replacement with a loop in a script file

2012-05-04 Thread diegogiri
Hi, i'm a new r user and I will take you a simple (not for me)question. I have a r script file like this: text - c(ARCHIVIO name definition) I have a csv file like: NAME alfa beta gamma how can I replace with a loop statment metadata name of script file with the values

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread iliketurtles
Hi David, I've tried using sep=\t but it doesn't work, unfortunately. Thanks for your help. - Isaac Research Assistant Quantitative Finance Faculty, UTS -- View this message in context: http://r.789695.n4.nabble.com/Can-t-import-this-4GB-DATASET-tp4607862p4608936.html Sent from the R

[R] sem error message

2012-05-04 Thread Vero Chillo
Hello, I tried to do a 'sem' analysis for data of how blueberry consumption by birds is influenced by a pollution gradient, using distance and vegetation structural and composition variables, but I got the following error message: Error in sem.default(ram = ram, S = S, N = N, param.names = pars,

[R] Binomial GLM, chisq.test, or?

2012-05-04 Thread lincoln
Hi, I have a data set with 999 observations, for each of them I have data on four variables: site, colony, gender (quite a few NA values), and cohort. This is how the data set looks like: str(dispersal) 'data.frame': 999 obs. of 4 variables: $ site : Factor w/ 2 levels 1,2: 1 1 1 1 1 1 1 1

Re: [R] text replacement with a loop in a script file

2012-05-04 Thread Rui Barradas
Hello, diegogiri wrote Hi, i'm a new r user and I will take you a simple (not for me)question. I have a r script file like this: text - c(ARCHIVIO name definition) I have a csv file like: NAME alfa beta gamma how can I replace with a loop statment

[R] ANOVA problem

2012-05-04 Thread robgriffin247
Hi, I need to create a data frame containing the results of a number of ANOVA's but I'm having some trouble setting it up (some being enough for me to spend 3 days trying with no progress and be left staring in to the abyss which some people call a weekend, and what I will call 2 quiet days in the

[R] add an automatized linear regression in a function

2012-05-04 Thread Rui Barradas
Em 04-05-2012 11:00, jeff6868 geoffrey_kl...@etu.u-bourgogne.fr escreveu: Date: Thu, 3 May 2012 06:45:59 -0700 (PDT) From: jeff6868geoffrey_kl...@etu.u-bourgogne.fr To:r-help@r-project.org Subject: [R] add an automatized linear regression in a function

[R] auditing R's memory usage

2012-05-04 Thread Alexander Shenkin
Hi Folks, I'm running 32-bit R 2.14 in RStudio on my Win 7 x64 system with 8GB RAM. I'm getting memory problems as R wants to swallow more than the 4GB limit. I think I'm stuck at 4GB as I have to use 32-bit R for a number of packages (ODBC, etc). However, I doubt I really need to be using

  1   2   >