[R] numerical summaries across variables.

2009-09-01 Thread rajclinasia
Hi Every one, I have a dataframe class with name, sex, age, height, Weight. if i caluclate summary statistics with the below code numSummary(class[,c(Height, Weight)], groups=class$Name, statistics=c(mean, sd, quantiles), quantiles=c(0, .25,.5,.75,1)) iam getting output like this Variable:

Re: [R] numerical summaries across variables.

2009-09-01 Thread milton ruser
Hi here, may be you can play with reshape, or may be aggregate and reshape... good luck milton On Tue, Sep 1, 2009 at 2:17 AM, rajclinasia r...@clinasia.com wrote: Hi Every one, I have a dataframe class with name, sex, age, height, Weight. if i caluclate summary statistics with the below

[R] decimal sign

2009-09-01 Thread Alexandros Droseltis
Hello! Is it possible to change the decimal sign in the histogram created by hist() from dot to comma? Thanks for any help! Alexandros __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] permutation and reshuffling

2009-09-01 Thread Yonatan Nissenbaum
Hi, I'm looking for an efficient code that will enable me to reshuffle data (phenotype) for certain number of individuals and creating a loop that will randomly simulate it for 1 times *(permutation)*. I also need to find how I keep the information (p value for each SNP) gathered for all

[R] Function for all 2^N subsets of N

2009-09-01 Thread Ted Harding
Greetings all! I have been searching the Site for a function, say subsets, such that for instance subsets(10) would return a (say) matrix of indices to the 2^10 subsets of N items -- perhaps in the form of 2^10 rows each of which is 10 entries each either TRUE or FALSE. Or 1 or 0. Or ... I

Re: [R] Function for all 2^N subsets of N

2009-09-01 Thread Gerrit Eichner
Maybe expand.grid( rep( list( 0:1), 10)) does what you want. Best regards -- Gerrit - AOR Dr. Gerrit Eichner Mathematical Institute, Room 305 E gerrit.eich...@math.uni-giessen.de Justus-Liebig-University

[R] data frame

2009-09-01 Thread Tammy Ma
HI, R user, I generate the vectors with the same length. I want to put each vector into each column of data frame. Why it doesnt work`? rm-data.frame() for(a in 1:6){ rm[,a]-getmeasure(p1,a,speech) } thanks a lot Tammy _

Re: [R] Function for all 2^N subsets of N

2009-09-01 Thread Ted Harding
On 01-Sep-09 08:33:41, Gerrit Eichner wrote: Maybe expand.grid( rep( list( 0:1), 10)) does what you want. Best regards -- Gerrit Thanks! That does seem to do the job. I hadn't thought of expand.grid(). Ted. On Tue, 1 Sep 2009, ted.hard...@manchester.ac.uk wrote: Greetings all!

Re: [R] Google's R Style Guide

2009-09-01 Thread Corrado
Thanks Duncan, Spencer, To clarify, the situation is: 1) I have no reasons to choose S3 on S4 or vice versa, or any other coding convention 2) Our group has not done any OO developing in R and I would be the first, so I can set up the standards 3) I am starting from scratch with a new package,

[R] List of tags in roxygen and use for S4 classes?

2009-09-01 Thread Rainer M Krug
Hi is there a list of all roxygen tags which are available? I couldn't find them. I am asking specifically towards the use of roxygen in documenting S4 classes - is that implemented yet (i am using roxygen 0.1 from CRAN at the moment)? Thanks Rainer -- Rainer M. Krug, Centre of Excellence

Re: [R] Offtopic, HT vs. HH in coin flips

2009-09-01 Thread Ted Harding
On 31-Aug-09 19:16:33, Erik Iverson wrote: Dear R-help, Could someone please try to explain this paradox to me? What is more likely to show up first in a string of coin tosses, Heads then Tails, or Heads then Heads? ##generate 2500 strings of random coin flips ht - replicate(2500,

Re: [R] Google style

2009-09-01 Thread Jim Lemon
Duncan Murdoch wrote: On 8/31/2009 11:50 AM, Mark Knecht wrote: On Mon, Aug 31, 2009 at 6:36 AM, Terry Therneauthern...@mayo.edu wrote: SNIP The authors borrowed so much else from C, the semicolon would have been good too. Something I have thought myself. I know real R coders will

[R] Odp: data frame

2009-09-01 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 01.09.2009 10:39:42: HI, R user, I generate the vectors with the same length. I want to put each vector into each column of data frame. Why it doesnt work`? rm-data.frame() for(a in 1:6){ rm[,a]-getmeasure(p1,a,speech) } Well,

