[R] Grid lines

2009-07-29 Thread Chris Li
Hi everyone. I am new to R. It will be greatly appreciated if someone can help me with the following questions. Here's the graph I have just produced. http://www.nabble.com/file/p24732839/calibration.jpeg (1) How can I put the legend on top of the grid lines? (2) How can I match the grid lin

Re: [R] Similar package like SEM

2009-07-29 Thread Stein, Luba (AIM SE)
Yes thank you, as far as I understood your proposal it would lead to a similar result. Is there a good package in order to do principal component analysis? Best wishes, Luba Von: Andreas Hary [mailto:andreash...@googlemail.com] Gesendet: Mittwoch, 29. Juli 20

Re: [R] regexpr virtue

2009-07-29 Thread Petr PIKAL
Many thanks to you and all others for solutions together with regular expressions insights. Petr "Chuck Taylor" napsal dne 29.07.2009 19:45:10: > Petr, > > Here is a different approach. It, in effect, works from the end of the > string backwards, rather than from the beginning of the string f

Re: [R] read/write connections

2009-07-29 Thread Prof Brian Ripley
From the help: Not all modes are applicable to all connections: for example URLs can only be opened for reading. You omitted to tell us your platform (and requests to include that and not send HTML mail are in the posting guide), and pipe() differs by platform. But AFAIR pipe() is

Re: [R] Function to standardize matriz?

2009-07-29 Thread Jorge Ivan Velez
Dear Samanta, Take a look at ?scale. HTH, Jorge On Thu, Jul 30, 2009 at 12:52 AM, Sam wrote: > Hi, > this is probably a very basic question but I'm just learning R and i > cannot find a function to standardize a data matrix.. > I'll be grateful for any tips or help you can provide me. > > T

Re: [R] Function to standardize matriz?

2009-07-29 Thread Linlin Yan
Did you mean this: > m <- matrix(1:12, 3, 4) > m / max(m) [,1] [,2] [,3] [,4] [1,] 0.0833 0.333 0.583 0.833 [2,] 0.1667 0.417 0.667 0.917 [3,] 0.2500 0.500 0.750 1.000 On Thu, Jul 30, 2009 at 12:52 PM, Sam wrote: > Hi, > th

Re: [R] Function to standardize matriz?

2009-07-29 Thread Bill.Venables
scale? This transforms the columns of a matrix to z-scores. That's one kind of standardisation. Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Sam Sent: Thursday, 30

[R] Function to standardize matriz?

2009-07-29 Thread Sam
Hi, this is probably a very basic question but I'm just learning R and i cannot find a function to standardize a data matrix.. I'll be grateful for any tips or help you can provide me. Thank you very much! __ R-help@r-project.org mailing list https://s

Re: [R] z[i,j] = x[i,j] * y(i+j) ?

2009-07-29 Thread glen_b
Gabor Grothendieck wrote: > > Try this: > > z <- x * y[row(x) + col(x)] > Thanks! yes, that's the ticket. In testing out your solution, I noticed I described my problem wrongly. Apologies to anyone I confused. So a clarification for anyone trying to follow this: The index for y should h

Re: [R] z[i,j] = x[i,j] * y(i+j) ?

2009-07-29 Thread Bill.Venables
I take it you mean z[i,j] = x[i,j]*y[i+j-1] (as you had it z[1,1] = x[1,1]*y[2], whereas your example suggests is should be y[1]) Here is a suggestion: > z <- x * y[outer(1:nrow(x), 1:ncol(x), "+")-1] > z [,1] [,2] [,3] [1,] 35.20 63.22 17.28 [2,] 50.14 64.80NA [3,] 22.68 34.98 10.

Re: [R] predict

2009-07-29 Thread Bill.Venables
Your 'newdata' is a vector. To us predict() the newdata supplied must be a data frame, with components having the same names as the predictors used in the model. If some of the variables are factors, then the corresponding factors in the newdata data frame must have the same names and the same

Re: [R] z[i,j] = x[i,j] * y(i+j) ?

2009-07-29 Thread Gabor Grothendieck
Try this: z <- x * y[row(x) + col(x)] z2 <- x for(i in 1:nr) for(j in 1:nc) z2[i,j] <- x[i,j] * y[i+j] all.equal(z, z2) # TRUE On Wed, Jul 29, 2009 at 11:56 PM, glen_b wrote: > > > For the life of me I couldn't work out what to searc > > I have an m*n numeric matrix x and a numeric vector y (

