search for: ashta

Displaying 20 results from an estimated 37 matches for "ashta".

2009 Sep 23
3
Reading data
Dear R-users, I am a new user for R. I am eager to lean about it. I wanted to read and summary of the a simple data file I used the following, rel <- read.table("C:/Documents and Settings/ashta/My Documents/R_data/rel.dat", quote="",header=FALSE,sep="",col.names= c("id","orel","nrel")) summary(rel) Below is the error message, rel <- read.table("C:/Documents and Settings/ashta/My Documents/R_data/rel.dat", quote=...
2009 Oct 01
4
Color of graph
I am trying to plot a line graph for 3 or more regression lines abline(m1) abline(m2) abline(m3) Can I change the color of each line? if so how? Thanks in advance Ashta [[alternative HTML version deleted]]
2017 Dec 07
4
Remove
> On Dec 6, 2017, at 4:27 PM, Ashta <sewashm at gmail.com> wrote: > > Thank you Ista! Worked fine. Here's another (possibly more direct in its logic?): DM[ !ave(DM$x, DM$GR, FUN= function(x) {!length(unique(x))==1}), ] GR x y 5 B 25 321 6 B 25 512 7 B 25 123 8 B 25 451 -- David > On Wed, Dec 6, 2017...
2017 Dec 09
0
Remove
...521 C 68 235 C 85 258 C 80 654',header = TRUE, stringsAsFactors = FALSE) The end result will be A 25 125 A 23 135 B 45 321 B 47 512 C 61 521 C 68 235 Thank you On Wed, Dec 6, 2017 at 10:34 PM, David Winsemius <dwinsemius at comcast.net> wrote: > >> On Dec 6, 2017, at 4:27 PM, Ashta <sewashm at gmail.com> wrote: >> >> Thank you Ista! Worked fine. > > Here's another (possibly more direct in its logic?): > > DM[ !ave(DM$x, DM$GR, FUN= function(x) {!length(unique(x))==1}), ] > GR x y > 5 B 25 321 > 6 B 25 512 > 7 B 25 123 &gt...
2009 Oct 08
5
row selection
Hi all, I have a matrix named x with N by C I want to select every 5 th rrow from matrix x I used the following code n<- nrow(x) > for(i in 1: n){ + b <- a[i+5,] >b } Error: subscript out of bounds Can any body point out the problem? [[alternative HTML version deleted]]
2017 Dec 06
2
Remove
Hi Ashta, There are many ways to do it. Here is one: vars <- sapply(split(DM$x, DM$GR), var) DM[DM$GR %in% names(vars[vars > 0]), ] Best Ista On Wed, Dec 6, 2017 at 6:58 PM, Ashta <sewashm at gmail.com> wrote: > Thank you Jeff, > > subset( DM, "B" != x ), this works if I k...
2017 Dec 09
2
Remove
> On Dec 8, 2017, at 4:48 PM, Ashta <sewashm at gmail.com> wrote: > > Hi David, Ista and all, > > I have one related question Within one group I want to keep records > conditionally. > example within > group A I want keep rows that have " x" values ranged between 15 and 30. > group B I w...
2009 Oct 14
2
Survival and nonparametric
Hi all, Has any body the exprience to iclude a nonparametric component into the survival analysis using R package? *Can someone recommend *me * some ** references? * Thanks a lot Ashta [[alternative HTML version deleted]]
2017 Dec 09
1
Remove
...;- split(DM$x, DM$GR) inx <- unlist(lapply(seq_along(sp), function(i) keep[[i]][1] <= sp[[i]] & sp[[i]] <= keep[[i]][2])) DM[inx, ] # GR x y #1 A 25 125 #2 A 23 135 #5 B 45 321 #6 B 47 512 #9 C 61 521 #10 C 68 235 Hope this helps, Rui Barradas On 12/9/2017 12:48 AM, Ashta wrote: > Hi David, Ista and all, > > I have one related question Within one group I want to keep records > conditionally. > example within > group A I want keep rows that have " x" values ranged between 15 and 30. > group B I want keep rows that have " x&q...
2017 Dec 07
0
Remove
Thank you Ista! Worked fine. On Wed, Dec 6, 2017 at 5:59 PM, Ista Zahn <istazahn at gmail.com> wrote: > Hi Ashta, > > There are many ways to do it. Here is one: > > vars <- sapply(split(DM$x, DM$GR), var) > DM[DM$GR %in% names(vars[vars > 0]), ] > > Best > Ista > > On Wed, Dec 6, 2017 at 6:58 PM, Ashta <sewashm at gmail.com> wrote: >> Thank you Jeff, >> &g...
2017 Dec 09
1
Remove
...23 135 . . . ) DM %>% filter((GR == "A" & (x >= 15) & (x <= 30)) | (GR == "B" & (x >= 40) & (x <= 50)) | (GR == "C" & (x >= 60) & (x <= 75))) On Fri, Dec 8, 2017 at 4:48 PM, Ashta <sewashm at gmail.com> wrote: > Hi David, Ista and all, > > I have one related question Within one group I want to keep records > conditionally. > example within > group A I want keep rows that have " x" values ranged between 15 and 30. > group B I want kee...
2017 Dec 09
0
Remove
> On Dec 8, 2017, at 6:16 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Dec 8, 2017, at 4:48 PM, Ashta <sewashm at gmail.com> wrote: >> >> Hi David, Ista and all, >> >> I have one related question Within one group I want to keep records >> conditionally. >> example within >> group A I want keep rows that have " x" values ranged between...
2009 Nov 08
5
look up and Missing
HI R-Users Assume that I have a data frame 'temp' with several variables (v1,v2,v3,v4,v5.). v1 v2 v3 v4 v5 1 2 3 3 6 5 2 4 2 0 2 -9 5 4 3 6 2 1 3 4 1, I want to look at the entire row values of when v2 =-9 like 2 -9 5 4 3 I wrote K<- list(if(temp$v2)==-9)) I wrote the like this but it gave me which is not correct.
2017 Dec 09
1
Remove
...l Dunlap TIBCO Software wdunlap tibco.com On Sat, Dec 9, 2017 at 9:38 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > > On Dec 8, 2017, at 6:16 PM, David Winsemius <dwinsemius at comcast.net> > wrote: > > > > > >> On Dec 8, 2017, at 4:48 PM, Ashta <sewashm at gmail.com> wrote: > >> > >> Hi David, Ista and all, > >> > >> I have one related question Within one group I want to keep records > >> conditionally. > >> example within > >> group A I want keep rows that have &quot...
2009 Oct 06
3
Plot
Hi All, Days <- matrix(c("Monday", "Tuesday", "Wed", "Thu", "Fri", "Sat", "Sun"),7,1) Hum <-matrix(c(56,57,60,75,62,67,70), Temp<-matrix(c(76,77,81,95,82,77,83), Using the above information I want plot humidity and temperature on Y-axis and days on X-axis Any help is appreciated! [[alternative HTML version
2017 Dec 06
2
Remove
subset( DM, "B" != x ) This is covered in the Introduction to R document that comes with R. -- Sent from my phone. Please excuse my brevity. On December 6, 2017 3:21:12 PM PST, David Winsemius <dwinsemius at comcast.net> wrote: > >> On Dec 6, 2017, at 3:15 PM, Ashta <sewashm at gmail.com> wrote: >> >> Hi all, >> In a data set I have group(GR) and two variables x and y. I want to >> remove a group that have the same record for the x variable in each >> row. >> >> DM <- read.table( text='GR x y >&gt...
2017 Dec 06
0
Remove
...; != x ) > > This is covered in the Introduction to R document that comes with R. > -- > Sent from my phone. Please excuse my brevity. > > On December 6, 2017 3:21:12 PM PST, David Winsemius <dwinsemius at comcast.net> wrote: >> >>> On Dec 6, 2017, at 3:15 PM, Ashta <sewashm at gmail.com> wrote: >>> >>> Hi all, >>> In a data set I have group(GR) and two variables x and y. I want to >>> remove a group that have the same record for the x variable in each >>> row. >>> >>> DM <- read.table...
2009 Sep 25
1
Binomial
...s( x1,x2,x3,x4) that influence the outcome. I want to fit a binomial model . How do I do that? I am guessing the response variable should be transformed but not sure which family of transformation to use. It is easy to do it in SAS but I just want to learn using R Any help is highly appreciated Ashta [[alternative HTML version deleted]]
2009 Oct 10
1
Creating new variables
Hi all, I have a data set called x with 200 rows and 12 columns. I want create two more columns based on probability. ie if p >0 .4 then v1 =1 else v1=0; if p >0 .6 then v2 =1 else v2=0; Finally x will have 14 variables. Can any one show me how to do that? Thanks Ashta . [[alternative HTML version deleted]]
2009 Oct 11
2
Random number
Hi All, I have the matrix called 'X' with 200 rows and 12 variables. I want to create 2 new variables (V1 and V2) based on random number generator p1<-rnorm(200. mean=0, std=1) p2<-rnorm(200. mean=0, std=1) x <- cbind(x, v1=ifelse(x[,'p1'] > 0.4, 1, 0), v2=ifelse(x[,'p2'] > 0.6, 0, 1)) I found the following error message *Error: unexpected symbol in