Re: [R] numerical summaries across variables.

2009-09-01 Thread Jim Lemon
rajclinasia wrote: Hi Every one, I have a dataframe class with name, sex, age, height, Weight. if i caluclate summary statistics with the below code numSummary(class[,c(Height, Weight)], groups=class$Name, statistics=c(mean, sd, quantiles), quantiles=c(0, .25,.5,.75,1)) iam getting output

Re: [R] Google's R Style Guide

2009-09-01 Thread Duncan Murdoch
Corrado wrote: Thanks Duncan, Spencer, To clarify, the situation is: 1) I have no reasons to choose S3 on S4 or vice versa, or any other coding convention 2) Our group has not done any OO developing in R and I would be the first, so I can set up the standards 3) I am starting from scratch

Re: [R] Google style

2009-09-01 Thread Duncan Murdoch
Jim Lemon wrote: Duncan Murdoch wrote: On 8/31/2009 11:50 AM, Mark Knecht wrote: On Mon, Aug 31, 2009 at 6:36 AM, Terry Therneauthern...@mayo.edu wrote: SNIP The authors borrowed so much else from C, the semicolon would have been good too. Something I have thought

Re: [R] Google style

2009-09-01 Thread Ted Harding
On 01-Sep-09 10:25:53, Duncan Murdoch wrote: Jim Lemon wrote: Duncan Murdoch wrote: On 8/31/2009 11:50 AM, Mark Knecht wrote: On Mon, Aug 31, 2009 at 6:36 AM, Terry Therneauthern...@mayo.edu wrote: SNIP The authors borrowed so much else from C, the semicolon would have been good too.

[R] Article on teaching R

2009-09-01 Thread Stephen Eglen
I've written a short article on my experiences with teaching R to computational biology graduate students: http://www.ploscompbiol.org/doi/pcbi.1000482 My lecture notes are available as supplementary material, along with the beamer/latex sources (from my web page:

Re: [R] decimal sign

2009-09-01 Thread David Winsemius
On Sep 1, 2009, at 3:25 AM, Alexandros Droseltis wrote: Hello! Is it possible to change the decimal sign in the histogram created by hist() from dot to comma? ?options options(OutDec = ,) Seems to work as described, at least with hist. -- David Winsemius, MD Heritage Laboratories West

[R] Computer Modern and Sweave

2009-09-01 Thread Bert Stumm
Hello, I have a small but nasty problem with the Computer Modern fonts in connection with Sweave. Instead of giving my own code, it's probably better to look at a well established example. There is a nice introduction to using Sweave at Paul Murrell's website which can be found at:

Re: [R] Google style

2009-09-01 Thread Duncan Murdoch
On 9/1/2009 6:37 AM, (Ted Harding) wrote: On 01-Sep-09 10:25:53, Duncan Murdoch wrote: Jim Lemon wrote: Duncan Murdoch wrote: On 8/31/2009 11:50 AM, Mark Knecht wrote: On Mon, Aug 31, 2009 at 6:36 AM, Terry Therneauthern...@mayo.edu wrote: SNIP The authors borrowed so much else from C, the

[R] R functions that count lines of a files

2009-09-01 Thread xue dong
hi, everyone, do you know if there is a R function that can count the lines of a file without open it? something like wc -l in Unix. Thanks, Xue [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] R functions that count lines of a files

2009-09-01 Thread Ben Bolker
length(count.fields(foo.txt)) ? xue dong wrote: hi, everyone, do you know if there is a R function that can count the lines of a file without open it? something like wc -l in Unix. Thanks, Xue [[alternative HTML version deleted]]

Re: [R] Function for all 2^N subsets of N

2009-09-01 Thread Terry Therneau
My first thought was the odometer() function, which is often useful for tasks like this. To my surprise it is not a part of the current R. I wonder why? It shouldn't be an Splus copyright issue as this was a part of my original S distribution (before Splus even existed), and used in an

[R] Syntax for crossed random effects in nlme