Re: [R] partially sorting?

2009-07-29 Thread Bill.Venables
> x <- + matrix(c(1239,10,10,10,10,1234,10,10,10,10,1500,11,11,11,11,1001,11,11,11,11, + + 1009,11,11,11,11,1344,12,12,12,12,1349,12,12,12,12,1458,13,13,13,13),8,5,byrow + = T) > x [,1] [,2] [,3] [,4] [,5] [1,] 1239 10 10 10 10 [2,] 1234 10 10 10 10 [3,] 1500 11

[R] z[i,j] = x[i,j] * y(i+j) ?

2009-07-29 Thread glen_b
For the life of me I couldn't work out what to searc I have an m*n numeric matrix x and a numeric vector y (of length m+n-1) How do I do a calculation like this? z[i,j] = x[i,j] * y[i+j] ? Well, one can write a pair of loops, or write a single loop within which we calculate a vector at a ti

Re: [R] Re : Wavelet Kernel

2009-07-29 Thread Steve Lianoglou
Hi, On Jul 29, 2009, at 9:38 PM, Stella Sim wrote: Dear list, I would like to fit a wavelet SVM model. Where can I find a wavelet kernel function? Thanks in advance. I reckon you might have to implement that one yourself. It seems like this MATLAB SVM toolbox has a version of them: http://

Re: [R] Tripped up by Removing Level

2009-07-29 Thread jim holtman
Try this: > bargin$stuffnew<-bargin$stuff[bargin$stuff != "very.high", drop=TRUE] > bargin$stuffnew [1] lowmiddle lowlowlowlowmiddle lowmiddle middle middle middle middle high [15] high lowmiddle middle lowhigh Levels: low middle high > On Wed, Jul 29, 2009 at

[R] Re : Wavelet Kernel

2009-07-29 Thread Stella Sim
Dear list, I would like to fit a wavelet SVM model. Where can I find a wavelet kernel function? Thanks in advance. Stella Sim DISCLAIMER:\ This email contains confidential informatio...{{dropped:11}} __ R-help@r-project.org mailing list https://stat.

Re: [R] USGS stream flow data automatic download R

2009-07-29 Thread stephen sefick
Instantaneous Data, mean flow data could be a start. That would be wonderful if you would send it to me. Stephen Sefick On Wed, Jul 29, 2009 at 8:20 PM, wrote: > Stephen, > > I don't have anything or know of anything in R to do this. But, we download > USGS streamflow data routinely. I have a

Re: [R] USGS stream flow data automatic download R

2009-07-29 Thread Thomas . Adams
Stephen, I don't have anything or know of anything in R to do this. But, we download USGS streamflow data routinely. I have a Perl script that will reformat the downloaded data into a R-importable format (basically two columns date/time flow value). Are you interested in mean daily or instantan

[R] automatic download of USGS stream gauging data with R

2009-07-29 Thread stephen sefick
I don't even know if this is the right place to ask this question. I would like to download USGS stream gauging data for a couple of gauges on a daily basis- save the files to .csv files and append the nest days time series to this. Is there a way to do this automatically in R? thanks, -- Steph

[R] USGS stream flow data automatic download R

2009-07-29 Thread stephen sefick
I don't even know if this is the right place to ask this question. I would like to download USGS stream gauging data for a couple of gauges on a daily basis- save the files to .csv files and append the nest days time series to this. Is there a way to do this automatically in R? thanks, -- Steph

[R] read/write connections

2009-07-29 Thread Markus Loecher
Dear fellow R users, I would very much like to see an example of read/write connection (open = "r+" ) for e.g. pipe() or any other R connection. I have a standalone program which accepts input from stdin, performs some processing and returns the results on stdout. Is it possible at all to open a co

[R] Tripped up by Removing Level

2009-07-29 Thread Jason Rupert
Code is provided below. I was trying to follow the example at the following website: http://www.ats.ucla.edu/stat/R/modules/factor_variables.htm Only difference is that I am working with trying to remove a level from a dataframe. In the example below, notice that "very.high" is still a level in

[R] Transparency and pyramid.plot

2009-07-29 Thread ws
Hi all Another question related to my earlier -- how might I get transparency to work with pyramid.plot in library(plotrix)? I can't figure it out, and the help page says it is there but doesn't give an example. Thanks! __ R-help@r-project.org mail

