[R] Making a picture that is wide and small height

2008-12-03 Thread David Epstein
How do I make a picture that is a horizontal strip? I tried plot(x=c(1,2,3,4),y=c(1,1,1,1)) #works but screen image is square. pdf(ratio.pdf,height=1,width=6) plot(x=c(1,2,3,4),y=c(1,1,1,1)) I got the following error message: Error in plot.new() : figure margins too large Is it possible to

[R] alternative way to replicate()

2008-12-03 Thread Liviu Andronic
Dear all, I'm looking for an alternative way to replicate the 2, string for an x number of times, and end up with one string containing 2, x times. I can partly achieve this using replicate(). y - rep(2,, times=3) y [1] 2, 2, 2, The output that I am looking for is, however, 2,2,2,. I also

Re: [R] Bug in transform?

2008-12-03 Thread Prof Brian Ripley
On Tue, 2 Dec 2008, hadley wickham wrote: The underlying issue is actually not in transform() but in data.frame(): aq - airquality[sample(1:153,6),] data.frame(aq, list(a=1,b=2)) Error in data.frame(aq, list(a = 1, b = 2)) : arguments imply differing number of rows: 6, 1 data.frame(aq,

Re: [R] linear functional relationships with heteroscedastic non-Gaussian errors - any packages around?

2008-12-03 Thread Prof Brian Ripley
On Tue, 2 Dec 2008, Jarle Brinchmann wrote: Yes I think so if the errors were normally distributed. Unfortunately I'm far from that but the combination of sem its bootstrap is a good way to deal with it in the normal case. I must admit as a non-statistician I'm a not 100% sure what the

Re: [R] alternative way to replicate()

2008-12-03 Thread Dimitris Rizopoulos
have a look at ?paste(), e.g., paste(rep(2, 3), collapse = ,) and if you need a comma at the end, then you can again use paste(), paste(paste(rep(2, 3), collapse = ,), ,, sep = ) I hope it helps. Best, Dimitris Liviu Andronic wrote: Dear all, I'm looking for an alternative way to

Re: [R] date operations

2008-12-03 Thread Christophe Dutang
Thanks a lot Envoyé de mon iPhone Le 3 déc. 08 à 00:39, jim holtman [EMAIL PROTECTED] a écrit : If you want to do the addition, 'unclass' the variable: alpha2+4 [1] 2008-12-25 alpha2 + unclass(alpha1) [1] 2009-02-15 On Tue, Dec 2, 2008 at 4:10 PM, Christophe Dutang [EMAIL

Re: [R] Making a picture that is wide and small height

2008-12-03 Thread Prof Brian Ripley
On Tue, 2 Dec 2008, David Epstein wrote: How do I make a picture that is a horizontal strip? I tried plot(x=c(1,2,3,4),y=c(1,1,1,1)) #works but screen image is square. pdf(ratio.pdf,height=1,width=6) plot(x=c(1,2,3,4),y=c(1,1,1,1)) I got the following error message: Error in plot.new() :

[R] hypergeometric function

2008-12-03 Thread Roslina Zakaria
Hi,   I hope somebody can help me on how to use the hypergeometric function.  I did read through the R documentation on hypergeometric but not really sure what it means.   I would like to evaluate the hypergeometric function as follows: F((2*alpha+1)/2, (2*alpha+2)/2 , alpha+1/2, betasq/etasq).  

Re: [R] Bug in transform?

2008-12-03 Thread Prof Brian Ripley
On Tue, 2 Dec 2008, Peter Dalgaard wrote: Prof Brian Ripley wrote: As the help page says If some of the values are not vectors of the appropriate length, you deserve whatever you get! Yes (did I write that?). It is a bit annoying with things that almost work, though. [snip]

Re: [R] simultaneous plots

2008-12-03 Thread Philipp Pagel
On Tue, Dec 02, 2008 at 02:28:18PM -0800, David Epstein wrote: Is there a good and concise way of making simultaneous plots that are identical, but directed to different devices? I'm writing an R-script that produces a pdf file. I would really like to check visually whether the pdf file

[R] Speeding up casting a dataframe from long to wide format

2008-12-03 Thread Daren Tan
Hi, I am casting a dataframe from long to wide format. The same codes that works for a smaller dataframe would take a long time (more than two hours and still running) for a longer dataframe of 2495227 rows and ten different predictors. How to make it more efficient ? wer -

[R] par(mfrow = ) resets par('cex'), not reduces it

2008-12-03 Thread [EMAIL PROTECTED]
Hello group! I use R 2.8.0 . I've just found out that par(mfrow =) *resets* par ('cex'), not reduces it as documented. To reproduce: par(cex = 0.5) par(mfrow = c(2, 2)) print(par('cex')) It outputs 0.83, not 0.415 as expected. Particularly such a behavior makes plot.acf effectively ignore par

[R] hypergeometric

2008-12-03 Thread Zakaria, Roslinazairimah - zakry001
Hi, I hope somebody can help me on how to use the hypergeometric function. I did read through the R documentation on hypergeometric but not really sure what it means. I would like to evaluate the hypergeometric function as follows: F((2*alpha+1)/2, (2*alpha+2)/2 , alpha+1/2,

Re: [R] simultaneous plots

2008-12-03 Thread Prof Brian Ripley
On Wed, 3 Dec 2008, Philipp Pagel wrote: On Tue, Dec 02, 2008 at 02:28:18PM -0800, David Epstein wrote: Is there a good and concise way of making simultaneous plots that are identical, but directed to different devices? I'm writing an R-script that produces a pdf file. I would really like to

Re: [R] Bug in transform?

2008-12-03 Thread Peter Dalgaard
Prof Brian Ripley wrote: On Tue, 2 Dec 2008, Peter Dalgaard wrote: Prof Brian Ripley wrote: As the help page says If some of the values are not vectors of the appropriate length, you deserve whatever you get! Yes (did I write that?). It is a bit annoying with things that almost

Re: [R] Bug in transform?

2008-12-03 Thread Wacek Kusnierczyk
Peter Dalgaard wrote: BTW, we have a deparser bug: transform function (_data, ...) UseMethod(transform) environment: namespace:base function (_data, ...) Error: unexpected string constant in function (_data f - function (`_data`, ...) {} attr(f,source)-NULL f function

Re: [R] Speeding up casting a dataframe from long to wide format

2008-12-03 Thread Gabor Grothendieck
Try timing this to see if its any faster: lev - levels(wer$Predictor) out - outer(wer$Predictor, lev, ==) colnames(out) - lev aggregate(out, wer[1:2], sum) Name Type A B 11a 1 0 22b 1 0 33c 1 0 44d 1 1 55e 1 1 On Tue, Dec 2, 2008 at 11:52 PM, Daren

[R] Switch language

2008-12-03 Thread Antje
Hi there, I've installed R somewhen in German but I'd like to have it in English. The installation of a new version does not change the language setting though I think I've chosen English in the installation process (this choice was available, right?). Can anybody give me a hint?

[R] ggplot2 - suggestion for facet_wrap/grid

2008-12-03 Thread David Hajage
Hello R users (and Hadley), facet_wrap and facet_grid function are both very usefull. But they are perhaps a bit redundant. I probably don't see the advantage of two separate functions, but what do you think of this suggestion : add 'nrow' and 'ncol arguments to facet_grid. These arguments would

[R] Buchinsky estimator

2008-12-03 Thread Johnes, Geraint
Is there a R package available that facilitates estimation of Buchinsky's two step procedure in order to correct for sample selection in a quantile regression setting? Thanks in advance for any help. Reference: Moshe Bushinsky (2001) Quantile regression with sample selection: estimating

Re: [R] Switch language

2008-12-03 Thread Annette Heisswolf
Hei, in the FAQ on R for Windows it says: 3.4 I selected English for installation but R runs in Chinese. Precisely, you selected English for installation! The language of the installer has nothing to do with the language used to run R: this is completely standard Windows practice (and

Re: [R] Switch language

2008-12-03 Thread Prof Brian Ripley
Perhaps you are on Windows: the answer is in the rw-FAQ http://cran.r-project.org/bin/windows/base/rw-FAQ.html#I-selected-English-for-installation-but-R-runs-in-Chinese If you have another platform either set LANGUAGE=en or (for MacOS X) ask on the appropriate list. On Wed, 3 Dec 2008, Antje

Re: [R] Switch language

2008-12-03 Thread Antje
Hello Annette, that explains everything... Thank you! I just thought having an English version of Windows would be enough but indeed my Regional and Language-Setting are set to German... Ciao, Antje Annette Heisswolf schrieb: Hei, in the FAQ on R for Windows it says: 3.4 I selected

Re: [R] Bug in transform?

2008-12-03 Thread Peter Dalgaard
Wacek Kusnierczyk wrote: It should deparse with backticks, not the old-style quotes (did that ever work?). isn't it the same issue as in this simple case: `FALSE` = 0 ls() # FALSE, not `FALSE` vQ No. ls() always returns a character vector. -- O__ Peter Dalgaard

Re: [R] sampling from data.frame

2008-12-03 Thread axionator
sorry for being a little bit imprecise, Chuck interpreted my question as desired. Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

Re: [R] simultaneous plots

2008-12-03 Thread David Epstein
Prof Brian Ripley wrote: How about dev.copy2pdf ? I put the following into a script: quartz(...) #many graphics commands dev.copy2pdf(pdf,file=ratio1.pdf) and then sourced the script. I got the error message Error in pdfFonts(family) : invalid arguments in 'pdfFonts' (must be font

Re: [R] Problem with tcl/tk and Rcmdr - urgent help required

2008-12-03 Thread Ben
Dear John, i did follow the Rcmdr instructions for macosx, having no results though. I am soon upgrading to 10.5 and hope i'll encounter no problems. The silly thing however was that i had installed every file needed for rcmdr to run but apparently had no results. Is there maybe some key

Re: [R] hypergeometric

2008-12-03 Thread Jarle Brinchmann
The dhyper etc deal with the hypergeometric _distribution_ while what you appear to want have is the hypergeometric special function (the connection is that the regular hypergeometric function is the generating function for the hypergeometric distribution if I recall correctly). Anyway, what you

Re: [R] Bug in transform?

2008-12-03 Thread Vitalie Spinu
Many thanks for your kind responses. That's a simple change and will make transform.data.frame behave more consistently with cbind.data.frame and data.frame. Related to above, I find rather inconsistent following behavior: aq - airquality[sample(1:153,6),] data.frame(aq,

[R] adding a new dataset to the default R distribution

2008-12-03 Thread Stefano Costa
Hi, I am a student in archaeology with some interest in statistics and R. Recently I've obtained the permission to distribute in the public domain a small dataset (named spearheads with 40 obs. of 14 variables) that was used in an introductory statistics book for archaeologists (published in

Re: [R] hypergeometric

2008-12-03 Thread Robin Hankin
The hypergeo package should be able to deal with this, although the function you specify below looks like a degenerate case (if I understand it correctly) so the convergence rate is likely to be slow. Let me know how you get on best wishes Robin (author of hypergeo) Jarle Brinchmann wrote:

[R] stuck with repeated values

2008-12-03 Thread SOUVIK BANDYOPADHYAY
R Gurus,I have a vector of nearly 90,000 characters from which I have to extract the index of the characters which are repeated. So suppose if x-c(a,a,b,a,b,c,d) then my output would be a vector having the index where the values are repeated i.e (1,2,3,4,5). I have been able to isolate out the

Re: [R] stuck with repeated values

2008-12-03 Thread Chuck Cleland
On 12/3/2008 6:32 AM, SOUVIK BANDYOPADHYAY wrote: R Gurus,I have a vector of nearly 90,000 characters from which I have to extract the index of the characters which are repeated. So suppose if x-c(a,a,b,a,b,c,d) then my output would be a vector having the index where the values are repeated

Re: [R] simultaneous plots

2008-12-03 Thread Prof Brian Ripley
On Wed, 3 Dec 2008, David Epstein wrote: Prof Brian Ripley wrote: How about dev.copy2pdf ? I put the following into a script: quartz(...) #many graphics commands dev.copy2pdf(pdf,file=ratio1.pdf) Just dev.copy2pdf(file=ratio1.pdf) and then sourced the script. I got the error

Re: [R] adding a new dataset to the default R distribution

2008-12-03 Thread Prof Brian Ripley
On Wed, 3 Dec 2008, Stefano Costa wrote: Hi, I am a student in archaeology with some interest in statistics and R. Recently I've obtained the permission to distribute in the public domain a small dataset (named spearheads with 40 obs. of 14 variables) that was used in an introductory

Re: [R] ggplot2 facet_wrap problem

2008-12-03 Thread ONKELINX, Thierry
Hi Stephen, It looks like a bug in facet_wrap which seems to mix up the factor labels (by sorting only the labels but not the plots?). HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

[R] intersection of two matrices

2008-12-03 Thread T Joshi
Hi, I have two matrices as follow: matrix A = a=matrix(c(c(abc,abc,bcd,bcd,bce,bce),c(a1,d2,d1,d2,a1,a2)),6,2) and matrix B which contains pair of values : b=matrix(c(c(a1,a2),c(a1,d2)),2,2) In short, I wish to find out pairs of values in matrix a[,2] having same value in a[,1], which occur

[R] intersection of two matrices(updated)

2008-12-03 Thread T Joshi
Hi, I have two matrices as follow: matrix A = a=matrix(c(c(abc,abc,bcd,bcd,bce,bce),c(a1,d2,d1,d2,a1,a2)),6,2) and matrix B which contains pair of values : b=matrix(c(c(a1,a1),c(a2,d2)),2,2) In short, I wish to find out pairs of values in matrix a[,2] having same value in a[,1], which occur

Re: [R] alternative way to replicate()

2008-12-03 Thread Liviu Andronic
Thanks all. All solutions are usable. These two I received off-list: toString(paste(rep(2,3), sep=,)) [1] 2, 2, 2 and paste(rep(2,,3),collapse=) Liviu On Wed, Dec 3, 2008 at 9:14 AM, Dimitris Rizopoulos [EMAIL PROTECTED] wrote: have a look at ?paste(), e.g., paste(rep(2, 3), collapse = ,)

Re: [R] ggplot2 - suggestion for facet_wrap/grid

2008-12-03 Thread hadley wickham
Hi David, facet_wrap and facet_grid function are both very usefull. But they are perhaps a bit redundant. I disagree ;) Conceptually they are rather different: facet_wrap is essentially a 1d layout, while facet_grid is a 2d layout. This has implications for how you specify the faceting, how

Re: [R] ggplot2 facet_wrap problem

2008-12-03 Thread hadley wickham
Yes, that's a known bug. It's fixed in the next version which I'm hoping to release early next week. Regards, Hadley On Wed, Dec 3, 2008 at 6:12 AM, ONKELINX, Thierry [EMAIL PROTECTED] wrote: Hi Stephen, It looks like a bug in facet_wrap which seems to mix up the factor labels (by sorting

Re: [R] intersection of two matrices(updated)

2008-12-03 Thread jim holtman
Is this what you want: a [,1] [,2] [1,] abc a1 [2,] abc d2 [3,] bcd d1 [4,] bcd d2 [5,] bce a1 [6,] bce a2 b [,1] [,2] [1,] a1 a2 [2,] a1 d2 x - lapply(split(seq(nrow(a)), a[,1]), function(.indx){ + do.call(rbind, lapply(seq(nrow(b)), function(.row){ + if (any(b[.row, 1]

Re: [R] Speeding up casting a dataframe from long to wide format

2008-12-03 Thread hadley wickham
Hi Daren, Unfortunately, the current version of reshape isn't very efficient. I'm working on a new version which should be 10-20x times faster for the operation that you're performing, but this won't be ready for a while and in the meantime you might want to try an alternative approach, like the

[R] Creating Tabel for Mean, Deviance

2008-12-03 Thread Edwin Sendjaja
Hi, Can someone help me how to create a table for Min, Max, Mean, Deviance. I have input data like this: Person Age Child 1 517 2 2 517 0 3 517 1 4 5202 5 520 3 6 710 1 7 721

[R] Spectral Analysis of Time Series in R

2008-12-03 Thread Alexander Schnebel
Dear R Community, I am currently student at the Vienna University of Technology writing my Diploma thesis on causality in time series and doing some analyses of time series in R. I have the following questions: (1) Is there a function in R to estimate the PARTIAL spectral coherence of a

Re: [R] ggplot2 facet_wrap problem

2008-12-03 Thread David Hajage
yes, I think this is the bug that will be fixed in the next release : http://github.com/hadley/ggplot2/tree/master/NEWS 2008/12/3 ONKELINX, Thierry [EMAIL PROTECTED] Hi Stephen, It looks like a bug in facet_wrap which seems to mix up the factor labels (by sorting only the labels but not the

Re: [R] Spectral Analysis of Time Series in R

2008-12-03 Thread Pfaff, Bernhard Dr.
Hello Alexander, for (3) see the CRAN-package vars. Best, Bernhard Dear R Community, I am currently student at the Vienna University of Technology writing my Diploma thesis on causality in time series and doing some analyses of time series in R. I have the following questions: (1) Is

[R] Function output difficulties

2008-12-03 Thread emj83
is there anyway for some parts of the function output to not be returned, even if the output has been used to calculate a further part of the function? i have tried invisible() to no avail. Thanks Emma -- View this message in context:

Re: [R] intersection of two matrices

2008-12-03 Thread bartjoosen
? merge complexkid wrote: Hi, I have two matrices as follow: matrix A = a=matrix(c(c(abc,abc,bcd,bcd,bce,bce),c(a1,d2,d1,d2,a1,a2)),6,2) and matrix B which contains pair of values : b=matrix(c(c(a1,a2),c(a1,d2)),2,2) In short, I wish to find out pairs of values in matrix a[,2]

Re: [R] Making a picture that is wide and small height

2008-12-03 Thread Greg Snow
Look at the squishplot function in the TeachingDemos package, that may do what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org]

[R] weighted standard deviation

2008-12-03 Thread Humphrey Kaunda
Please assist, how do you find the weighted standard deviation? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

[R] Fwd: ggplot2 - suggestion for facet_wrap/grid

2008-12-03 Thread David Hajage
2008/12/3 hadley wickham [EMAIL PROTECTED] Hi David, facet_wrap and facet_grid function are both very usefull. But they are perhaps a bit redundant. I disagree ;) I was sure :-) Conceptually they are rather different: facet_wrap is essentially a 1d layout, while facet_grid is a 2d

[R] GLMM using lme4

2008-12-03 Thread Luciano La Sala
Dear R-experts, I am running R version 2.7.1 on Windows Vista. I have a small dataset which consists of “chick ID”, “year (0, 1)”, “hatching order [HO, defined as first, second and third-hatched chick]”, and the binary outcome of interest “death (0, 1)”. So a subset of my dataset looks like

Re: [R] How to solve following equation?

2008-12-03 Thread RON70
Thanks for this reply, However I am interested to know why I need to modify my function to a=1? Regards, Gabor Grothendieck wrote: Assume a = 1. If not set b = b/a, etc. Now use (1) uniroot f - function(x) b + c/(1+x) + d/(1+x)^2 - 1 - x uniroot(f, 0:1) $root [1] 0.8392679

Re: [R] weighted standard deviation

2008-12-03 Thread Jorge Ivan Velez
Dear Humphrey, Take a look at ?wtd.mean in Hmisc. HTH, Jorge On Wed, Dec 3, 2008 at 5:43 AM, Humphrey Kaunda [EMAIL PROTECTED] wrote: Please assist, how do you find the weighted standard deviation? __ R-help@r-project.org mailing list

[R] how do I eliminate excess levels in lattice contourplot key / legend?

2008-12-03 Thread Seth W Bigelow
I'm working on a contourplot( ) graph, the subject of several previous posts to this list. The contours express probabilities from 0 - 1, but the key that is automatically generated by contourplot pads the probability scale with values that are impossible (i.e, range goes from -0.2 to 1.2),

Re: [R] GLMM using lme4

2008-12-03 Thread Daniel Malter
Try length(yourvariablename) for all variables in the model. The first error message indicates that the vectors you are using are not of the same length (i.e. they do not contain the same number of observations). The modeling question: Chickens are nested in nest (haha), but you don't have a nest

Re: [R] date operations

2008-12-03 Thread Gabor Grothendieck
What is odd is that it seems to run ok if we call +.Date directly: +.Date(alpha1, alpha2) [1] 2009-02-15 On Tue, Dec 2, 2008 at 4:10 PM, Christophe Dutang [EMAIL PROTECTED] wrote: Hi all, I'm dealing with dates in R (2.7.2), but some basic operations raise a warning. Incompatible methods

Re: [R] How to solve following equation?

2008-12-03 Thread Gabor Grothendieck
You don't. This was just to make the presentation simpler. On Wed, Dec 3, 2008 at 12:32 PM, RON70 [EMAIL PROTECTED] wrote: Thanks for this reply, However I am interested to know why I need to modify my function to a=1? Regards, Gabor Grothendieck wrote: Assume a = 1. If not set b =

Re: [R] date operations

2008-12-03 Thread Gavin Simpson
On Wed, 2008-12-03 at 13:18 -0500, Gabor Grothendieck wrote: What is odd is that it seems to run ok if we call +.Date directly: +.Date(alpha1, alpha2) [1] 2009-02-15 It also works if you flip the ordering: alpha2 + alpha1 [1] 2009-02-15 Warning message: Incompatible methods (+.Date,

Re: [R] Function output difficulties

2008-12-03 Thread Ted Harding
On 03-Dec-08 13:41:53, emj83 wrote: is there anyway for some parts of the function output to not be returned, even if the output has been used to calculate a further part of the function? i have tried invisible() to no avail. Thanks Emma It's not clear what you mean by some parts of the

Re: [R] date operations

2008-12-03 Thread Gabor Grothendieck
On Wed, Dec 3, 2008 at 1:57 PM, Gavin Simpson [EMAIL PROTECTED] wrote: On Wed, 2008-12-03 at 13:18 -0500, Gabor Grothendieck wrote: What is odd is that it seems to run ok if we call +.Date directly: +.Date(alpha1, alpha2) [1] 2009-02-15 It also works if you flip the ordering: alpha2 +

[R] changing colnames in dataframes

2008-12-03 Thread Wolfgang Lindner
dear all, I'm building new dataframes from bigger one's using e.g. columns F76, F83, F90: JJ-data.frame( c( as.character(rep( gender,3))) , c( F76,6- F83, F90) ) Looking into JJ one has: c.as.character.rep.gender..8... c.6...F73..F78..F79..F82..6...F84..F94..F106..F109 1

[R] Hmisc latex() and Rcmdr numSummary() percentage issues

2008-12-03 Thread Liviu Andronic
Dear R users, I have issues regarding latex() from Hmisc and numSummary() from Rcmdr. Here's an example: library(Rcmdr) data(Angell, package=car) numSummary(Angell[,hetero], statistics=c(mean, sd, quantiles), quantiles=c( 0,.25,.5,.75,1 )) .numSummary - popOutput()

Re: [R] date operations

2008-12-03 Thread Gavin Simpson
On Wed, 2008-12-03 at 14:13 -0500, Gabor Grothendieck wrote: snip / Why it works is not odd if you look at the help for ?`+.Date`, which shows that for this method (correct term?) we need 'date' + 'x', where 'date' is an object of class Date and 'x' is numeric. In fact what it says is

Re: [R] how do I eliminate excess levels in lattice contourplot key / legend?

2008-12-03 Thread Deepayan Sarkar
On Wed, Dec 3, 2008 at 9:13 AM, Seth W Bigelow [EMAIL PROTECTED] wrote: I'm working on a contourplot( ) graph, the subject of several previous posts to this list. The contours express probabilities from 0 - 1, but the key that is automatically generated by contourplot pads the probability

Re: [R] changing colnames in dataframes

2008-12-03 Thread Prof Brian Ripley
See the help page. You name the arguments, e.g. JJ - data.frame( gender= c( as.character(rep( gender,3))) , J.value -c( F76 ,6-F83, F90) ) The help says Arguments: ...: these arguments are of either the form 'value' or 'tag = value'. Component names are

Re: [R] Strplit code

2008-12-03 Thread Prof Brian Ripley
On Wed, 3 Dec 2008, [EMAIL PROTECTED] wrote: Dear R-users, The strsplit function does not exist in S-plus and I would like to use it. How could I reproduce the function in Splus or access to its source code? With difficulty, as it is almost entirely implemented in C code (in

Re: [R] Strplit code

2008-12-03 Thread John Fox
Dear Brian (and original poster), My apologies -- I didn't notice the original posting. By coincidence, I have a version of strsplit() that I've used to illustrate recursion: Strsplit - function(x, split){ if (length(x) 1) { return(lapply(x, Strsplit, split)) # vectorization

[R] applying a function to another function

2008-12-03 Thread Carlos Cuartas
Hello, I did a function (sec_conop) whose arguments are syndic, well and wellconop. sec_conop(syndic='01syndic.txt',well='well-1.csv',wellconop='well-1.dat');closeAllConnections() This function takes “well” and “syndic”, matching between them and then it does some transformations. The result

[R] reading version 9 SAS datasets in R

2008-12-03 Thread jude.ryan
Hi, I am trying to read a SAS version 9.1.3 SAS dataset into R (to preserve the SAS labels), but am unable to do so (I have read in a CSV version). I first created a transport file using the SAS code: libname ces2 'D:\CES Analysis\Data'; filename transp 'D:\CES Analysis\Data\fadata.xpt';

Re: [R] reading version 9 SAS datasets in R

2008-12-03 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, December 03, 2008 1:40 PM To: r-help@r-project.org Cc: [EMAIL PROTECTED] Subject: [R] reading version 9 SAS datasets in R Hi, I am trying to read a SAS

Re: [R] reading version 9 SAS datasets in R

2008-12-03 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: Hi, I am trying to read a SAS version 9.1.3 SAS dataset into R (to preserve the SAS labels), but am unable to do so (I have read in a CSV version). I first created a transport file using the SAS code: libname ces2 'D:\CES Analysis\Data'; filename transp

[R] Random Forest weighting

2008-12-03 Thread Raghu Naik
Folks, I have a query around weighting in Random Forest (RF). I know that several earlier emails in this group have raised this issue, but I did not find an answer to my query. I am working on a dataset (dataset1) that consists of 4 million records that can be reduced to a dataset (dataset2) of

Re: [R] reading version 9 SAS datasets in R

2008-12-03 Thread Frank E Harrell Jr
Frank E Harrell Jr wrote: [EMAIL PROTECTED] wrote: Hi, I am trying to read a SAS version 9.1.3 SAS dataset into R (to preserve the SAS labels), but am unable to do so (I have read in a CSV version). I first created a transport file using the SAS code: libname ces2 'D:\CES

[R] Static random numbers

2008-12-03 Thread Bastian Offermann
Hello, can anybody help me out saving random numbers? What I am doing is to generate a series of random numbers and keep it as a zoo object. z - 1000 rn1 - as.zoo(rnorm(z)) The random numbers will be analyzed and described in a LaTeX document, so I have to keep them static somehow. The

Re: [R] Static random numbers

2008-12-03 Thread Marc Schwartz
on 12/03/2008 06:10 PM Bastian Offermann wrote: Hello, can anybody help me out saving random numbers? What I am doing is to generate a series of random numbers and keep it as a zoo object. z - 1000 rn1 - as.zoo(rnorm(z)) The random numbers will be analyzed and described in a LaTeX

[R] Help with reading code

2008-12-03 Thread Dana77
I would like to give out the equation for calculating the maximum likelihood. Below is the code, but I still have problems with it. After I read the code, I found there are two cases for w(weights). If w is not zero, then the equation is given as val - 0.5 * (sum(log(w)) - N * (log(2 * pi) + 1

Re: [R] Help with reading code

2008-12-03 Thread Steven McKinney
Hi Dana -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dana77 Sent: Wednesday, December 03, 2008 3:24 PM To: r-help@r-project.org Subject: [R] Help with reading code I would like to give out the equation for calculating the maximum

Re: [R] Help with maps

2008-12-03 Thread Avram Aelony
aha!, thanks for this. Avram On Dec 2, 2008, at 5:38 PM, Ray Brownrigg wrote: On Wed, 03 Dec 2008, Ray Brownrigg wrote: The easiest way would be: map('world', regions=UK, xlim=c(-10, 5), ylim=c(48, 60)) But of course: map('world', regions=c(UK, Ireland), xlim=c(-10, 5), ylim=c(48, 60))

Re: [R] XML-RPC

2008-12-03 Thread Duncan Temple Lang
Hi Stavros httpRequest is good. You might also look at the RCurl package for access to more protocols and slightly higher level facilities for dealing with HTTP (and other) requests. Also, you might look at SSOAP as a related technology. I'll be interested to see what you come up with, so

[R] Howto Add Labels Next To Markers in Scatter Plot

2008-12-03 Thread Gundala Viswanath
Dear all, How can I plot the data below with scatter plot so that the next to the marker it contain the label for species __DATA__ class true_hits false_hits species big 2350180 lion big 375 20 dog big 635 97 cow big78 4 horse big

[R] Discrimination vs. Calibration for newbies?

2008-12-03 Thread pufftissue pufftissue
Hi there, I can't seem to wrap my head around the differences between discrimination and calibration. I think that I learn best by examples. Could someone provide me with detailed explanations using examples of when a model could do both well, both poorly, and one well and the other poorly?

[R] Logistic Regression: variable selection based on p value?

2008-12-03 Thread pufftissue pufftissue
Hi, When I use logistic regression, each variable has a p value associated with it. Do I only include the variables that have a statistically significant p value (0.05), or are there situations when I should include variables when their p values are high? I had heard that if a variable has a

[R] readAsciiGrid memory issues

2008-12-03 Thread Alexander.Herr
Hi List, I am unable to read in a 7.8Gb ascii grid using readAsciiGrid {maptools} - R runs out of memory. I have 4Gb ram and 4Gb swap, so things are getting tight. I am wondering if anyone has alternative options (preferably with example) that enable to read in large grids, do some

[R] Post Hoc methods for anova in R

2008-12-03 Thread paul murima
Dear R community Does anyone know of some methods already programmed up open source in R for the post hoc methods in anova. I have some microarray data generated from different drug treatments 8 in particular, and a subset of 90 genes which i would like to analyseusing the above method. Thank