2009-09-01 Thread bamsel
Hello R users, I've read the posts on this topic, and had a look at the R documentation for nlme, but I can't seem to make this work. I'd like to be able to fit a mixed effects model with crossed random effects, but also be able to specify the covariance matrix structure for the residuals.

Re: [R] Google's R Style Guide

2009-09-01 Thread Martin Morgan
Corrado wrote: Thanks Duncan, Spencer, To clarify, the situation is: 1) I have no reasons to choose S3 on S4 or vice versa, or any other coding convention 2) Our group has not done any OO developing in R and I would be the first, so I can set up the standards 3) I am starting from

Re: [R] R2 for SAR and validation

2009-09-01 Thread Roger Bivand
Did you read the posting guide? Your posting is not comprehensible to most of the readers of this list, and you have not explained whether this has anything to do with R, or any of its contributed packages; there are no clues in included code or code snippets illustrating the problem. Your TLA is

Re: [R] SVM coefficients

2009-09-01 Thread marlene marchena
Hi, A long time I have some problems to run a SVM - regression. Here an example with the Ozone data that represents very well my own data. data(Ozone, package = mlbench) #I cut the three first variables and splite the data in two parts Ozone- na.omit(Ozone[, -(1:3)]) index -

Re: [R] Google's R Style Guide

2009-09-01 Thread Duncan Murdoch
On 9/1/2009 8:58 AM, Martin Morgan wrote: Corrado wrote: Thanks Duncan, Spencer, To clarify, the situation is: 1) I have no reasons to choose S3 on S4 or vice versa, or any other coding convention 2) Our group has not done any OO developing in R and I would be the first, so I can set up the

Re: [R] interactions and stall or memory shortage

2009-09-01 Thread Ben Bolker
The short answer is that you're trying to make a categorical interaction out of continuous variables, so that the resulting factors i2 and i3 have 1050 and 7200 levels respectively. (Note to people trying to reproduce this example: you'll need library(emdbook); library(bbmle); data(Lily_sum)

Re: [R] Google's R Style Guide

2009-09-01 Thread Gabor Grothendieck
On Tue, Sep 1, 2009 at 8:58 AM, Martin Morganmtmor...@fhcrc.org wrote: It seems relevant to compare S3 and S4 code for doing S3-style programming, leaving more 'advanced' S4 for another day. In S3 I might define a simple class and method as makeS3Foo -    function(x=numeric(), y=numeric())