Re: [R] Superscripts and rounding

2009-07-29 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
> > library(RODBC) > library(HYDAT) > You will need to install HYDAT (the zip file) from > http://www.geog.ubc.ca/~rdmoore/Rcode.htm > > Below is my current code - which works. The [[]] is the way i am accessing > the columns from the data frame. > > thanks again for all your help > > # load HY

[R] pyramid.plot: x-axis scale

2009-07-29 Thread ws
Hi R-ers Does anyone know how if there is a way to force pyramid plot where you determine the bottom axis range? I want to compare many different pyramids, so I am hoping to force the bottom axis range from 0% to 10%. Here is the code so far, if it matters: mk.pyr = function(data, pumas=NULL,

Re: [R] Combining two dataframes and specifying tolerance levels

2009-07-29 Thread Mehdi Khan
I do not know if this message got through or not, but please disregard it! Thanks! On Wed, Jul 29, 2009 at 2:57 PM, Mehdi Khan wrote: > Hello everyone, > > I have two data frames. One is a vector about 780 rows long consisting of > lat long data of 780 station locations. The other table was pr

[R] Determination of lag value for Box.test

2009-07-29 Thread m.gharbi
Hi, I saw that tsdiag function doesn't provide a correct result for Ljung-Box test. I want to use Box.test function for this, but I don't know how to determine lag parameter for this function. For fitdf, as I'm using a SARIMA model (0,1,1)(0,1,1)12, I decided to set it to 2. Can you confirm me

[R] Problem with contrast

2009-07-29 Thread Serguei Kaniovski
Hello All, I am trying to estimate a generalized linear model using a single dummy variable (bilat). I want to use contr.sum, in which (please correct me if I am wrong) the implicit coefficient on the contrast equals the negative of the sum of all estimated coefficients. I cannot get the contra

Re: [R] gbm package: relationship between interaction.depth and number of features?

2009-07-29 Thread Boris Yangel
Hello. I'm currently stuck with the same "what does interaction.depth really mean" stuff. Did you find out what the right answer is? Best regards, Boris Yangel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list h

[R] re siduals in arima

2009-07-29 Thread m.gharbi
Hi, I'm working on a multivariate ARIMA model. I have 2 time series and found for each an ARIMA model I'd like to know how are calculated the residuals of my arima model using residuals() function in R ? Is it as I think predicted values (from ARIMA model) - observed values ? Is it relevant to

[R] Combining two dataframes and specifying tolerance levels

2009-07-29 Thread Mehdi Khan
Hello everyone, I have two data frames. One is a vector about 780 rows long consisting of lat long data of 780 station locations. The other table was previously a shape file which I have converted into a data frame object of lat long coordinates and attribute data. What I want to do is combine

Re: [R] Side by Side Barplot Newbie Question

2009-07-29 Thread John Kane
I think your data is set up incorrectly. With your data below as "xx" try this. # Dotcharts are often better than barplots so you might want to # try this library(reshape) mm <- melt(xx, id=c(1:2)); mm bb <- as.matrix(cast(mm,

[R] Which CRAN mirror is the fastest ?

2009-07-29 Thread Tal Galili
Hi dear R help group. I was wondering how can I find out which CRAN mirror would be the fastest for me (I leave in Israel and therefore don't have a CRAN mirror for our country to go to by default) Thanks, Tal -- -- My contact information: Ta

[R] Object equality for S4 objects

2009-07-29 Thread Stavros Macrakis
To test two environments for object equality (Lisp EQ), I can use 'identity': > e1 <- environment(local(function()x)) > e2 <- environment(local(function()x)) > identical(e1,e2) # compares object identity [1] FALSE > identical(as.list(e1),as.list(e2))# compares values as na

Re: [R] xtable formatting: RED for negative numbers?

2009-07-29 Thread cameron.bracken
Ken-JP wrote: > > Is there a way to modify this code to generate RED numbers inside xtable > for > negative results in x.ts? > This post would probably have been better for R-help. Anyway, you can do it easily by modifying print.xtable.R in the xtable package. If it is easier, make a copy o

Re: [R] Newbie in R: Reading .txt files and storing the 'numbers' in a vector

2009-07-29 Thread Patrick Connolly
On Wed, 29-Jul-2009 at 10:29AM +0200, Patrick Schorderet wrote: > > Hello everybody, > > I'm a newbie in R and just went through an introduction class recently. Did you get the distinction between a vector and a dataframe? > > Here's my problem. > I have 2 text files (.txt) with plain numbers

Re: [R] Transporting data in different R windows

2009-07-29 Thread Patrick Connolly
On Wed, 29-Jul-2009 at 06:15AM -0700, Bogaso wrote: |> |> Hi, |> |> I am working with multiple R-windows opened and would like to |> transport some variables from one to another. Is there any direct |> way to do this without saving them in hard-disk? With so little information given, I can't t

[R] R programming class - Boston USA area - or online

2009-07-29 Thread Boucher, Mike
Hello - I am just beginning to look into R Programming and have written some basic R code. Do you know of anyone in the Boston-USA area that might be offering any courses on R Programming? Or possibly a course online? Many thanks Mike Boucher Michael Boucher | Quantitative Analyst -

Re: [R] Package with function for plots with embedded hyperlinks?

2009-07-29 Thread John Kane
Don't leave us hanging! What is it? --- On Wed, 7/29/09, Don MacQueen wrote: > From: Don MacQueen > Subject: Re: [R] Package with function for plots with embedded hyperlinks? > To: r-help@r-project.org > Received: Wednesday, July 29, 2009, 11:43 AM > Never mind, just after I sent this I > fi

Re: [R] Superscripts and rounding

2009-07-29 Thread ehux
library(RODBC) library(HYDAT) You will need to install HYDAT (the zip file) from http://www.geog.ubc.ca/~rdmoore/Rcode.htm Below is my current code - which works. The [[]] is the way i am accessing the columns from the data frame. thanks again for all your help # load HYDAT data par(mfrow

Re: [R] Standard error of Median in MASS library

2009-07-29 Thread Greg Snow
Well the MASS package is support for a book, the details for most of functions in the package are detailed in the book, so if you really want to know, either look at the code, or read the book. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org

Re: [R] Side by Side Barplot Newbie Question

2009-07-29 Thread Tal Galili
Hi Brindha Does this answer your question: http://onertipaday.blogspot.com/2007/05/make-many-barplot-into-one-plot.html ? Cheers, Tal On Wed, Jul 29, 2009 at 8:48 PM, Brindha Selvaraj wrote: > Hi, > > Many apologies for sending this twice. I accidentally hit the send button > before I finishe

Re: [R] Transporting data in different R windows

2009-07-29 Thread Tal Galili
In the useR 2009 conference there was a lecture on how to use bigmemory to create and object (a matrix I guess) - and then be able to access it from two R sessions. Consider searching for that :) Tal On Wed, Jul 29, 2009 at 4:15 PM, Bogaso wrote: > > Hi, > > I am working with multiple R-

Re: [R] how to skip a numeric column for averaging other columns?

2009-07-29 Thread John Kane
log.raw.data <- log(raw.data[,2:10]) I think but I don't understand the "Data has the first row for variable name" comment --- On Wed, 7/29/09, sandsky wrote: > From: sandsky > Subject: [R] how to skip a numeric column for averaging other columns? > To: r-help@r-project.org > Received: We

Re: [R] how to skip a numeric column for averaging other columns?

2009-07-29 Thread Steve Lianoglou
Hi, On Jul 29, 2009, at 3:02 PM, sandsky wrote: Data has the first row for variable name and the first column for sample name. I want to take "Log" for all data, but how to compute without the first column for sample name. That is, column 1: sample ID column 2-10: data I think one thi

[R] Standard error of Median in MASS library

2009-07-29 Thread Lisa Wang
Dear All, I wonder which function in MASS library calculates and output the standard error of median. Thank you in advance for your help Lisa Wang Biostatistics, Princess Margaret hospital, toronto, On __ R-help@r-project.org mailing list https://st

Re: [R] Installing lme4 package in Windows Vista

2009-07-29 Thread Angela Radulescu
Thanks everyone! It works now :) Cheers, a. ONKELINX, Thierry wrote: > > Dear Angela, > > lme() is a part of the nlme package. The lme4 package has the function > lmer() which is the equivalent of lme() from nlme. Both function differ > in their capabilities. Briefly: lmer() can (easly) do

