Re: [R] alternative to built-in data editor

2009-05-27 Thread Dieter Menne
urlwolf wrote: > > I often have to peek at large data. > While head and tail are convenient, at times I'd like some more > comprehensive. > I guess I debug better in a more visual way? > I was wondering if there's a way to override the default data editor. > I have never seen the data editor.

Re: [R] question about using a remote system

2009-05-27 Thread Ted Harding
On 28-May-09 00:58:17, Erin Hodgess wrote: > Dear R People: > I would like to set up a plug-in for Rcmdr to do the following: > > I would start on a Linux laptop. Then I would log into another > outside system and run a some commands. > > Now, when I tried to do > system("ssh e...@xxx.edu") > pa

Re: [R] Interaction plots as lines or bars?

2009-05-27 Thread Dieter Menne
Michael Kubovy wrote: > > An editor has suggested that I use bar plots to capture an interaction > of two 2-level factors and an interaction of a 2 by 3 factorial > experiment. (It would seem that there's a fear that someone might try > to interpolate between, e.g., 'male' and 'female'.)

Re: [R] Unable to load R

2009-05-27 Thread Zeljko Vrba
On Thu, May 28, 2009 at 11:42:41AM +0530, anupam sinha wrote: > > I have checked for the presence of the above mention library and found that > the library is present. I have run out of ideas. Can anyone help me out??? > I will be greatly indebted. > First: how did you check that the library is p

[R] Unable to load R

2009-05-27 Thread anupam sinha
Dear all, I have recently installed R on a Red Hat Enterprise Linux (RHEL5) system. But I am unable to load R and it is giving the following error : */usr/local/lib/R/bin/exec/R: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file o

Re: [R] R Books listing on R-Project

2009-05-27 Thread G. Jay Kerns
> > Jay: why not post your R-books how to on the wiki itself??? Because I thought that it would be better to write the instructions in R-wiki language that anybody could modify rather than post a PDF by me. Here is what I had in mind: http://wiki.r-project.org/rwiki/doku.php?id=links:books:howto

[R] PBSmapping problems with importGSHHS

2009-05-27 Thread Tim Clark
Dear List, I am trying to use the PBSmapping package to import and plot the shoreline of Hawaii. I am having problems importing and plotting the specific regions that I would like to plot. Specifically, I can't get it to import the range of x variables that I would like. I think my problem

[R] Interaction plots as lines or bars?

2009-05-27 Thread Michael Kubovy
Dear r-helpers, An editor has suggested that I use bar plots to capture an interaction of two 2-level factors and an interaction of a 2 by 3 factorial experiment. (It would seem that there's a fear that someone might try to interpolate between, e.g., 'male' and 'female'.) In general it se

[R] R: R: Harmonic Analysis

2009-05-27 Thread mauede
Actually I do use DWT for features extraction which is aimed at clustering signals bearing statistically comparable patterns. Trend can easily fool any clustering function. This is why detrending is the number 1 step in the whole procedure. Sparing the quasi-harmonic components that bear most of

[R] R help

2009-05-27 Thread mohsin ali
Dear Sir I am new user of R. I am interested in modeling hydrological extreme events. I found MSClaio2008 very interesting function. In this function four criterions for choosing distributions. Can we call these criterions as model selection techniques or goodness of fit techniques or both?

Re: [R] R Books listing on R-Project

2009-05-27 Thread Ben Bolker
G. Jay Kerns wrote: > > Hello Stavros, > > On Wed, May 27, 2009 at 2:53 PM, Stavros Macrakis > wrote: >> I was wondering what the criteria were for including books on the Books >> Related to R page . (There >> is >> no maintainer listed on this p

Re: [R] problem with cbind

2009-05-27 Thread Gabor Grothendieck
Try this where Age.Group is a factor whose levels represent the columns of out and Seq is a sequence number labeling the first Name in each Age.Group 1, the second 2 and so on. > DF <- data.frame(Name = LETTERS, Age = 1:26) > DF$Age.Group <- cut(DF$Age, seq(0, 30, 10)) > DF$Seq <- with(DF, ave(seq

Re: [R] problem with cbind

2009-05-27 Thread jim holtman
Here is one way of doing it by splitting the data and then padding everything to the same length: > x <- data.frame(pat=LETTERS, age=sample(60, 26)) > x.cut <- split(x, cut(x$age, breaks=c(1,seq(10,60,10 > # determine maximum number in a group and then pad the rest out to that size > x.max <-

Re: [R] Replace is leaking?

2009-05-27 Thread Rolf Turner
On 28/05/2009, at 12:36 PM, Zhou Fang wrote: Okay, someone explain this behaviour to me: Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925] [1] 0.4462404 Browse[1]> temp1[12] [1] 3926 Browse[1]> temp2[12] [1] 0.4462404 Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925] [1] 0

Re: [R] Replace is leaking?

2009-05-27 Thread Zhou Fang
Oh hang on, I've figured it out. Rounding error, doh. Somewhere along the line I got lazy and took the weighted average of two values that are equal. as.integer truncates, so, yeah. Never mind. Zhou Fang __ R-help@r-project.org mailing list https:/

[R] question about using a remote system

2009-05-27 Thread Erin Hodgess
Dear R People: I would like to set up a plug-in for Rcmdr to do the following: I would start on a Linux laptop. Then I would log into another outside system and run a some commands. Now, when I tried to do system("ssh e...@xxx.edu") password xx It goes to the remote system. how do I conti

[R] Replace is leaking?

2009-05-27 Thread Zhou Fang
Okay, someone explain this behaviour to me: Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925] [1] 0.4462404 Browse[1]> temp1[12] [1] 3926 Browse[1]> temp2[12] [1] 0.4462404 Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925] [1] 0 For some reason, R seems to shift indices along w

Re: [R] How do I get removed from this mailing list?

2009-05-27 Thread Duncan Murdoch
On 27/05/2009 8:25 PM, Andrey Lyalko wrote: How do I get removed from this mailing list? Like most lists nowadays, it gives the instructions in each message header: List-Unsubscribe: ,

Re: [R] RGoogleDocs: can now see documents but cannot get content.

2009-05-27 Thread Farrel Buchinsky
I already downloaded 0.2-2 -If my memory serves me correctly. If we just go by date, have you updated the files on the server since May 18? Farrel Buchinsky Google Voice Tel: (412) 567-7870 Sent from Pittsburgh, Pennsylvania, United States On Wed, May 20, 2009 at 12:28, Duncan Temple Lang wrote:

[R] How do I get removed from this mailing list?

2009-05-27 Thread Andrey Lyalko
How do I get removed from this mailing list? [[alternative HTML version deleted]] __ 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

[R] lattice::xyplot axis padding with fontfamily="mono"

2009-05-27 Thread Benjamin Tyner
Hello, Say I have a predictor taking a very wide value: Data <- data.frame(pred="a",resp=1) print(xyplot(pred~resp, data=Data)) # enough y-axis padding to accommodate the wide label print(xyplot(pred~resp, data=Data,scales=list(fontfamily="mono

Re: [R] boxplot

2009-05-27 Thread stephen sefick
I don't understand what you want. On Wed, May 27, 2009 at 6:52 PM, wrote: > Hi gues, > > Is there any function in R for boxplot with different time points? > t1 <- c(rep(1,20),rep(2,20)) > t2 <- c(rep(1,10),rep(2,10),rep(1,10),rep(2,10)) > x <- rnorm(40,5,1) > dat <- data.frame(t1,t2,x) > > boxp

Re: [R] R: Harmonic Analysis

2009-05-27 Thread stephen sefick
Do you need time localization, or are you only interested in the period of the high frequency? If you do need time localization why not use a CWT to look at the signal? Stephen On Wed, May 27, 2009 at 4:59 PM, wrote: > Well, the time series I am  dealing with are non-linear and not-stationary.

[R] boxplot

2009-05-27 Thread amorigandhi
Hi gues,   Is there any function in R for boxplot with different time points? t1 <- c(rep(1,20),rep(2,20)) t2 <- c(rep(1,10),rep(2,10),rep(1,10),rep(2,10)) x <- rnorm(40,5,1) dat <- data.frame(t1,t2,x) boxplot(x~t1,t2) Many thanks, Amor [[alternative HTML version deleted]]

Re: [R] Linear Regression with Constraints

2009-05-27 Thread Emmanuel Charpentier
Le mercredi 27 mai 2009 à 17:28 +1000, bill.venab...@csiro.au a écrit : > You can accommodate the constraints by, e.g., putting > > c2 = pnorm(theta2) > c3 = pnorm(theta3) Nice. I'd have tried invlogit(), but I'm seriously biased... > x1 has a known coefficient (unity) so it becomes an offset. >

Re: [R] Changing point color/character in qqmath

2009-05-27 Thread Kevin W
Thanks to Deepayan, I have a corrected version of how to color points in a qqmath plot according to another variable. Using the barley data for a more concise example:: qqmath(~ yield | variety, data = barley, groups=year, auto.key=TRUE, prepanel = function(x, ...) { list(x

[R] R: Harmonic Analysis

2009-05-27 Thread mauede
Well, the time series I am dealing with are non-linear and not-stationary. Maura -Messaggio originale- Da: r-help-boun...@r-project.org per conto di stephen sefick Inviato: mer 27/05/2009 14.58 A: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Harmonic Analysis why will a fourier transform

Re: [R] Factor level with no cases shows up in a plot

2009-05-27 Thread Stefan Grosse
Arthur Burke wrote: > > ... I get the four lines that I expected but the legend includes the > Group level "cohort 4" . > > How can I get rid of "cohort 4" in Group? > This link might be of interest for you: http://wiki.r-project.org/rwiki/doku.php?id=tips:data-manip:drop_unused_levels ht

Re: [R] how do I get to be a member?

2009-05-27 Thread Gavin Simpson
On Wed, 2009-05-27 at 11:09 -0700, Michael Menke wrote: > Information, please. On what? Member of what? If you mean a member of the R Foundation, see: http://www.r-project.org/foundation/membership.html If you mean this list, you already are, otherwise you wouldn't be able to post (IIRC). If t

Re: [R] Axis label spanning multiple plots

2009-05-27 Thread Greg Snow
Create an outer margin (see ?par), then use mtext to put the title in the outer margin. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-

Re: [R] r-plot 2nd attempt

2009-05-27 Thread Gavin Simpson
On Wed, 2009-05-27 at 06:06 -0700, durden10 wrote: > First of all, thanks a lot for your quick & helpful comments! > > I have come down to this: > > Win<- c(-0.005276404, 0.081894394, -0.073461539, 0.184371967, > 0.133189670, -0.006239016, -0.063616699, 0.196754234, 0.402148743, > 0.10

Re: [R] how do I get to be a member?

2009-05-27 Thread Ted Harding
On 27-May-09 18:09:30, Michael Menke wrote: > Information, please. By subscribing your email address to the list. Visit the R-help info page at: https://stat.ethz.ch/mailman/listinfo/r-help and read what it has to say in general about R-help. Near the bottom is a section "Subscribing to R-help

[R] Axis label spanning multiple plots

2009-05-27 Thread Andre Nathan
Hello I need to plot 3 graphs in a single column; the top two plots have the same title, and I would like it to be written only once, centered horizontally and spanning the two plots. Something like t ++ || i || || t ++

Re: [R] R Books listing on R-Project

2009-05-27 Thread G. Jay Kerns
Hello Stavros, On Wed, May 27, 2009 at 2:53 PM, Stavros Macrakis wrote: > I was wondering what the criteria were for including books on the Books > Related to R page . (There is > no maintainer listed on this page.) > > In particular, I was wondering

Re: [R] alternative to built-in data editor

2009-05-27 Thread Greg Snow
Have you tried the View function (note the uppercase V). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Jose

Re: [R] "Error: package/namespace load failed"

2009-05-27 Thread Martin Morgan
Rebecca Sela wrote: > I am writing my first R package, and I have been getting the following series > of errors when I run R CMD check: > > * checking S3 generic/method consistency ... WARNING > Error: package/namespace load failed for 'REEMtree' > Call sequence: > 2: stop(gettextf("package/names

Re: [R] Still can't find missing data

2009-05-27 Thread Farley, Robert
I can't get the syntax that will allow me to show NA values (rows) in the xtabs. > # unfortunatly I don't see how to get that to run > XTTable <- xtabs(wt_annual ~ Mode_orig_only + connector, exclude=NULL, > na.action(na.pass), LAWAData) Error in eval(expr, envir, enclos) : object "wt_annual" no

Re: [R] Factor level with no cases shows up in a plot

2009-05-27 Thread krzysztof . sakrejda
If you have a vector of factors with empty levels you can get rid of them by rerunning the vector through the factor function: vec <- factor(vec) Don't know if this can be done at plotting time... Sent via BlackBerry by AT&T -Original Message- From: "Arthur Burke" Date: Wed, 27 May 20

[R] R Books listing on R-Project

2009-05-27 Thread Stavros Macrakis
I was wondering what the criteria were for including books on the Books Related to R page . (There is no maintainer listed on this page.) In particular, I was wondering why the following two books are not listed: * Andrew Gelman, Jennifer Hill, *Data

[R] Factor level with no cases shows up in a plot

2009-05-27 Thread Arthur Burke
Consider this data structure (df1) ... Group Year PctProf FullYr 1 Never RF 2004 87 88 2 Cohort 1 2004 83 84 3 Cohort 2 2004 84 86 4 Cohort 3 2004 87 87 5 Cohort 4 2004 73 74 6 Never RF 2005 85 86 7 Cohort 1 2005 81 82 8

Re: [R] reduce size of plot inside window and place legend beside plot

2009-05-27 Thread baptiste auguie
Try this and see if it helps (if not, please help improving it), http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:legendoutside HTH, baptiste On 27 May 2009, at 20:31, Wade Wall wrote: Hi all, I have been trying to figure out how to place a legend beside a plot, rather than w

[R] ggplot2 adding vertical line at a certain date

2009-05-27 Thread stephen sefick
library(ggplot2) melt.updn <- (structure(list(date = structure(c(11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149, 11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149), class = "Date"), variable = structur

[R] reduce size of plot inside window and place legend beside plot

2009-05-27 Thread Wade Wall
Hi all, I have been trying to figure out how to place a legend beside a plot, rather than within the space to no avail. I am assuming that I need to resize the plot relative to the window. If anyone has any guidance on how to do this, I would greatly appreciate it. Wade ___

[R] how do I get to be a member?

2009-05-27 Thread Michael Menke
Information, please. __ 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, minimal, self-contained, reproducible code.

Re: [R] no internal function "int.unzip" in R 2.9.0 for Windows

2009-05-27 Thread Romain Francois
Hi, I'll try to fix this soon. Could you log a bug request here: http://r-forge.r-project.org/tracker/?atid=1643&group_id=405&func=browse Regards, Romain Carson, John wrote: library(R2HTML) Loading required package: R2HTML Error in .Internal(int.unzip(zipname, NULL, dest)) : no i

[R] interpretation of the likelihood ratio test under *R* GLM

2009-05-27 Thread Michael Menke
Can anyone tell me how the LRT is to be interpreted under the glm package when using glm for logistic regression with mutiple predictors? family=binomial("logit")) drop1(Confidence.glm, test="Chisq") The summary z-table suggests a direction of the effect, and notably the large LRT

[R] a simple trick to get autoclose parenthesis on windows

2009-05-27 Thread Jose Quesada
Hi, This is a simple trick to get autoclose parenthesis on windows. If you like how StatET autocloses parens, but like to use the lighter Vanilla R, you can use autohotkey (http://autohotkey.net) to provide this functionality. Simply put the below code in a text file, rename extension as .ahk and

[R] problem with cbind

2009-05-27 Thread kayj
Hi All, I have a file with two columns, the first column has the names of the patients and the second column has the age. I am looking into creating an output file that looks like 1-1010-20etc EricChris Bob mat Andrew Suzan Where each column has the nam

[R] invert axis persp plot

2009-05-27 Thread Jack Siegrist
Hello folks, Is there a way to invert the z axis in a 'persp' plot? I tried using 'zlim=rev(range(z))', which would work with 'plot' but does not work in this case. Thank you for your help. __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Loop avoidance and logical subscripts

2009-05-27 Thread retama
Thank you! The script is now adapted to Biostrings and it is really fast! For example, it does: alph_sequence <- alphabetFrequency(data$sequence, baseOnly=TRUE) data$GCsequence <- rowSums(alph_sequence[,c("G", "C")]) / rowSums(alph_sequence) in the G+C computation. It also works amazingly

[R] RWeka weka.core.SerializationHelper.write

2009-05-27 Thread Christian
Hi, is it possible to use the writer method from the weka.core.SerializationHelper class in R? When yes, what could be wrong in my trial. many thanks Christian .jmethods("weka/core/SerializationHelper") [2] "public static void weka.core.SerializationHelper.write(java.lang.String,java.lang.O

[R] RWeka weka.core.SerializationHelper.write

2009-05-27 Thread Christian
Hi, is it possible to use the writer method from the weka.core.SerializationHelper class in R? What could be wrong in my trial. many thanks Christian .jmethods("weka/core/SerializationHelper") [2] "public static void weka.core.SerializationHelper.write(java.lang.String,java.lang.Object) th

Re: [R] Neural Network resource

2009-05-27 Thread Tony Breyal
I haven't used the AMORE package before, but it sounds like you haven't set linear output units or something. Here's an example using the nnet package of what you're doing i think: ### R START### > # set random seed to a cool number > set.seed(42) > > # set up data > x1<-rnorm(100); x2<-rnorm(100)

[R] r-plot 2nd attempt

2009-05-27 Thread durden10
First of all, thanks a lot for your quick & helpful comments! I have come down to this: Win<- c(-0.005276404, 0.081894394, -0.073461539, 0.184371967, 0.133189670, -0.006239016, -0.063616699, 0.196754234, 0.402148743, 0.104408425, 0.036910154, 0.195227863, 0.212743723, 0.2

[R] R-beta: Re:Stats Seminar 18/02/98

2009-05-27 Thread Roland Chariatte
Bonjour, Je recherche une ancienne amie qui porte le nom de Marylin Gabriel originaire des Seychelles et que j'ai perdu de vue il y à environ 20 ans. Si cette adresse e-mail est la tienne, tu te souviendra très bien de moi, j'aimerais beaucoup te revoir car j'ai de superbes souvenirs de toi. Peut

Re: [R] alternative to built-in data editor

2009-05-27 Thread Peter Dalgaard
Jose Quesada wrote: Hi all, I often have to peek at large data. While head and tail are convenient, at times I'd like some more comprehensive. I guess I debug better in a more visual way? I was wondering if there's a way to override the default data editor. I could of course dump to a txt file,

Re: [R] Neural Network resource

2009-05-27 Thread Indrajit Sengupta
Here is the code that i had used: # ## Read in the raw data fitness <- c(44,89.47,44.609,11.37,62,178,182, 40,75.07,45.313,10.07,62,185,185, 44,85.84,54.297,8.65,45,156,168, 42,68.15,59.571,8.17,40,166,172, 38,89.02,49.874,9.22,55,178,180, 47,77.45,44.811

[R] contour lines on persp plot

2009-05-27 Thread Jack Siegrist
Hello folks, I am a beginner R user. I have been able to make a 3D surface plot using 'persp'. The surface is made by a grid of lines emanating perpendicularly from each of the x and y axes at regular intervals. I can get rid of that grid by setting 'border=NA'. Can anyone suggest some ways to r

[R] "Error: package/namespace load failed"

2009-05-27 Thread Rebecca Sela
I am writing my first R package, and I have been getting the following series of errors when I run R CMD check: * checking S3 generic/method consistency ... WARNING Error: package/namespace load failed for 'REEMtree' Call sequence: 2: stop(gettextf("package/namespace load failed for '%s'", libra

[R] no internal function "int.unzip" in R 2.9.0 for Windows

2009-05-27 Thread Carson, John
> library(R2HTML) Loading required package: R2HTML Error in .Internal(int.unzip(zipname, NULL, dest)) : no internal function "int.unzip" Error : .onLoad failed in 'loadNamespace' for 'R2HTML' Error: package 'R2HTML' could not be loaded Version: R 2.9.0 for Windows Internet Ema

[R] alternative to built-in data editor

2009-05-27 Thread Jose Quesada
Hi all, I often have to peek at large data. While head and tail are convenient, at times I'd like some more comprehensive. I guess I debug better in a more visual way? I was wondering if there's a way to override the default data editor. I could of course dump to a txt file, and look at it with an

Re: [R] Labeling barplot bars by multiple factors

2009-05-27 Thread Mike Lawrence
You can get something close with ggplot2: library(ggplot2) my_data = expand.grid( A = factor(c('A1','A2')) , B = factor(c('B1','B2')) , C = factor(c('C1','C2')) ) my_data$DV = rnorm(8,mean=10,sd=1) p = ggplot() p = p + layer( geom = 'bar' , stat = 'identity'

Re: [R] Sort matrix by column 1 ascending then by column 2 decending

2009-05-27 Thread Duncan Murdoch
On 5/27/2009 8:39 AM, Paul Geeleher wrote: I've got a matrix with 2 columns and n rows. I need to sort it first by the values in column 1 ascending. Then for values which are the same in column 1, sort by column 2 decending. For example: You've seen a few ways. Here are some more: 1. Use the

Re: [R] R in Ubunto

2009-05-27 Thread Jarek Jasiewicz
R Heberto Ghezzo, Dr pisze: Hello , I do not know anything abount Ubunto, but I found a Portable Ubunto for Windows and since so many people prefer Linux to Windows I decided to give it a try. It runs very nicely, so I tried to load R, following Instructions in CRAN I added the line deb http:

Re: [R] Sort matrix by column 1 ascending then by column 2 decending

2009-05-27 Thread Kevin W
See also this tip on the R wiki: http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:sort Also available as the orderBy function in the doBy package. Kevin Wright On Wed, May 27, 2009 at 11:19 AM, Linlin Yan wrote: > It's a very interesting problem. I just wrote a function for it: >

Re: [R] vegan metaMDS question

2009-05-27 Thread Gavin Simpson
On Wed, 2009-05-27 at 11:31 -0400, stephen sefick wrote: > The design decision in metaMDS says that it uses: > > Minchin, P.R. (1987) An evaluation of relative robustness of > techniques for ecological ordinations. Vegetatio 71, 145-156. > > This is the paper that I found by the same name. Is th

Re: [R] How to exclude a column by name?

2009-05-27 Thread Wacek Kusnierczyk
Dieter Menne wrote: > Peter Dalgaard biostat.ku.dk> writes: > > >> Or, BTW, you can use within() >> >> aq <- within(airquality, rm(Day)) >> > > Please add this as an example to the docs of within. > possibly with the slightly more generic unwanted <- 'Day' aq <- within(airqua

[R] Labeling barplot bars by multiple factors

2009-05-27 Thread Thomas Levine
I want to plot quantitative data as a function of three two-level factors. How do I group the bars on a barplot by level through labeling and spacing? Here 's what I'm thinking of. Also, I'm pretty sure that I want a barplot, but there

[R] How to set a filter during reading tables

2009-05-27 Thread guox
We are reading big tables, such as, Chemicals <- read.table('ftp://ftp.bls.gov/pub/time.series/wp/wp.data.7.Chemicals',header = TRUE, sep = '\t', as.is =T) I was wondering if it is possible to set a filter during loading so that we just load what we want not the whole table each time. Thanks, -j

[R] Deviance explined in GAMM, library mgcv

2009-05-27 Thread Berta Ibáñez
Dear R-users, To obtain the percentage of deviance explained when fitting a gam model using the mgcv library is straightforward: summary(object.gam) $dev.expl or alternatively, using the deviance (deviance(object.gam)) of the null and the fitted models, and then using 1 minus th

Re: [R] Sort matrix by column 1 ascending then by column 2 decending

2009-05-27 Thread Linlin Yan
It's a very interesting problem. I just wrote a function for it: order.matrix <- function(m, columnsDecreasing = c('1'=FALSE), rows = 1:nrow(m)) { if (length(columnsDecreasing) > 0) { col <- as.integer(names(columnsDecreasing[1])); values <- sort(unique(m[rows, col]), decreasing=column

Re: [R] Hierarchical glm with binomial family

2009-05-27 Thread Douglas Bates
On Wed, May 27, 2009 at 9:17 AM, Ben Bolker wrote: > > > > Johan Stenberg-2 wrote: >> >> Dear members of the R help list, >> >> I want to do a hierarchical glm with binomial family but am unsure >> about how to write the syntax which involves nesting. >> >> I want to test whether the risk of being

[R] Changing point color/character in qqmath

2009-05-27 Thread Kevin W
Having solved this problem, I am posting this so that the next time I search for how to do this I will find an answer... Using qqmath(..., groups=num) creates a separate qq distribution for each group (within a panel). Using the 'col' or 'pch' argument does not (usually) work because panel.qqmath

[R] Object-oriented programming in R

2009-05-27 Thread Luc Villandre
Dear R-users, I have very recently started learning about object-oriented programming in R. I am far from being an expert in programming, although I do have an elementary C++ background. Please take a look at these lines of code. some.data = data.frame(V1 = 1:5, V2 = 6:10) ; p.plot = ggplot(

Re: [R] R in Ubunto

2009-05-27 Thread Jeff Newmiller
R Heberto Ghezzo, Dr wrote: Hello , I do not know anything abount Ubunto, but I found a Portable Ubunto for Windows and since so many people prefer Linux to Windows I decided to give it a try. It runs very nicely, so I tried to load R, following Instructions in CRAN I added the line deb http://

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread Stavros Macrakis
The 'ties.method' argument to 'rank' is the *third* positional argument to 'rank', so either you need to put it in the third position or you need to use a named argument. The fact that the variable you're using to represent ties.method is called ties.method is irrelevant. That is, this: ra

Re: [R] How to exclude a column by name?

2009-05-27 Thread Dieter Menne
Peter Dalgaard biostat.ku.dk> writes: > Or, BTW, you can use within() > > aq <- within(airquality, rm(Day)) Please add this as an example to the docs of within. Dieter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] R in Ubunto

2009-05-27 Thread stephen sefick
I don't remember what the version of R in deb repositories is, but 2.6.2 is probably about right. One of the things the Debian project is focused on is the stability of the operating system, so they do not update packages as readily as some other distributions. I had this with Debian 5.0 and just

Re: [R] Neural Network resource

2009-05-27 Thread Max Kuhn
> I fed this data into a Neural network (3 hidden layers with 6 neurons in each > layer) and trained the network. When I passed the input dataset and tried to > get the predictions, all the predicted values were identical! This confused > me a bit and was wondering whether my understanding of th

[R] vegan metaMDS question

2009-05-27 Thread stephen sefick
The design decision in metaMDS says that it uses: Minchin, P.R. (1987) An evaluation of relative robustness of techniques for ecological ordinations. Vegetatio 71, 145-156. This is the paper that I found by the same name. Is this the correct reference? Minchin, Peter R.1987. An Evaluation of th

[R] R in Ubunto

2009-05-27 Thread R Heberto Ghezzo, Dr
Hello , I do not know anything abount Ubunto, but I found a Portable Ubunto for Windows and since so many people prefer Linux to Windows I decided to give it a try. It runs very nicely, so I tried to load R, following Instructions in CRAN I added the line deb http://probability.ca/cran/bin/linux/

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread utkarshsinghal
Yeah, seems so obvious now. What a blunder, poor me. Perfect explanation. Thanks Thomas Lumley wrote: On Wed, 27 May 2009, utkarshsinghal wrote: I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread Gavin Simpson
On Wed, 2009-05-27 at 19:41 +0530, utkarshsinghal wrote: > I define the following function: > (Please don't wonder about the use of this function, this is just a > simplified version of my actual function. And please don't spend your > time in finding an alternate way of doing the same as the fol

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread Thomas Lumley
On Wed, 27 May 2009, utkarshsinghal wrote: I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And please don't spend your time in finding an alternate way of doing the same as the following does not exa

Re: [R] Neural Network resource

2009-05-27 Thread Indrajit Sengupta
You are right there is a pdf file which describes the function. But let tell you where I am coming from. Just to test if a neural network will work better than a ordinary least square regression, I created a dataset with one dependent variable and 6 other independent variables. Now I had delibe

Re: [R] How to exclude a column by name?

2009-05-27 Thread Stavros Macrakis
On Wed, May 27, 2009 at 6:37 AM, Zeljko Vrba wrote: > Given an arbitrary data frame, it is easy to exclude a column given its > index: > df[,-2]. How to do the same thing given the column name? A naive attempt > df[,-"name"] did not work :) > Various ways: Boolean index vector: df[ , nam

Re: [R] Multivariate Transformations

2009-05-27 Thread Gavin Simpson
On Wed, 2009-05-27 at 08:39 -0400, stephen sefick wrote: > It depends on what you are after. I am by no means a wunderkind when > it comes to transformation, but in the package vegan type > ?wisconsin > and that should give you a start, but if you know what > transformations you would like to pre

Re: [R] Warning message as a result of logistic regression performed

2009-05-27 Thread Gavin Simpson
Try reading this thread: http://thread.gmane.org/gmane.comp.lang.r.general/134368/focus=134475 especially the posts by I Kosmidis which show you how to diagnose problems in logit model fits like this. There is a statement about this warning in ?glm as well and a pointer to a reference which disc

Re: [R] Hierarchical glm with binomial family

2009-05-27 Thread Ben Bolker
Johan Stenberg-2 wrote: > > Dear members of the R help list, > > I want to do a hierarchical glm with binomial family but am unsure > about how to write the syntax which involves nesting. > > I want to test whether the risk of being attacked by Herbivores for > Meadowsweet plants is significa

[R] Defining functions - an interesting problem

2009-05-27 Thread utkarshsinghal
I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And please don't spend your time in finding an alternate way of doing the same as the following does not exactly represent my function. I am only intere

Re: [R] Sort matrix by column 1 ascending then by column 2 decending

2009-05-27 Thread Paul Geeleher
Nice. Works perfectly. On Wed, May 27, 2009 at 2:03 PM, Henrique Dallazuanna wrote: > Try this: > > cbind(sort(x[,1]), unlist(tapply(x[,2], x[,1], sort, decreasing = T))) > > On Wed, May 27, 2009 at 9:39 AM, Paul Geeleher > wrote: >> >> I've got a matrix with 2 columns and n rows. I need to sort

Re: [R] file.move?

2009-05-27 Thread Prof Brian Ripley
Are you looking for file.rename? Moving files is not really a portable concept, and nor is 'time stamps' (files usually have three or more times associated with them, and moving does not keep them all in OSes that implement it). On Wed, 27 May 2009, Stefan Uhmann wrote: Dear list, I want t

Re: [R] How to write a loop?

2009-05-27 Thread Andrew Dolman
Try lapply(ONS, fft) and take a look here http://cran.r-project.org/doc/manuals/R-intro.html for the basics of data structures in R and how to apply functions to them. Andy. andydol...@gmail.com 2009/5/27 Linlin Yan > Why did you use different variable names rather than index of > list/d

Re: [R] Harmonic Analysis

2009-05-27 Thread Gerard M. Keogh
My thoughts exactly. ?FFT should do the job. And define the dominant term - a_n**2 + b_n**2 - the Parseval Relation. stephen sefick

Re: [R] optim() question

2009-05-27 Thread John C Nash
Some thought about this overnight led to conclusion that a capability to follow from one method to another could be quite useful. Moreover, it should be pretty easy to fit it into our current trial version of optimx() as we call the function. More at UseR. JN Ravi Varadhan wrote: Stephen,

[R] Hierarchical glm with binomial family

2009-05-27 Thread Johan Stenberg
Dear members of the R help list, I want to do a hierarchical glm with binomial family but am unsure about how to write the syntax which involves nesting. I want to test whether the risk of being attacked by Herbivores for Meadowsweet plants is significantly dependent on the Distance to heterospec

Re: [R] Sort matrix by column 1 ascending then by column 2 decending

2009-05-27 Thread Henrique Dallazuanna
Try this: cbind(sort(x[,1]), unlist(tapply(x[,2], x[,1], sort, decreasing = T))) On Wed, May 27, 2009 at 9:39 AM, Paul Geeleher wrote: > I've got a matrix with 2 columns and n rows. I need to sort it first > by the values in column 1 ascending. Then for values which are the > same in column 1, s

Re: [R] Harmonic Analysis

2009-05-27 Thread stephen sefick
why will a fourier transform not work? 2009/5/27 Uwe Ligges : > > > Dieter Menne wrote: >> >>   alice.it> writes: >> >>> I am looking for a package to perform harmonic analysis with the goal of >>> estimating the period of the >>> dominant high frequency component in some mono-channel signals. >> >

Re: [R] Multiple ANOVA tests

2009-05-27 Thread Mike Lawrence
you could use ldply from the plyr package: p = ldply(q,function(x){x$P}) Without you data I can't confirm that works, but something like that should do it On Wed, May 27, 2009 at 9:23 AM, Imri wrote: > > Thanks for the answer!!! > I Know how to extract the Pr(>F) value from single ANOVA table,

Re: [R] r-plot

2009-05-27 Thread Jim Lemon
durden10 wrote: Dear R-community I have a grueling problem which appears to be impossible to solve: I want to make a simple plot, here is my code: http://gist.github.com/118550 Unfortunately, the annotation of both the x- and y-axis are not correct, as you can see in the following picture: http

  1   2   >