[R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Corrado
Dear friends, what is this error message in gam I cannot understand what it means is it a bug? gam_bray_scot24_pc_0505gam(bray~s(PC1,PC2,PC3,PC4,PC5, PC1.1,PC2.1,PC3.1,PC4.1,PC5.1),data=dist_scot24_vector_with_climate) Error in if (length(data) != vl) { : missing value where

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread David Winsemius
On Sep 1, 2009, at 9:51 AM, Corrado wrote: Dear friends, what is this error message in gam I cannot understand what it means is it a bug? gam_bray_scot24_pc_0505gam(bray~s(PC1,PC2,PC3,PC4,PC5, PC1.1,PC2.1,PC3.1,PC4.1,PC5.1),data=dist_scot24_vector_with_climate) If the code was

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Corrado
Nope Of course, it was just a copy and paste problem On Tuesday 01 September 2009 15:00:34 David Winsemius wrote: On Sep 1, 2009, at 9:51 AM, Corrado wrote: Dear friends, what is this error message in gam I cannot understand what it means is it a bug?

Re: [R] Google's R Style Guide (has become S3 vs S4, in part)

2009-09-01 Thread Bryan Hanson
Looks like the discussion is no longer about R Style, but S3 vs S4? To that end, I asked more or less the same question a few weeks ago, arising from the much the same motivations. The discussion was helpful, here's the link:

Re: [R] Strange error returned or bug in gam in mgcv???? - additional information

2009-09-01 Thread Corrado
Here I pasted the code from when I opened the R shell, so that it possible to see what is going on: http://scsys.co.uk:8002/33309?hl=onsubmit=Format+it! Thanks in advance -- Corrado Topi Global Climate Change Biodiversity Indicators Area 18,Department of Biology University of York, York,

Re: [R] SVM coefficients

2009-09-01 Thread Steve Lianoglou
Hi Marlene, I'm going to cut out much of your post and just cut to the chase: On Sep 1, 2009, at 9:03 AM, marlene marchena wrote: Looking only to prediction purpose the scale model is good but I’m mainly interested in w. Is it possible to improve this model to get lower values to w?

Re: [R] data frame

2009-09-01 Thread John Kane
Well the data frame has dimensions 0,0, to start with. Try dim(rm) What is getmeasure and what is it supposed to do? # btw rm is NOT a good name since it also is a reserved word in R. It removes objects. To create a data.frame of your six vectors why not just say mydata - data.frame(V1,

Re: [R] Plot several graphs in the same window

2009-09-01 Thread swertie
Thank you very much it works well. Henrique Dallazuanna wrote: Try this: par(mfrow = c(8,5), mar = c(1, 1, 1, 1)) replicate(40, plot(10)) On Mon, Aug 31, 2009 at 4:39 PM, swertie v_coudr...@voila.fr wrote: Hello, I would like to plot a large number of graphs (43) in a same

[R] Exclude 0 values from plot

2009-09-01 Thread swertie
Hello, I have a matrix of species abundance with a lot of 0 values. I would like to plot the species abundance vs date, but I don't want that the 0 values appear as points on my graph. Do you know how I could represent only non-0 values? Thank you very much -- View this message in context:

Re: [R] data frame

2009-09-01 Thread Wolfgang Raffelsberger
Try doing somthing like this : #your vector1 2 vect1 - 2:5 vect2 - c(3,1,6,4) # put both vectors in data.frame combVect - data.frame(vect1=vect1, vect2=vect2) Note : 1) I suggest to avoid naming objects with names of already existing functions like rm 2) In R it is usually helpful to see

[R] Mantel test least square line

2009-09-01 Thread swertie
Hello, I performed a Mantel test and plotted communitiy similarities. I would like to add a least square line. I thought about using abline taking as slope the r-statistic of the Mantel test and calculating the y-intercept analytically. Is this method correct? Is there any function for this

[R] Function to find angle between coordinates?

2009-09-01 Thread clair.crossup...@googlemail.com
Dear all, I was doing some self study and was wondering if a function already exists which allows one to determine the angle between points. e.g. given the following (x,y) coordinates input: (0,1); (0,0); (1,0) would result in: output: 90 degrees Best regards C.C.

Re: [R] Exclude 0 values from plot

2009-09-01 Thread suzylee
test[test==0]-NA see previous post: http://www.nabble.com/Replacing-0s-with-NA-td23995885.html#a23996183 swertie wrote: Hello, I have a matrix of species abundance with a lot of 0 values. I would like to plot the species abundance vs date, but I don't want that the 0 values appear as

Re: [R] permutation and reshuffling

2009-09-01 Thread Greg Snow
Look at ?sample for how to shuffle/permute a single vector (or rows of a data frame/matrix) and ?replicate for a way to do it a bunch of times and return the results in a nice form. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] Function to find angle between coordinates?

2009-09-01 Thread Gabor Grothendieck
That is if they have length 1 as is the case here. Normalize them to length 1, if not. On Tue, Sep 1, 2009 at 11:06 AM, Gabor Grothendieckggrothendi...@gmail.com wrote: Since the inner product of two vectors if the cos of the angle between them: A - c(0,1); O - c(0,0); B - c(1,0) acos((A-O)

[R] Best option for exporting data frame to SPSS?

2009-09-01 Thread Fredrik Karlsson
Dear list, I am leaving my old position and now need to convert my R data frames into a format that can be used by an SPSS user replacing me, without running into conversion problems. The data set consists of strings in UTF8 encoding and values in double precision floats. The data set is not

Re: [R] Google's R Style Guide (has become S3 vs S4, in part)

2009-09-01 Thread spencerg
Bryan Hanson wrote: Looks like the discussion is no longer about R Style, but S3 vs S4? To that end, I asked more or less the same question a few weeks ago, arising from the much the same motivations. The discussion was helpful, here's the link:

[R] Re gression - cluster option in STATA

2009-09-01 Thread Sunita22
Hello In STATA there is command which has regression with clustering option. Can anyone tell me what is the command for the same in R for example in STATA its regress Height Weight, cluster(id) Thanks in Advance Regards Sunita -- View this message in context:

Re: [R] Function to find angle between coordinates?

2009-09-01 Thread Erik Iverson
?atan2 is a possible starting point. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of clair.crossup...@googlemail.com Sent: Tuesday, September 01, 2009 8:09 AM To: r-help@r-project.org Subject: [R] Function to find angle between

Re: [R] ggplot2: geom_smooth and legend

2009-09-01 Thread Benoit Boulinguiez
Hi! simple word thank you Hadley! an answer bringing a new question... is that possible to mix the colour and linetype representation with geom_smooth()? I tried the following code, though it hasn't worked. I have three different datasets due to non even x-axis (Temp) values I guess I should

Re: [R] Function to find angle between coordinates?

2009-09-01 Thread Gabor Grothendieck
Since the inner product of two vectors if the cos of the angle between them: A - c(0,1); O - c(0,0); B - c(1,0) acos((A-O) %*% (B-O)) * 180 / pi [,1] [1,] 90 On Tue, Sep 1, 2009 at 9:08 AM, clair.crossup...@googlemail.comclair.crossup...@googlemail.com wrote: Dear all, I was doing

Re: [R] Google's R Style Guide

2009-09-01 Thread Vitalie S.
On Tue, 01 Sep 2009 10:47:36 +0200, Corrado ct...@york.ac.uk wrote: Thanks Duncan, Spencer, To clarify, the situation is: 1) I have no reasons to choose S3 on S4 or vice versa, or any other coding convention 2) Our group has not done any OO developing in R and I would be the first, so I