Re: [R] regexpr virtue

2009-07-29 Thread Chuck Taylor
Petr, Here is a different approach. It, in effect, works from the end of the string backwards, rather than from the beginning of the string forwards. substring(x, regexpr("[0-9]+$", x)) The regular expression "[0-9]+$" finds a string of 1 or more ("+") digits ("[0-9]") followed by the end of

Re: [R] Transporting data in different R windows

2009-07-29 Thread Bos, Roger
I wrote simple function to copy data from/to excel using the clipboard. These should also work from one window to the next: # To read from clipboard "fromExcel" <- function() {read.table("clipboard-128", header=TRUE, sep="\t")} "toExcel" <- function(x) {write.table(x, "clipboard-128", sep="\t", ro

[R] standard error of median in MASS library

2009-07-29 Thread Lisa Wang
Hello all, I wonder which function in MASS library is calculating the standard error of median? thank you very much in advance, Lisa __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

[R] how to compute other columns without a column for sample name

2009-07-29 Thread sandsky
Data has the first row for variable name and the first column for sample name. I want to take "Log" for all data, but how to compute without the first column for sample name. > log.raw_data=log(raw_data,base=2) Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, : non-nume

[R] Side by Side Barplot newbie question

2009-07-29 Thread Brinda S
Hi, Many apologies for sending this twice. I accidentally hit the send button before I finished writing my mail. I am new to R and I hope someone can help me with my problem. I am trying to draw a side by side barplot. There is a main experiment and there are many sub experiments within

