[R] comparing tables from replicated data

2009-08-24 Thread Troels Ring
Dear friends, I'm examining the characteristics of two models that both fit the sodium concentration in 16 pigs quite well under treatment or control conditions. The more complicated model is by anova better than the less complicated model. To take it further I have generated replicate data us

[R] how to apply a date format for data frame

2009-08-24 Thread rajclinasia
Hi Everyone, i have a data frame like this labels starts ends priorities 1 firsttask 37987 38049 1 2 secondtask 38019 38112 2 3 thirdtask 38049 38144 3 4 fourthtask 38081 38207 4 5 fifthtask 38112 38239 5 now i want to apply a date for

Re: [R] R with MPI

2009-08-24 Thread Martin Morgan
Hi Polemon -- polemon wrote: > On Mon, Aug 24, 2009 at 2:20 PM, polemon wrote: > >> Hello, I plan to use R with my cluster with OpenMPI. >> I need the packaged 'snow' and 'Rmpi' for that, however, I get an error >> while downloading and installing them: >> When I do a: >> install.packages("R

Re: [R] Combining matrices

2009-08-24 Thread Gabor Grothendieck
My prior solution was not correct. If the idea is to combine each row of x with each row of y then convert the matrices to data frames and perform and outer join with SQL like this: library(sqldf) X <- as.data.frame(x) Y <- as.data.frame(y) as.matrix(sqldf("select * from X, Y", method = "raw"))

Re: [R] Simulating data (stupid question)

2009-08-24 Thread Liviu Andronic
Hello Your attachement didn't seem to get through. You can simulate data using rnorm() or any of the r*() functions [1]. You can also use it to add noise to a custom function that you use to generate your specific data. Liviu [1] http://www.statmethods.net/management/functions.html On 8/25/09,

[R] Fwd: Overlay on raster loses points when merging with data frame

2009-08-24 Thread Mehdi Khan
Does anyone have an idea about this, it's driving me insane! Hello everyone. I have overlayed 1611 points on top of a tif file. tifclassoverlay<-overlay(CRS11, classifiedmodrobin) overlaydf<-as.data.frame(tifclassoverlay) tifol<-remove.na.rows(overlaydf) tifol is 854 rows long. tifol has p

Re: [R] Help on comparing two matrices

2009-08-24 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Kogan > Sent: Saturday, August 22, 2009 11:45 AM > To: r-help@r-project.org > Subject: [R] Help on comparing two matrices > > Hi, > > I need to compare two matrices with

Re: [R] Removing objects from workspace

2009-08-24 Thread Ronggui Huang
It depends. If there are patterns in the names, you can make use of pattern argument of ls(). For example, > x1="a";x2="b";x3="c" > ls(pattern="x[1-2]") [1] "x1" "x2" > ls(pattern="x[^1-2]") [1] "x3" # to remove x1-x3 >rm(list=ls(pattern="x[1-2]")) More generally, if you want to remove all butx,x

[R] Removing objects from workspace

2009-08-24 Thread Steven Kang
Hi all, I am currently woking with hundreds of objects in workspace and whenever I invoke ls() to observe the names of the objects, there are too much of unnecessary variables. For example, if I only require say 3 or 4 objects from hundreds of objects in workspace, are there any methods that may

[R] allowing line wrap for long strip text in xyplot (lattice)

2009-08-24 Thread Donald Boyd
Hi. Am brand new to R and to mailing lists - have never posted anywhere before, so hope I do this right. Am using R 2.9.1 with lattice graphics (just installed, fully up to date). Am doing trellis xyplot with y (emp=employment), x (yearmo=a time measure) and conditioning variable (indf - factor d

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Ben Bolker
My two cents: this is a hard problem to do, period (not just in R). I would second the recommendation of the Dormann et al paper listed below; also see Zuur, Alain F., Elena N. Ieno, Neil J. Walker, Anatoly A. Saveliev, and Graham M. Smith. Mixed Effects Models and Extensions in Ecology with R. 1s

Re: [R] Simulating data (stupid question)

2009-08-24 Thread KABELI MEFANE
Dear All   I know that you do not have to help me but please do, i am new to R as a CPI compiler, i just need to do a sample to see which sampling method best works in different situations, therefore since this is for practice purposes nobody will finance a real project thats why i need you to h

[R] Filling in empty arrays/lists from using "paste" function

2009-08-24 Thread Steven Kang
Dear R users, I am trying to fill in arrays (5 different according to distinct "id") from objects produced from arbitrary data set below. a <- data.frame(id=rep(c("idA1","idA2","idA3","idA4","idA5"),2),pro=c("bb","uu","ee","tt","uu","gg","tt","bb","gg","ee"),sal=rpois(10,2)) idpro sa

Re: [R] help with recalling data points in a specific region of the plot

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 6:50 PM, Edward Chen wrote: Thank you so much for your reply. I apologize for not making my question clearer. The problem I have right now is not just a matrix. I have a plot in which the X and Y are both calculated by other functions before the plot. After reviewing th

Re: [R] jpeg device loop problem

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 8:19 PM, AllenL wrote: Dear R gurus, Trying to loop a graphing function and output a jpeg file each loop. It works fine for a single run (ie. not looping) but when I loop the output is nothing but white space. Here is my code, somewhat abridged: { jpeg(filename=<"na

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Manuel Morales
Hi Tim, I don't believe there is a satisfactory solution in R - at least yet - for non-normal models. Ultimately, this should be possible using lmer() but not in the near-term. One possibility is to use glmPQL as described in: Dormann, F. C., McPherson, J. M., Araújo, M. B., Bivand, R., Bolliger,

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 7:41 PM, Felix Andrews wrote: 2009/8/25 David Winsemius : On Aug 24, 2009, at 7:01 PM, Felix Andrews wrote: 2009/8/25 David Winsemius On Aug 24, 2009, at 11:00 AM, Rick wrote: I would like to plot two variables against the same abscissa values. They have different

[R] jpeg device loop problem

2009-08-24 Thread AllenL
Dear R gurus, Trying to loop a graphing function and output a jpeg file each loop. It works fine for a single run (ie. not looping) but when I loop the output is nothing but white space. Here is my code, somewhat abridged: { jpeg(filename=<"name for this loop.jpeg">) xyplot(AbvBioAnnProd~Ye

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread Felix Andrews
2009/8/25 David Winsemius : > On Aug 24, 2009, at 7:01 PM, Felix Andrews wrote: > >> 2009/8/25 David Winsemius >>> >>> On Aug 24, 2009, at 11:00 AM, Rick wrote: >>> I would like to plot two variables against the same abscissa values. They have different scales. I've found how to mak

Re: [R] adding points to a wireframe

2009-08-24 Thread jebyrnes
Hrm. I have to admit, I don't entirely understand how to use the scaling, and that seems like a lot of unneeded extra code. It is what it is, though. The documentation about scaling is somewhat obtuse. Do you have a clear explanation of what it is and how to use it in this instance? Perhaps e

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 7:01 PM, Felix Andrews wrote: 2009/8/25 David Winsemius On Aug 24, 2009, at 11:00 AM, Rick wrote: I would like to plot two variables against the same abscissa values. They have different scales. I've found how to make a second axis on the right for labeling, but not

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread Felix Andrews
2009/8/25 David Winsemius > > On Aug 24, 2009, at 11:00 AM, Rick wrote: > >> I would like to plot two variables against the same abscissa values. They >> have different scales. I've found how to make a second axis on the right >> for labeling, but not how to plot two lines at different scales. > >

Re: [R] unix like commands in R?

2009-08-24 Thread Ted Harding
On 24-Aug-09 21:56:06, zrl wrote: > Dear List: > I am trying to find a command in R which is like the unix command > "less" or "more" to show the data in a object of R. > did anyone can help me on this? > > Is there a collection of such unix-like commands in R? > > Thanks. > > -ZRL There is a p

Re: [R] How to create a random matrix

2009-08-24 Thread Rolf Turner
On 25/08/2009, at 10:17 AM, Peng Yu wrote: Hi, I did a search but I was able to find how to generate a random matrix. Can somebody let me know how to do it? Uhhh, generate some random numbers and then arrange them in a matrix? ?matrix ?runif ?rnorm ?rgamma . . . cheers,

[R] How to create a random matrix

2009-08-24 Thread Peng Yu
Hi, I did a search but I was able to find how to generate a random matrix. Can somebody let me know how to do it? Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://ww

[R] unix like commands in R?

2009-08-24 Thread zrl
Dear List: I am trying to find a command in R which is like the unix command "less" or "more" to show the data in a object of R. did anyone can help me on this? Is there a collection of such unix-like commands in R? Thanks. -ZRL [[alternative HTML version deleted]] ___

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread Rolf Turner
On 25/08/2009, at 3:00 AM, Rick wrote: First of all, thanks to everyone who answers these questions - it's most helpful. I'm new to R and despite searching have not found an example of what I want to do (there are some good beginner's guides and a lot of complex plots, but I haven't found th

Re: [R] plotting a grid with grid() ?

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 4:10 PM, John Kane wrote: I am trying to come up with a way of shading-in a grid for a simple pattern So far I can draw a square where I want but I cannot seem to draw a complete grid. I am just drawing them along the diagonal!! Clearly I am missing something simple b

Re: [R] plotting a grid with grid() ?

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 4:10 PM, John Kane wrote: I am trying to come up with a way of shading-in a grid for a simple pattern So far I can draw a square where I want but I cannot seem to draw a complete grid. I am just drawing them along the diagonal!! Clearly I am missing something simple b

Re: [R] Help on comparing two matrices

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 4:01 PM, Michael Kogan wrote: David: Well, e.g. the first row has 2 ones in your output while there were no rows with 2 ones in the original matrix. Since the row and column sums can't be changed by sorting them, the output matrix can't be equivalent to the original one

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 11:00 AM, Rick wrote: First of all, thanks to everyone who answers these questions - it's most helpful. I'm new to R and despite searching have not found an example of what I want to do (there are some good beginner's guides and a lot of complex plots, but I haven't found

[R] plotting a grid with grid() ?

2009-08-24 Thread John Kane
I am trying to come up with a way of shading-in a grid for a simple pattern So far I can draw a square where I want but I cannot seem to draw a complete grid. I am just drawing them along the diagonal!! Clearly I am missing something simple but what? Any suggestions gratefully accepted. Exam

Re: [R] Help on comparing two matrices

2009-08-24 Thread Michael Kogan
David: Well, e.g. the first row has 2 ones in your output while there were no rows with 2 ones in the original matrix. Since the row and column sums can't be changed by sorting them, the output matrix can't be equivalent to the original one. But that means nothing, maybe it's intended and just

Re: [R] Two lines, two scales, one graph

2009-08-24 Thread Patrick Connolly
On Mon, 24-Aug-2009 at 08:00AM -0700, Rick wrote: > > First of all, thanks to everyone who answers these questions - it's > most helpful. > > I'm new to R and despite searching have not found an example of what I > want to do (there are some good beginner's guides and a lot of complex > plots, but

Re: [R] create list entry from variable

2009-08-24 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of rami jiossy > Sent: Monday, August 24, 2009 12:01 PM > To: R-Help > Subject: [R] create list entry from variable > > > Hi; > > assume i<-10 > > how can i create a list having

Re: [R] create list entry from variable

2009-08-24 Thread rami jiossy
Yep; great thanks :) Date: Mon, 24 Aug 2009 16:11:20 -0300 Subject: Re: [R] create list entry from variable From: www...@gmail.com To: sra...@hotmail.com CC: r-help@r-project.org Try this: l <- list(i + 1) names(l) <- i On Mon, Aug 24, 2009 at 4:01 PM, rami jiossy wrote: Hi; assume i

Re: [R] create list entry from variable

2009-08-24 Thread Henrique Dallazuanna
Try this: l <- list(i + 1) names(l) <- i On Mon, Aug 24, 2009 at 4:01 PM, rami jiossy wrote: > > Hi; > > assume i<-10 > > how can i create a list having key=10 and value=11 > > list(i=11) generates a list with > > 'i' > [1] 11 > > and not > > 10 > [1] 11 > > any help? > > Thanks > > _

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Timothy_Handley
Bert - I took a look at that page just now, and I'd classify my problem as spatial regression. Unfortunately, I don't think the spdep library fits my needs. Or at least, I can't figure out how to use it for this problem. The examples I have seen all use spdep with networks. They build a graph, co

Re: [R] Unique command not deleting all duplicate rows

2009-08-24 Thread Bert Gunter
?round Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mehdi Khan Sent: Monday, August 24, 2009 11:52 AM To: Erik Iverson Cc: r-help@r-project.org Subject: Re: [R] Unique command not de

[R] create list entry from variable

2009-08-24 Thread rami jiossy
Hi; assume i<-10 how can i create a list having key=10 and value=11 list(i=11) generates a list with 'i' [1] 11 and not 10 [1] 11 any help? Thanks _ Facebook. :ON:WL:en-US:SI_SB_facebook:082009 [[alternative HTM

Re: [R] Between-group variance from ANOVA

2009-08-24 Thread Mark Difford
Hi Emma, >> R gives you the tools to work this out. ## Example set.seed(7) TDat <- data.frame(response = c(rnorm(100, 5, 2), rnorm(100, 20, 2))) TDat$group <- gl(2, 100, labels=c("A","B")) with(TDat, boxplot(split(response, group))) summary(aov(response ~ group, data=TDat)) Regards, Mark. e

Re: [R] Unique command not deleting all duplicate rows

2009-08-24 Thread Mehdi Khan
Duplicated did not work, I agree with Erik. Is there any way I can specify a tolerance limit and then delete? On Mon, Aug 24, 2009 at 11:41 AM, Erik Iverson wrote: > I really don't think this is the issue. I think the issue is that some > columns of the data.frame, specifically V1, V2, and V4 s

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Bert Gunter
Have you looked at the "Spatial" task view on CRAN? That would seem to me the logical first place to go. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of timothy_hand...@nps.gov Sent: M

Re: [R] Unique command not deleting all duplicate rows

2009-08-24 Thread Erik Iverson
I really don't think this is the issue. I think the issue is that some columns of the data.frame, specifically V1, V2, and V4 should be checked versus R FAQ 7.31. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Don McKenzie Sen

Re: [R] Unique command not deleting all duplicate rows

2009-08-24 Thread Don McKenzie
duplicated() > test.df V1 V2 V3 V4 V5 V6 V7 1 -115.380 32.894 195 162.940 D 8419 D 2 -115.432 32.864 115 208.910 D 8419 D 3 -115.447 32.773 1170 264.570 D 8419 D 4 -115.447 32.773 1170 264.570 D 8419 D 5 -115.447 32.773 1170 264.570 D 8419 D 6 -115.447 32.773 1170

[R] Unique command not deleting all duplicate rows

2009-08-24 Thread Mehdi Khan
Hello everyone, when I run the "unique" command on my data frame, it deletes the majority of duplicate rows, but not all of them. Here is a sample of my data. How do I get it to delete all the rows? 6 -115.38 32.894 195 162.94 D 8419 D 7 -115.432 32.864 115 208.91 D 8419 D 8 -115.447 32.773

[R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Timothy_Handley
Hello folks, I have some data where spatial autocorrelation seems to be a serious problem, and I'm unclear on how to deal with it in R. I've tried to do my homework - read through 'The R Book,' use the online help in R, search the internet, etc. - and I still have some unanswered questions. I'd g

Re: [R] help with recalling data points in a specific region of the plot

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 12:55 PM, Edward Chen wrote: Hi all, Is there a quick way to display or recall data points from a specific region on the plot? For example I want the points from x>5 and y>5? Thank you very much! Your question is pretty light on specifics but assuming that you have co

Re: [R] trouble with Vista & reading files

2009-08-24 Thread spencerg
Dear Mike: I don't know. 1. What specific error message do you get? 2. Your example is too long for me to parse, especially with the color being stripped before I saw it. 3. Have you tried using "debug(cro.etest.grab)", then walking through t

Re: [R] hdf5 package segfault when processing large data

2009-08-24 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Budi Mulyono > Sent: Monday, August 24, 2009 3:38 AM > To: r-help@r-project.org > Subject: [R] hdf5 package segfault when processing large data > > Hi there, > > I am currently

Re: [R] RMySQL - overwrite record, not table

2009-08-24 Thread Adrian Dusa
whizvast wrote: > > Hi, Adrian- > > If you use "overwrite=T" parameter, you will overwrite the entire table, > not each record. this is the essence of my problem and i still haven't > found out right solution. i am thinking of writing my own MySQLwriteTable > function... > > Thank you for your

Re: [R] help with recalling data points in a specific region of the plot

2009-08-24 Thread John Kane
I am assuming that you want to desplay all the data and highlight the subset. Set up a vector to indicate the breakdown of the data and you can do it fairly easily in ggplot2 if you treat the vector as a factor. library(ggplot) mydata <- data.frame(x=1:21, y= -10:10) z <- ifelse(mydata[,1]>5 & m

Re: [R] Combining matrices

2009-08-24 Thread Daniel Nordlund
> -Original Message- > From: Marc Schwartz [mailto:marc_schwa...@me.com] > Sent: Monday, August 24, 2009 9:57 AM > To: Daniel Nordlund > Cc: r help > Subject: Re: [R] Combining matrices > > > On Aug 24, 2009, at 11:46 AM, Marc Schwartz wrote: > > > > > On Aug 24, 2009, at 11:16 AM, Dani

Re: [R] Combining matrices

2009-08-24 Thread Gabor Grothendieck
Try this: kronecker(cbind(x, y), rep(1, 3)) On Mon, Aug 24, 2009 at 12:16 PM, Daniel Nordlund wrote: > If I have two matrices like > > x <- matrix(rep(c(1,2,3),3),3) > y <- matrix(rep(c(4,5,6),3),3) > > How can I combine  them to get ? > > 1 1 1 4 4 4 > 1 1 1 5 5 5 > 1 1 1 6 6 6 > 2 2 2 4 4 4 >

Re: [R] robust method to obtain a correlation coeff?

2009-08-24 Thread John Kane
I may be misunderstanding the question but would cor(d1, use='complete.obs') or some other variant of "use" help? --- On Mon, 8/24/09, Christian Meesters wrote: > From: Christian Meesters > Subject: [R] robust method to obtain a correlation coeff? > To: "r-help@r-project.org Help" > Received:

Re: [R] Combining matrices

2009-08-24 Thread Marc Schwartz
On Aug 24, 2009, at 11:46 AM, Marc Schwartz wrote: On Aug 24, 2009, at 11:16 AM, Daniel Nordlund wrote: If I have two matrices like x <- matrix(rep(c(1,2,3),3),3) y <- matrix(rep(c(4,5,6),3),3) How can I combine them to get ? 1 1 1 4 4 4 1 1 1 5 5 5 1 1 1 6 6 6 2 2 2 4 4 4 2 2 2 5 5 5 2

[R] help with recalling data points in a specific region of the plot

2009-08-24 Thread Edward Chen
Hi all, Is there a quick way to display or recall data points from a specific region on the plot? For example I want the points from x>5 and y>5? Thank you very much! -- Edward Chen [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Selecting groups with R

2009-08-24 Thread Glen Sargeant
jlwoodard wrote: > > > Each of the above lines successfully excludes the BLUE subjects, but the > "BLUE" category is still present in my data set; that is, if I try > table(Color) I get > > RED WHITE BLUE > 82 151 0 > > How can I eliminate the BLUE category completely so I can do

Re: [R] Combining matrices

2009-08-24 Thread Marc Schwartz
On Aug 24, 2009, at 11:16 AM, Daniel Nordlund wrote: If I have two matrices like x <- matrix(rep(c(1,2,3),3),3) y <- matrix(rep(c(4,5,6),3),3) How can I combine them to get ? 1 1 1 4 4 4 1 1 1 5 5 5 1 1 1 6 6 6 2 2 2 4 4 4 2 2 2 5 5 5 2 2 2 6 6 6 3 3 3 4 4 4 3 3 3 5 5 5 3 3 3 6 6 6 The num

Re: [R] Is there a fast way to do several hundred thousand ANOVA tests?

2009-08-24 Thread Benilton Carvalho
have you tried: fits <- lm(a~b) fstat <- sapply(summary(fits), function(x) x[["fstatistic"]][["value"]]) it takes 3secs for 100K columns on my machine (running on batt) b On Aug 23, 2009, at 9:55 PM, big permie wrote: Dear R users, I have a matrix a and a classification vector b such that

Re: [R] image plot

2009-08-24 Thread Paul Hiemstra
ogbos okike schreef: Hi, I am trying to use the image function to do a color plot. My matrix columns are labeled y and x. I tried >image(y, x) but I had error message ("Error in image.default(y, x) : increasing 'x' and 'y' values expected"). Could anybody please tell me how to add these increasin

Re: [R] table function

2009-08-24 Thread Daniel Malter
Your question is a little vague. Do you just want to know how often z falls in one the three classes? If so, you could either code an indicator variable (e.g. z.cat) that expresses the three categories and then do table(z.cat). Alternatively, you could just do sum(z>0&z<1000) sum(z>1&z<3000) s

Re: [R] Combining matrices

2009-08-24 Thread Henrique Dallazuanna
Try this; do.call(rbind, lapply(split(x, seq(nrow(x))), cbind, y)) On Mon, Aug 24, 2009 at 1:16 PM, Daniel Nordlund wrote: > If I have two matrices like > > x <- matrix(rep(c(1,2,3),3),3) > y <- matrix(rep(c(4,5,6),3),3) > > How can I combine them to get ? > > 1 1 1 4 4 4 > 1 1 1 5 5 5 > 1 1 1

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-24 Thread Gavin Simpson
[Note R-Devel is the wrong list for such questions. R-Help is where this should have been directed - redirected there now] On Mon, 2009-08-24 at 17:02 +0100, Corrado wrote: > Dear R-experts, > > I have a question on the formulas used in the gam function of the mgcv > package. > > I am trying to

Re: [R] table function

2009-08-24 Thread Glen Sargeant
Inchallah Yarab wrote: > > i want to do a table summerizing the number of variable where z is in > [0-1000],],[1000-3000], [> 3000] > You can use "cut" to create a new vector of labels and tabulate the result. Options control closed/open endpoints (see ?cut): > z <- c(100,1500,1200,500,3500,

Re: [R] table function

2009-08-24 Thread Marc Schwartz
On Aug 24, 2009, at 10:59 AM, Inchallah Yarab wrote: hi, i want to use the function table to build a table not of frequence (number of time the vareable is repeated in a list or a data frame!!) but in function of classes I don t find a clear explnation in examples of ?table !!! example

Re: [R] table function

2009-08-24 Thread Erik Iverson
You need to create a factor that indicates which group the values in 'z' belong to. The easiest way to do that based on your situation is to use the 'cut' function to construct the factor, and then call 'table' using the result created by 'cut'. See ?cut and ?factor -Original Message

[R] problem with BRugs

2009-08-24 Thread R Heberto Ghezzo, Dr
Hello, I am sorry, I have this problem before and Uwe send me the answer but I misplaced it and can not find it. writing a model for BRugs > library(BRugs) Loading required package: coda Loading required package: lattice Welcome to BRugs running on OpenBUGS version 3.0.3 > setwd("c:/tmp") Error i

[R] Combining matrices

2009-08-24 Thread Daniel Nordlund
If I have two matrices like x <- matrix(rep(c(1,2,3),3),3) y <- matrix(rep(c(4,5,6),3),3) How can I combine them to get ? 1 1 1 4 4 4 1 1 1 5 5 5 1 1 1 6 6 6 2 2 2 4 4 4 2 2 2 5 5 5 2 2 2 6 6 6 3 3 3 4 4 4 3 3 3 5 5 5 3 3 3 6 6 6 The number of rows and the actual numbers above are unimportant,

Re: [R] Multiply List by a Numeric

2009-08-24 Thread Peter Ehlers
Try lapply(abc, function(x) x*3) Peter Ehlers Brigid Mooney wrote: I apologize for what seems like it should be a straighforward query. I am trying to multiply a list by a numeric and thought there would be a straightforward way to do this, but the best solution I found so far has a for loop.

Re: [R] Multiply List by a Numeric

2009-08-24 Thread Marc Schwartz
On Aug 24, 2009, at 10:58 AM, Brigid Mooney wrote: I apologize for what seems like it should be a straighforward query. I am trying to multiply a list by a numeric and thought there would be a straightforward way to do this, but the best solution I found so far has a for loop. Everything e

Re: [R] robust method to obtain a correlation coeff?

2009-08-24 Thread Bert Gunter
Inline below. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Monday, August 24, 2009 8:53 AM To: David Winsemius Cc: r-help@r-project.org Help; ted.hard...@manch

[R] table function

2009-08-24 Thread Inchallah Yarab
hi, i want to use the function table to build a table not of frequence (number of time the vareable is repeated in a list or a data frame!!) but in function of classes I don t find a clear explnation in  examples of  ?table !!! example x      y    z 1    0   100 5    1   1500 6   

Re: [R] transforming data glm

2009-08-24 Thread Ben Bolker
Mcdonald, Grant wrote: > > Dear sir, > > I am fitting a glm with default identity link: > > > > model<-glm(timetoacceptsecs~maleage*maletub*relweight*malemobtrue*femmobtrue) > > the model is overdisperesed and plot model shows a low level of linearity > of the residuals. > > >> I don't

[R] Multiply List by a Numeric

2009-08-24 Thread Brigid Mooney
I apologize for what seems like it should be a straighforward query. I am trying to multiply a list by a numeric and thought there would be a straightforward way to do this, but the best solution I found so far has a for loop. Everything else I try seems to throw an error "non-numeric argument to

Re: [R] robust method to obtain a correlation coeff?

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 11:38 AM, David Winsemius wrote: On Aug 24, 2009, at 11:26 AM, (Ted Harding) wrote: On 24-Aug-09 14:47:02, Christian Meesters wrote: Hi, Being a R-newbie I am wondering how to calculate a correlation coefficient (preferably with an associated p-value) for data like: d[

Re: [R] robust method to obtain a correlation coeff?

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 11:26 AM, (Ted Harding) wrote: On 24-Aug-09 14:47:02, Christian Meesters wrote: Hi, Being a R-newbie I am wondering how to calculate a correlation coefficient (preferably with an associated p-value) for data like: d[,1] [1] 25.5 25.3 25.1 NA 23.3 21.5 23.8 23.2 24.2 22

Re: [R] robust method to obtain a correlation coeff?

2009-08-24 Thread Ted Harding
On 24-Aug-09 14:47:02, Christian Meesters wrote: > Hi, > Being a R-newbie I am wondering how to calculate a correlation > coefficient (preferably with an associated p-value) for data like: > >> d[,1] > [1] 25.5 25.3 25.1 NA 23.3 21.5 23.8 23.2 24.2 22.7 27.6 24.2 ... >> d[,2] > [1] 0.0 11.1 0

[R] Two lines, two scales, one graph

2009-08-24 Thread Rick
First of all, thanks to everyone who answers these questions - it's most helpful. I'm new to R and despite searching have not found an example of what I want to do (there are some good beginner's guides and a lot of complex plots, but I haven't found this). I would like to plot two variables a

Re: [R] CRAN (and crantastic) updates this week

2009-08-24 Thread John Kerpel
Great idea - thx! On Mon, Aug 24, 2009 at 9:30 AM, hadley wickham wrote: > Sorry, we had some problems with the initial sending of our weekly digest > which resulted in a rather empty email. Here is the correct version: > > CRAN (and crantastic) updates this week > > New packages >

[R] robust method to obtain a correlation coeff?

2009-08-24 Thread Christian Meesters
Hi, Being a R-newbie I am wondering how to calculate a correlation coefficient (preferably with an associated p-value) for data like: > d[,1] [1] 25.5 25.3 25.1 NA 23.3 21.5 23.8 23.2 24.2 22.7 27.6 24.2 ... > d[,2] [1] 0.0 11.1 0.0 NA 0.0 10.1 10.6 9.5 0.0 57.9 0.0 0.0 ... Apparent

[R] Re current neural network (RNN) package?

2009-08-24 Thread J_Laberga
Hello, I'm trying to tackle a problem that would require the implementation of a recurrent NN. However, even though the CRAN is very big, I can’t seem to find a package for this. Does anybody here know if one exits? BR, John -- View this message in context: http://www.nabble.com/Recurrent-neu

Re: [R] CRAN (and crantastic) updates this week

2009-08-24 Thread Ronggui Huang
I like it. Thanks. 2009/8/24 hadley wickham : > Sorry, we had some problems with the initial sending of our weekly digest > which resulted in a rather empty email. Here is the correct version: > > CRAN (and crantastic) updates this week > > New packages > > > * atm (0.1.0) > Charlotte

Re: [R] CRAN (and crantastic) updates this week

2009-08-24 Thread hadley wickham
Sorry, we had some problems with the initial sending of our weekly digest which resulted in a rather empty email. Here is the correct version: CRAN (and crantastic) updates this week New packages * atm (0.1.0) Charlotte Maia http://crantastic.org/packages/atm An R package for creat

[R] CRAN (and crantastic) updates this week

2009-08-24 Thread Hadley Wickham
CRAN (and crantastic) updates this week New packages Updated packages New reviews --- This email provided as a service for the R community by http://crantastic.org. Like it? Hate it? Please let us know: crana...@gmail.com. _

Re: [R] error in creating gantt chart.

2009-08-24 Thread Stefan Grosse
On Mon, 24 Aug 2009 05:22:17 -0700 (PDT) rajclinasia wrote: R> my.gantt.info<-read.csv("C:/Documents and R> Settings/balakrishna/Desktop/one.csv"). R> R> and for create gantt chart i used below code. R> R> gantt.chart("my.gantt.info"). This again is why others have pointed you first to have a

Re: [R] Selecting groups with R

2009-08-24 Thread Michael A. Miller
To drop empty factor levels from a subset, I use the following: a.subset <- subset(dataset, Color!='BLUE') ifac <- sapply(a.subset,is.factor) a.subset[ifac] <- lapply(a.subset[ifac],factor) Mike > dataset Color Score 1 RED10 2 RED13 3 RED12 4 WHITE22 5 WHITE27 6 WHIT

Re: [R] Convert list to data frame while controlling column types

2009-08-24 Thread Alexander Shenkin
On 8/24/2009 2:06 AM, Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 23.08.2009 17:29:48: > >> On 8/23/2009 9:58 AM, David Winsemius wrote: >>> I still have problems with this statement. As I understand R, this >> should be impossible. I have looked at both you postings and ne

[R] image plot

2009-08-24 Thread ogbos okike
Hi, I am trying to use the image function to do a color plot. My matrix columns are labeled y and x. I tried >image(y, x) but I had error message ("Error in image.default(y, x) : increasing 'x' and 'y' values expected"). Could anybody please tell me how to add these increasing 'x' and 'y' values. T

Re: [R] R with MPI

2009-08-24 Thread polemon
On Mon, Aug 24, 2009 at 2:20 PM, polemon wrote: > Hello, I plan to use R with my cluster with OpenMPI. > I need the packaged 'snow' and 'Rmpi' for that, however, I get an error > while downloading and installing them: > When I do a: > install.packages("Rmpi", dependencies=T) > > I get this er

[R] R survival package error message - bug?!

2009-08-24 Thread Damjan Krstajic
Dear all, I have encountered a weird behaviour in R survival package which seems to me to be a bug. The weird behaviour happens when I am using 100 variables in the ridge function when calling coxph with following formula Surv(time = futime, event = fustat, type = "right") ~ ridge(X1, X2, X

Re: [R] error in creating gantt chart.

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 8:22 AM, rajclinasia wrote: hi every one, i have a excel sheet like this labels starts ends 1 first task 1-Jan-04 3-Mar-04 2 second task 2-Feb-04 5-May-04 3 third task 3-Mar-04 6-Jun-04 4 fourth task 4-Apr-04 8-Aug-04 5 fifth task 5-May-04 9-Sep-04 now i co

Re: [R] how to specify between group variance in lme

2009-08-24 Thread Bond, Stephen
Clarification: Lm is much better than the base forecast from lme level=0, Level=1 produces a much tighter fit than lm. I was expecting that level=0 would produce something very close to lm, but it does not. [[alternative HTML version deleted]] _

Re: [R] Import/export ENVI files

2009-08-24 Thread Barry Rowlingson
2009/8/24 Lucas Sevilla García : > > Hi! I'm a beginner with this webpage so, I don't know if I'm sending my > question to the correct site. Anyway, I'm working with R and I need to import > and export ENVI files, (*.HDR files). A colleague told me that there is a > package to import/export envi

Re: [R] image() generates many border lines in pdf, not on screen (quartz) - R 2.9.1 GUI 1.28 Tiger build 32-bit (5444) - OS X 10.5.8

2009-08-24 Thread Stefan Evert
Your code is not reproducible, we do not have rfc, y, zVals nor NoCols. It's much easier to reproduce: just type in the first example from the "image" help page x <- y <- seq(-4*pi, 4*pi, len=27) r <- sqrt(outer(x^2, y^2, "+")) image(z = z <- cos(r^2)*exp(-r/6), col=gray((0:32)/32)) t

[R] how to specify between group variance in lme

2009-08-24 Thread Bond, Stephen
Hello r-help, I am using lme with two specs for the variance func varComb(varFixed(~1/n)),varPower(~Age)) this produces worse forecasts than the lm model with simple weights=n I think due to the fact that the lme spec works on variance inside the group. I need to show it that 1/n scales the v

Re: [R] Copy & Paste from tktext on Mac

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 8:21 AM, Anne Skoeries wrote: Hi there, a text Window is supposed to map the shortcuts for copying and pasting (, ) automatically. I'm working under Mac OS X and my text window doesn't really map these functions automatically - it works fine under Windows. That is a b

Re: [R] natural sorting a data frame /vector by row

2009-08-24 Thread Ottorino-Luca Pantani
Moumita Das ha scritto: How to NATURAL sort a vector or data frame* by row* , in ascending order ? V1 V2V3 V4 i1 5.00e-01 1.036197e-17 4.825338e+16 0. i104.001692e-18 1.365740e-17 2.930053e-01 0.76973827 i

Re: [R] calculating probability

2009-08-24 Thread David Winsemius
On Aug 24, 2009, at 8:11 AM, maram salem wrote: Hi all, I've a trivial question. If (q) is a continous variable,actually a vector of 1000 values. how to calculate the probability that q is greater than a specific value, i.e. P(q>45)?? sum(q>45)/1000 # if no NA's in vector sum(q>45, na.rm

Re: [R] calculating probability

2009-08-24 Thread Uwe Ligges
maram salem wrote: Hi all, I've a trivial question. If (q) is a continous variable,actually a vector of 1000 values. how to calculate the probability that q is greater than a specific value, i.e. P(q>45)?? Do you want to estimate any distribution or do you just want the empirical informati

  1   2   >