Re: [R] Re gression - cluster option in STATA

2009-09-01 Thread Bert Gunter
A guess, as I don't know STATA: ?lme (library(nlme) first) (also perhaps anova with an Error term -- ?anova) But: R is not STATA R is not SAS R is not SPSS ... R is R So do not expect the same paradigms to hold; but because R IS R, one can always program ways to make them hold. Bert Gunter

Re: [R] Google's R Style Guide

2009-09-01 Thread Henrik Bengtsson
On Tue, Sep 1, 2009 at 6:29 AM, Duncan Murdochmurd...@stats.uwo.ca wrote: On 9/1/2009 8:58 AM, Martin Morgan wrote: Corrado wrote: Thanks Duncan, Spencer, To clarify, the situation is: 1) I have no reasons to choose S3 on S4 or vice versa, or any other coding convention 2) Our group has

Re: [R] ggplot2: geom_smooth and legend

2009-09-01 Thread Benoit Boulinguiez
I cleared out the data frame, I have now one data frame with all the values in as a function of the experimental condition. + successfully mix the linestyle and colour_hue representation of the geom_smooth though it doesn't look good NEW CODE

[R] Package NP; npregbw; selective bandwidth selection

2009-09-01 Thread otto kässi
Dear R-users, I am fitting a kernel regression model of the form y ~ x1 + factor(x2) + factor(x3) and am using the function npregbw in the np-package to find the optimal bandwidths. My dataset is relatively large and the optimization takes quite long. When testing different specifications I

[R] Simple question about error on CSV import

2009-09-01 Thread esawdust
I have a substantial CSV to import but can't seem to import even the simplest CSV. I'm running the latest stable REvolution R on OS X if that is pertinent. Here's the contents of a simple test2.csv CSV file: #,Status,Project 5842,New,Test snortalerts = read.table(

[R] X11 plot window sizes

2009-09-01 Thread Mark Knecht
Hi, I'm not understanding how the width height parameters are supposed to work. When I execute the following 4 commands: X11() X11(width=20, height=20) X11(width=20, height=10) X11(width=40, height=40) I get the following *approximate* physical sizes on my screen: 6 x 6 8 x 8 12 x 6 8 x 8

Re: [R] Google's R Style Guide (has become S3 vs S4, in part)

2009-09-01 Thread Martin Morgan
spencerg wrote: Bryan Hanson wrote: Looks like the discussion is no longer about R Style, but S3 vs S4? yes nice topic rename! To that end, I asked more or less the same question a few weeks ago, arising from the much the same motivations. The discussion was helpful, here's the link:

Re: [R] Simple question about error on CSV import

2009-09-01 Thread esawdust
esawdust wrote: Here's the contents of a simple test2.csv CSV file: #,Status,Project 5842,New,Test snortalerts = read.table( /Users/lcox/Documents/test2.csv, header=TRUE, sep=,, row.names=#) Error in data[[rowvar]] : attempt to select less than one element Landon Figured out