[R] Watching tune parameters for SVM?

2009-07-29 Thread Noah Silverman
Hi, I'm switch over from RapidMiner to R. (The learning curve is steep, but there is so much more I can do with R and it runs much faster overall.) In RapidMiner, I can "tune" a parameter of my svm in a nice cross validation loop. The process will print out the progress as it goes. So for

[R] Systematic resampling (in sequential Monte Carlo)

2009-07-29 Thread Giovanni Petris
Dear all, Here is a little coding problem. It falls in the category of "how can I do this efficiently?" rather than "how can I do this?" (I know how to do it inefficiently). So, if you want to take the challenge, keep reading, otherwise just skip to the next post - I won't be offended by that ;-

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Ian Chidister
Jim- That did the trick- thanks so much for taking the time to help me out. Sincerely, Ian Chidister On Wed, Jul 29, 2009 at 11:57 AM, Ian Chidister wrote: > Dear List, > > I'm an [R] novice starting analysis of an ecological dataset containing the > basal areas of different tree species in a

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread jim holtman
Or even easier: tapply(Trees$SppID, Trees$PlotID, function(x) length(unique(na.omit(x On Wed, Jul 29, 2009 at 2:13 PM, Ian Chidister wrote: > Hi All- > > Thanks for your quick responses.  I was looking for unique instances, so > Jim's and Daniel's suggestions got the job done.  Using "length

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread jim holtman
One way is to exclude the NAs from consideration by creating a new object without NAs in that column: newTrees <- Trees[!is.na(Trees$SppID),] tapply(newTrees$SppID, newTrees$PlotID, function(x) length(unique(x))) On Wed, Jul 29, 2009 at 2:13 PM, Ian Chidister wrote: > Hi All- > > Thanks for your

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Ian Chidister
Hi All- Thanks for your quick responses. I was looking for unique instances, so Jim's and Daniel's suggestions got the job done. Using "length" alone didn't discriminate between multiple occurrences of the same species and multiple species. I do have one followup question- my full data set (not

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-29 Thread Poersching
Hey, i have forgotten to generalize the code so Correl<-Correl[1:4,,,] must be Correl<-Correl[1:length(c),,,] it's because the comparison levels. I think you don't want the correlation betweeen A1, B1, D1 and A2, C1, D1 , but between A1, B1, D1 and A1, C1, D1 or between A1, B1, D1 and A1, C2, D

[R] Side by Side Barplot Newbie Question

2009-07-29 Thread Brindha Selvaraj
Hi, Many apologies for sending this twice. I accidentally hit the send button before I finished writing my mail. I am new to R and I hope someone can help me with my problem. I am trying to draw a side by side barplot. There is a main experiment and there are many sub experiments within the mai

[R] side-by-side Barplot newbie question

2009-07-29 Thread Brindha Selvaraj
Hi, I am new to R and I hope someone can help me with my problem. I am trying to draw a side by side barplot. There is a main experiment and there are many sub experiments within the main experiment. I would like to draw a bar plot showing the number of sub_experiments done for each main_exp. F

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Daniel Malter
does "length" instead of "nlevels" do what you want to do? with(Trees,tapply(SppID,PlotID,unique)) daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread jim holtman
This is probably what you want; you need to count the number of unique instances: > tapply(Trees$SppID, Trees$PlotID, function(x) length(unique(x))) BU3F10 BU3F11 BU3F12 1 2 4 > On Wed, Jul 29, 2009 at 12:57 PM, Ian Chidister wrote: > Dear List, > > I'm an [R] novice starting anal

[R] Re : vector thank you it works

2009-07-29 Thread Inchallah Yarab
I'm very impressed by the quick replies on the mailer. Thanks a lot for your > suggestions. They worked very well. De : Linlin Yan Cc : r-help@r-project.org Envoyé le : Mercredi, 29 Juillet 2009, 18h26mn 32s Objet : Re: [R] vector rep(A, each=2) On Thu, Jul

Re: [R] (senza oggetto)

2009-07-29 Thread Jorge Ivan Velez
Caro Sabrina, Take a look at ?options, especially the max.print parameter. Ciao, Jorge 2009/7/29 > Ciao, > ho aperto con R un file di classe data frame con 15000 righe e 29 colonne. > Nella console perň sono visualizzate solo la prime e l'ultima colonna e le > ultime 8000 righe circa. > E' p

Re: [R] Summarising Data for Forrest Plots

2009-07-29 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
>> What I want to do is do a forrest (forest) plot for subgroups within my >> single dataset as a test of heterogeniety. I have a dataset who received >> either full dose(FD) or reduced dose(RD) treatment, and a number of >> characteristics about those subjects: age, sex, renal function, weight,

[R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Ian Chidister
Dear List, I'm an [R] novice starting analysis of an ecological dataset containing the basal areas of different tree species in a number of research plots. Example data follow: > Trees<-data.frame(SppID=as.factor(c(rep('QUEELL',2), rep('QUEALB',3), 'CORAME', 'ACENEG', 'TILAME')), BA=c(907.9, 1104

Re: [R] Summarising Data for Forrest Plots

2009-07-29 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
> Are n.FD and n.RD the number of people who received the full/reduced dose Yes - but I don't have the data structured like that YET - thats what I want to get to because thats what forest plot seems to be wanting. > and surv.FD and surv.RD the number of people that survived? Mmm... was more thin

Re: [R] visualizing columns

2009-07-29 Thread Greg Snow
Try the View function (note capitol V), does that do what you want? -- 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 Beh

Re: [R] dot plot with several points for 2 categories

2009-07-29 Thread Steve Lianoglou
Hi, On Jul 29, 2009, at 12:11 PM, jaregi wrote: Hi Michael, Steve, and 1Rnwb, I'm very impressed by the quick replies on the mailer. Thanks a lot for your suggestions. They worked very well. In general, I have to say that I'm a bit disappointed that in R, like in Excel, one basically ne

Re: [R] Drawing lines in margins

2009-07-29 Thread Greg Snow
In addition to Benjamin's response (which is the best way that I know of), you may also want to look at the grconvertX and grconvertY functions for ways to find the coordinates in the margins to plot at. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@

Re: [R] Adding picture to graph?

2009-07-29 Thread Greg Snow
In addition to the other responses, you may want to look at the subplot function in the TeachingDemos package for a way to place the image at a location within the plot (the other answers so far use the image as a full background), see the last example on the help page for a way to use the R log

Re: [R] vector

2009-07-29 Thread Linlin Yan
rep(A, each=2) On Thu, Jul 30, 2009 at 12:15 AM, Inchallah Yarab wrote: > Hi , > > i have a vector A=(a1,a2,a3,a4) and i want to create another vector > B=(a1,a1,a2,a2,a3,a3,a4,a4) !!! > i know that it is simple but i begin with R so i nned your help!! > > thank you for your help !!! > > > >    

[R] visualizing columns

2009-07-29 Thread sabrina.michielin
hi, i've opened a file with R which data are data.frame. It has 15000 rows and 29 columns. On the console i only can see the first and the last columns and the last 8000 rows. Is it possible to visualize the entire data set? Thanks Sabrina Da: sabrina.michie...@

[R] vector

2009-07-29 Thread Inchallah Yarab
Hi , i have a vector A=(a1,a2,a3,a4) and i want to create another vector B=(a1,a1,a2,a2,a3,a3,a4,a4) !!! i know that it is simple but i begin with R so i nned your help!! thank you for your help !!! [[alternative HTML version deleted]] __

Re: [R] Add a line in a Pairs2 and mark the axis length

2009-07-29 Thread Greg Snow
I am not sure what you mean by "mark the length on each sub plot y axis", but here is an example of the other parts (and if you know how to mark the length on a single regular plot, then just add that code to the panel function): pairs2( iris[,1], iris[,2:4], panel=function(x,y,...) {

Re: [R] dot plot with several points for 2 categories

2009-07-29 Thread jaregi
Hi Michael, Steve, and 1Rnwb, I'm very impressed by the quick replies on the mailer. Thanks a lot for your suggestions. They worked very well. In general, I have to say that I'm a bit disappointed that in R, like in Excel, one basically needs to hack to get a dot blot with categories by adding

Re: [R] regexpr virtue

2009-07-29 Thread Gabor Grothendieck
dot means any character and * repeats it for as many times as possible so it replaces eveything (.*) up to the last dot (\\.) with nothing. On Wed, Jul 29, 2009 at 9:43 AM, Petr PIKAL wrote: > Thank you > > Gabor Grothendieck napsal dne 29.07.2009 > 15:20:40: > >> Here are a couple of possibiliti

Re: [R] Make my plots bigger and reduce white space around panels?

2009-07-29 Thread Greg Snow
It still was not attached, but you can reduce the white space by reducing the margins using par(mar=c(...)). If you do par(mar=c(0,0,0,0)), then there will be no space between the plots, using values larger than 0 will give space. But beware, you need to either suppress the plotting of axis la

Re: [R] (senza oggetto)

2009-07-29 Thread Uwe Ligges
Um Antwort von der R Mailinglite zu bekommen, verwenden Sie bitte eine aussagekräftige Betreff-Zeile und formulieren Sie Ihre Anfrage in *Englisch* - nachdem Sie den "posting guide" gelesen haben. MfG, Uwe Ligges sabrina.michie...@alice.it wrote: Ciao, ho aperto con R un file di classe data

Re: [R] Package with function for plots with embedded hyperlinks?

2009-07-29 Thread Don MacQueen
Never mind, just after I sent this I finally did the right search. It is RSVGTipsDevice -Don At 8:30 AM -0700 7/29/09, Don MacQueen wrote: Some years ago, if I recall correctly, I learned of a package that included a function that would write a plot to a file so that one could associate hy

[R] n-way table of aggregate statistics

2009-07-29 Thread Yoav Kessler
Hi, I'm doing my first steps in R. I wonder how can I create an n-way table of aggregate statistics, something like what aggregate.table does, but with an unlimited number of grouping factors. Thanks, Yoav Kessler __ R-help@r-project.org mailing list ht

[R] (senza oggetto)

2009-07-29 Thread sabrina.michielin
Ciao, ho aperto con R un file di classe data frame con 15000 righe e 29 colonne. Nella console però sono visualizzate solo la prime e l'ultima colonna e le ultime 8000 righe circa. E' possibile una visualizzazione completa? Grazie Sabrina [[alternative HTML version deleted]]

[R] Package with function for plots with embedded hyperlinks?

2009-07-29 Thread Don MacQueen
Some years ago, if I recall correctly, I learned of a package that included a function that would write a plot to a file so that one could associate hyperlinks with elements of the plot, such as points. Then, when the plot was displayed in a browser, one could click on (for example) a point, an

[R] visualizzazione colonne

2009-07-29 Thread sabrina.michielin
ciao, ho aperto un file in R di classe data frame di 15000 righe e 29 colonne. Nella console però sono visualizzate solo la prima e l'ultima colonna e le ultime 8000 righe circa. E' possibile una visualizzazione completa? Grazie Sabrina [[alternative HTML version deleted]] _

Re: [R] predict

2009-07-29 Thread David Winsemius
You need to create the variable names in newdata (which is generally a dataframe) that match those used in constructing fm. Surely there must be a worked example that illustrates this on the help page? On Jul 29, 2009, at 9:30 AM, serbring wrote: I have found a regression model, and i wou

Re: [R] predict

2009-07-29 Thread ONKELINX, Thierry
Newdata needs to be a dataframe with the same variable names as the explanatory variables in your models. Model <- lm(y ~ x, data = dataset) Newdata <- data.frame(x = seq(from=0.1, to=0.32,by=0.02)) Newdata$y <- predict(Model, newdata = Newdata) HTH, Thierry ---

Re: [R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-29 Thread KathyKlein
Hello, I also used the norm-package for data with missing values. Are there no possibilities to fix it (its not under GPL?), or is here anyone able to get the negotiation for the maintainership for this package? Another question: I have read, taht "mice" would be an alternative instead of using

[R] predict

2009-07-29 Thread serbring
I have found a regression model, and i would like to predict value in different points. I have tried to use predict function but it doesn't work. I have used predict function like this: newdata<-seq(from=0.1, to=0.32,by=0.02) data<-predict(fm,newdata) where fm is a regression model. The predict

Re: [R] Drawing lines in margins

2009-07-29 Thread Nutter, Benjamin
Look at the xpd option in ?par. If you set par(xpd=TRUE) you should be able to add a segment for what you want. But please let me know if someone gives you a better way to do this. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Al

Re: [R] R Packages and Permanent Datasets creation

2009-07-29 Thread Philipp Pagel
On Tue, Jul 28, 2009 at 11:13:11PM -0700, rajclinasia wrote: > Actually while opening R console and R commander we see some packages like > car and datasets. In these packages we have default datasets. > For example: "Women" and "Prestige" so on. Now we created a "Sales" dataset > importing either

Re: [R] (no subject)

2009-07-29 Thread Philipp Pagel
On Wed, Jul 29, 2009 at 03:12:02PM +0200, Øistein Harsem wrote: > HiI am contacting you regarding a problem with downloading R. I > cannot seen to manage because my computer language is in Norwegian. > DO you know if there is R that can deal with Norwegian letters? I have never seen a download to

Re: [R] R Packages and Permanent Datasets creation

2009-07-29 Thread Gavin Simpson
On Tue, 2009-07-28 at 23:13 -0700, rajclinasia wrote: > Our Query: > > Actually while opening R console and R commander we see some packages like > car and datasets. In these packages we have default datasets. > For example: "Women" and "Prestige" so on. Now we created a "Sales" dataset > import

Re: [R] Adding picture to graph?

2009-07-29 Thread David Winsemius
I'm not sure if you can consider grid graphics. If so, then Murrell has some nice worked examples in: http://www.stat.auckland.ac.nz/~paul/Talks/gddg.pdf On Jul 29, 2009, at 4:27 AM, Rainer M Krug wrote: while teaching R, the question came up if it would be possible to add a picture (saved

[R] Drawing lines in margins

2009-07-29 Thread Alan Cohen
Hi all, Quick question: What function can I use to draw a line in the margin of a plot? segments() and lines() both stop at the margin. In case the answer depends on exactly what I'm trying to do, see below. I'm using R v. 2.8.1 on Windows XP. Cheers, Alan I'm trying to make a horizontal ba

Re: [R] regexpr virtue

2009-07-29 Thread Petr PIKAL
Thank you Gabor Grothendieck napsal dne 29.07.2009 15:20:40: > Here are a couple of possibilities: > > sub(".*\\.", "", s) This seems to be the target. Can you be so kind and translate for me what it really does? ".* matches several dots? \\. what is this? I thought sub finds a match and r

Re: [R] Subtract matrices within arrays along indices

2009-07-29 Thread Etienne B. Racine
Hi Christian, Christian Langkamp wrote: > > I have the following array: 3 dimensional object, one dimension being > year. Object is 3*3*3 > > library(plyr, reshape) > # reshape won't be loaded that way, use separate library() Christian Langkamp wrote: > > a1<-rep(c(2007,2008,2009),9) > a2<-c

Re: [R] regexpr virtue

2009-07-29 Thread Petr PIKAL
Thanks If somebody does not come with more elaborated solution I will adapt yours. After strsplit I can get not only 3 but several chunks. If the last chunk is every time the one I need then sapply(strsplit(names(foto),"\\..."), length) [1] 2 6 6 6 6 5 5 6 5 3 3 3 3 3 3 3 3 3 3 4 3 3 4 4 3 3 3

Re: [R] regexpr virtue

2009-07-29 Thread Gabor Grothendieck
Here are a couple of possibilities: sub(".*\\.", "", s) library(gsubfn) strapply(s, "[0-9]*$", simplify = c) On Wed, Jul 29, 2009 at 9:10 AM, Petr PIKAL wrote: > Hi all > > I have got something like that (actually those are column names) > > [51] "X19.2.300b...80"          "X19.2.400v...80" "X

  1   2   >