[R] pls package

2009-09-01 Thread Payam Minoofar
Thank you so very much. Yes, a statistician friend expressed his certainty that NAs cannot be handled by such algorithms, and you just answered the R specific questions. I will prune the data more and feed them into pls as matrices. I am, in fact, following the examples your provide with the

Re: [R] Simple question about error on CSV import

2009-09-01 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of esawdust Sent: Tuesday, September 01, 2009 8:53 AM To: r-help@r-project.org Subject: [R] Simple question about error on CSV import I have a substantial CSV to import but

Re: [R] Simple question about error on CSV import

2009-09-01 Thread Levi Waldron
By default for read.table, comment.char = # so the first line was being treated as a comment line, and when you specified row.names=#, read.table couldn't find that column. On Tue, Sep 1, 2009 at 12:07 PM, esawdust lan...@360vl.com wrote: esawdust wrote: Here's the contents of a simple

Re: [R] Combining: R + Condor in 2009 ? (+foreach maybe?)

2009-09-01 Thread David M Smith
There's no explicit link between foreach and Condor right now (although foreach is designed to work with any backend, so someone could write one if they wanted). If you use the NetworkSpaces back end (registerDoNWS in REvolutionR Enterprise), and can access members of the Condor cluster directly,

Re: [R] Strange error returned or bug in gam in mgcv???? - yet more additional information

2009-09-01 Thread Corrado
I am using mgcv 1.4-1.1 on Fedora 9 64 bit on an Opteron server with 8Gb of RAM. On Tuesday 01 September 2009 15:19:28 Corrado wrote: Here I pasted the code from when I opened the R shell, so that it possible to see what is going on: http://scsys.co.uk:8002/33309?hl=onsubmit=Format+it!

[R] Plotting point text-labels with lattice splom

2009-09-01 Thread Jockers Matthew
I have read the thread re: Plotting text with lattice but can't seem to get from there to what I need. . . would appreciate any advice. . . I have used splom to plot data of the first three principle components from a pca analysis. Here is the code I have thus far:

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Simon Wood
The basic problem is that you have requested a 10 dimensional thin plate spline, with a basis dimension of 196830. In reality it will not be possible to compute this, even if you have more than 196830 data. In any case it would be unlikely to provide a very useful model --- the simplest

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Corrado
Dear Simon, I have stored all information at the link: http://scsys.co.uk:8002/33309?hl=onsubmit=Format+it! I have the same problem if I do s(PC1) + . + s(PC10) or s(Pc1,PC2,PC3,PC4,PC5)+s(PC6,PC7,PC8,PC9,PC10) or s(PC1,PC2,PC3,PC6,PC7,PC8) . I have renamed

Re: [R] online classes or online eduction in statistics? esp. time series analysis and cointegration?

2009-09-01 Thread Chris Bilder
Luna Laurent luna.laurent.ucb at gmail.com writes: Hi all, I am looking for low cost online education in statistics. I am thinking of taking online classes on time series analysis and cointegration, etc. Of course, if there are free video lectures, that would be great. However I

Re: [R] Function to find angle between coordinates?

2009-09-01 Thread clair.crossup...@googlemail.com
Thank you very much, these were exactly what i needed! :-) C.C. On 1 Sep, 14:08, clair.crossup...@googlemail.com clair.crossup...@googlemail.com wrote: Dear all, I was doing some self study and was wondering if a function already exists which allows one to determine the angle between

Re: [R] Exclude 0 values from plot

2009-09-01 Thread swertie
Thank you it worked well -- View this message in context: http://www.nabble.com/Exclude-0-values-from-plot-tp25235290p25244045.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Strange error returned or bug in gam in mgcv????

2009-09-01 Thread Gavin Simpson
On Tue, 2009-09-01 at 17:55 +0100, Corrado wrote: Dear Simon, I have stored all information at the link: http://scsys.co.uk:8002/33309?hl=onsubmit=Format+it! You could have included that in your mail to the list - it is just plain text after all. I have the same problem if I do

[R] Basic population dynamics

2009-09-01 Thread Frostygoat
Hello, For insect mortality data I'm trying to get an R script that will take the data from the raw form and convert it to Lx (% survival) for a number of treatments. The raw data has the number of days lived for each individual for the respective treatment. Thus, for example, when R selects

[R] cbind objects using character vectors

2009-09-01 Thread jonas garcia
Dear list, I have a character vector such vec.names- c(a, b) It happens that I have also two R objects called a and b that I would like to merge. Is it possible to do something like cbind(vec.names[1], vec.names[2]) ending up with the same result as cbind(a,b) Bellow is a reproducible

Re: [R] Basic population dynamics

2009-09-01 Thread Henrique Dallazuanna
Try ths: Alive - sum(deaths) - cumsum(deaths) On Tue, Sep 1, 2009 at 3:48 PM, Frostygoat frostyg...@gmail.com wrote: Hello, For insect mortality data I'm trying to get an R script that will take the data from the raw form and convert it to Lx (% survival) for a number of treatments. The

[R] Date format in plot

2009-09-01 Thread swertie
Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format standard in excel (f.ex. 39939 means 06.05.2009). R uses 39939 on the x axis, but I would like to have 06.05. I tried to use as.Date as suggested in some discussion

Re: [R] cbind objects using character vectors

2009-09-01 Thread Erik Iverson
Not tested: Instead of: cbind(vec.names[1], vec.names[2]) cbind(get(vec.names[1]), get(vec.names[2])) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jonas garcia Sent: Tuesday, September 01, 2009 12:53 PM To:

Re: [R] Date format in plot

2009-09-01 Thread Erik Iverson
We will need a reproducible example! Please give us R commands that display the behavior you're observing: For example, I am having trouble understanding the as.Date function. When I input 39939, I would like to get 06.05.2009, but when I try it, I get as.Date(39939) Error in

Re: [R] cbind objects using character vectors

2009-09-01 Thread Henrique Dallazuanna
Try this: sapply(vec.names, get) But for this example, you don't need for, try: dat - 1 On Tue, Sep 1, 2009 at 2:52 PM, jonas garcia garcia.jona...@googlemail.comwrote: Dear list, I have a character vector such vec.names- c(a, b) It happens that I have also two R objects called a and

Re: [R] Date format in plot

2009-09-01 Thread David Winsemius
On Sep 1, 2009, at 1:58 PM, swertie wrote: Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format standard in excel (f.ex. 39939 means 06.05.2009). R uses 39939 on the x axis, but I would like to have 06.05. I

Re: [R] GLM contrasting question

2009-09-01 Thread Ben Bolker
sodiumfish wrote: I have run a glm with a final formula of : (dependent variable = parasite load, main effects are sex, month, length and weight, with sex:month and length:weight first order interactions). I am using the summary(mod) command to give me the contrasts, which I believe

Re: [R] Simple question about error on CSV import

2009-09-01 Thread esawdust
thank you all for the quick responses and helpful explanations. I'm just getting started with R, so I'll get tripped up by some of this until I get in the groove. Thanks again, Landon -- View this message in context:

Re: [R] Date format in plot

2009-09-01 Thread David Winsemius
On Sep 1, 2009, at 3:13 PM, Erik Iverson wrote: We will need a reproducible example! Please give us R commands that display the behavior you're observing: For example, I am having trouble understanding the as.Date function. When I input 39939, I would like to get 06.05.2009, but when I

Re: [R] Date format in plot

2009-09-01 Thread Gabor Grothendieck
See R News 4/1. The article on dates there discusses how they work and discusses Excel's dates as well. On Tue, Sep 1, 2009 at 1:58 PM, swertiev_coudr...@voila.fr wrote: Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the

Re: [R] package installation error

2009-09-01 Thread Héctor Villalobos
Hi, This also happens in 2.9.1 and 2.9.2. My personal solution is to look under 'C:\Program Files\R\R-2.9.0\library' for a bizarre-named directory (starts with an 'f' and has numbers and letters mixed) , which contains the package directory (in this case 'robustbase') and move it up one level

[R] understanding the output from gls

2009-09-01 Thread Timothy_Handley
I'd like to compare two models which were fitted using gls, however I'm having trouble interpreting the results of gls. If any of you could offer me some advice, I'd greatly appreciate it. Short explanation of models: These two models have the same fixed-effects structure (two independent,

[R] Read multiple files into dataframe?

2009-09-01 Thread Douglas M. Hultstrand
Hello, I am fairly new to R programming and am stuck with the following problem. I am trying to read in multiple files (see attached file or at end of email), the files all have the same general header information and different precipitation (avgppt) and area (areasqmi) values. Some times

[R] simple 3-dimensional plots?

2009-09-01 Thread ivowel
dear R experts: I am trying to plot an empirical likelihood function in 3d. The values are not over a regular grid---I just searched the likelihood function to find the optimal value, and then computed a few values around it. (each point in the likelihood function takes a very long time to

[R] Loading file in MAC-Syntax Error

2009-09-01 Thread Awais77
Hi, If any body can help me regarding a basic problem using R? I am starting with R and I have problem in loading my file. File is on Desktop of my MAC and I use code as follows to access it /Users/username/Desktop/test.txt/ It always gives me Syntax error message. Thanks for your help --

Re: [R] Read multiple files into dataframe?

2009-09-01 Thread jim holtman
I would put the data into a 'long' instead of 'wide' format since you say you have files of different lengths. I took you data and replicated it 3 time and changed the file name for the duration: fileNames - Sys.glob('/da_zone*') # files to process result - lapply(fileNames, function(.file){

Re: [R] Loading file in MAC-Syntax Error

2009-09-01 Thread Steve Lianoglou
Hi, On Tue, Sep 1, 2009 at 4:40 PM, Awais77khan_awai...@yahoo.com wrote: Hi, If any body can help me regarding a basic problem using R? I am starting with R and I have problem in loading my file. File is on Desktop of my MAC and I use code as follows to access it

Re: [R] Loading file in MAC-Syntax Error

2009-09-01 Thread David Winsemius
On Sep 1, 2009, at 4:40 PM, Awais77 wrote: Hi, If any body can help me regarding a basic problem using R? I am starting with R and I have problem in loading my file. File is on Desktop of my MAC and I use code as follows to access it /Users/username/Desktop/test.txt/ Are you expecting R to

Re: [R] Syntax for crossed random effects in nlme

2009-09-01 Thread Kingsford Jones
Hi Ben, Pinheiro and Bates 2000 is the real documentation for nlme. See the Cell Culture Bioassay example starting on pg 163 for a demonstration of fitting crossed random effects using pdIdent and pdBlocked objects. hth, Kingsford On Tue, Sep 1, 2009 at 6:44 AM, bamselbenam...@gmail.com wrote:

Re: [R] Loading file in MAC-Syntax Error

2009-09-01 Thread Awais77
Thanks for useful replies. It is working now. I was typing only read.table(/Users/username/Desktop/test.txt/) without surrounding the filename with quotes. It works when i use it as read.table('/Users/khan_awais77/Desktop/test2.txt'). Cheers Awais77 wrote: Hi, If any body can help me

[R] how to merge the fitted values from a linear model?

2009-09-01 Thread kayj
Hi All, I would like to run a linear model where the response is the duration of relief in days and the regressor is the drug dosage in mg. Then I would like compute the predicted values of the duration of relief from the model and merge it into the original data. I am not sure how the merge

[R] matrix manipulation problem

2009-09-01 Thread Gregory Gentlemen
Dear fellow R-users, Say we have a matrix x, defined as follows set.seed(50) x - matrix(rbinom(100*5,1, p=0.75),nrow=100, ncol=5) Now the interpretation of x is that each for of x is actually a sequence of length 5, and i would like to transform x in such a way that I can describe the

[R] read and sac files from windows 07

2009-09-01 Thread joel ulises sevilla
Dear friends maybe someone can help this freshman at R, by tell step by step how can I read files from windows 2003-2007 to Rgui, I had tried all, no see solution?? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Simple question about data.frame reduction

2009-09-01 Thread Ronaldo Reis Júnior
Hi, this is a simple question I have this data.frame: test - data.frame(var1=c(1,1,1,1,1,1),var2=c(a,a,b,c,d,e),var3=c(a1,a1,b1,a1,c1,d1)) test var1 var2 var3 11a a1 21a a1 31b b1 41c a1 51d c1 61e d1 Then I need to calculate the

Re: [R] Simple question about data.frame reduction

2009-09-01 Thread Jorge Ivan Velez
Dear Ronaldo, You were almost there! Here is a suggestion: with(test, tapply(var3, var2, length)) # a b c d e # 2 1 1 1 1 HTH, Jorge 2009/9/1 Ronaldo Reis Júnior Hi, this is a simple question I have this data.frame: test -

  1   2   >