Re: [R] assigning letter to a column

2014-10-17 Thread Monaly Mistry
ted, values less than 3 > will be coded as missing (NA). > > David C > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of David L Carlson > Sent: Friday, October 17, 2014 9:15 AM > To: Monaly Mistry; r-help

[R] assigning letter to a column

2014-10-17 Thread Monaly Mistry
Hi, I'm having trouble with assigning a letter to a column based on the value of another column. Since I have separate data files I've saved then into one folder and I'm reading them in separately into the function. The code is below. #F= fast; S= slow; I1= Intermediate score 1; I2=Intermediate

Re: [R] canonical correlation

2014-07-15 Thread Monaly Mistry
see > ?candisc::cancor > ?heplot.cancor > > -Michael > > > On 13/07/2014 4:39 PM, Monaly Mistry wrote: > >> Dear John, >> >> In my final model I have 10 independent variables that account for the >> variation in my dependent variable, and I needed to visually

Re: [R] canonical correlation

2014-07-13 Thread Monaly Mistry
> Canonical correlation and regression are appropriate when there is more > than one Y. > > Best, > John > > On Sun, 13 Jul 2014 15:39:15 +0100 > Monaly Mistry wrote: > > Dear John, > > > > In my final model I have 10 independent variables that account

Re: [R] canonical correlation

2014-07-13 Thread Monaly Mistry
R^2 from the LS regression of Y on > the Xs. > > > > Best, > > John > > > > > > John Fox, Professor > > McMaster University > > Hamilton, Ontario, Canada > > http://socserv.mcmaster.ca/jfox/ > > > > > > On Sun, 13 Jul 2

[R] canonical correlation

2014-07-12 Thread Monaly Mistry
Hi, I was wondering if it's possible in R to do a canonical correlation with only one dependent variable and several independent variables. I've tried using cc(X,Y) but I got an error message. In this case I had 1 dependent variable and 10 independent variables. Error in cor(X, use = "pairwise")

[R] question about how the mantel test is run in the ade4 package

2014-06-04 Thread Monaly Mistry
Hi, I'm running a mantel test of the location of individuals in space against the behavioural score. I wanted to see whether those with similar behavioural scores are closer together in space relative to those that are further apart. This is the code I have written: nest.dists<-dist(cbind(aa$lon

Re: [R] subsetting to exclude different values for each subject in study

2014-05-27 Thread Monaly Mistry
] 130 128 172 64 113 117 > > [[3]] > [1] 54 19 16 73 74 > > [[4]] > [1] 2 31 704 34 707 > > [[5]] > [1] 51 94 57 73 62 > > XO[2,] <- sapply(seq_along(col.tri.nb),function(i) > mean(abs(ind[i]-ind[col.tri.nb[[i]]]))) > > A.K. > > > >

Re: [R] subsetting to exclude different values for each subject in study

2014-05-23 Thread Monaly Mistry
;), class = "data.frame", row.names = c(NA, -99L)) #Code for tessellation library(deldir) ao= read.table("C:/Users/Monaly/Desktop/2012_malenest.txt", header=TRUE) a29= deldir(ao$lat_xm, ao$long_ym) a30=tile.list(a29) plot(a30, close=TRUE, main="2012 Male Nest", xlab=

Re: [R] subsetting to exclude different values for each subject in study

2014-05-23 Thread Monaly Mistry
ndary with each other. Best, Monaly. On Fri, May 23, 2014 at 11:25 AM, arun wrote: > Hi, > > I am not sure how you did that. May be using library(deldir). I didn't > find that codes in your previous email. > > A.K. > > On Friday, May 23, 2014 12:42 AM, Monaly Mi

Re: [R] subsetting to exclude different values for each subject in study

2014-05-22 Thread Monaly Mistry
here another dataset with the information? Sorry, if I have missed something > For e.g. > ### average difference b/n neighbours for each individual > XO["avg", "176"]<- mean(abs((XO[1,"176"])-XO[1,c("140","162","713")])) > >

Re: [R] subsetting to exclude different values for each subject in study

2014-05-22 Thread Monaly Mistry
ot;,"101")])) XO["avg", "105"]<- mean(abs((XO[1,"105"])-XO[1,c("88","109","101","716")])) XO["avg", "22"]<- mean(abs((XO[1,"22"])-XO[1,c("11","79","23"

Re: [R] subsetting to exclude different values for each subject in study

2014-05-22 Thread Monaly Mistry
example using ?dput(). > > A.K. > > > > > On Thursday, May 22, 2014 10:15 AM, Monaly Mistry > wrote: > Hi, > > I've written a code to determine the difference in score for a single > subject and its non-neighbours > > o<-(ao[,c(13,5)]) ##this is the table

[R] subsetting to exclude different values for each subject in study

2014-05-22 Thread Monaly Mistry
Hi, I've written a code to determine the difference in score for a single subject and its non-neighbours o<-(ao[,c(13,5)]) ##this is the table with the relevant information o<-na.omit(o) ##omitted data with NA o<-o[!o$NestkastNummer %in% c(176,140,162,713),] ##removed neighbours XO[7,1]<-abs((XO

[R] running something similar to bootstrap

2014-04-23 Thread Monaly Mistry
Hi, I've made a matrix with my first row being nest numbers and my second row being a score for individuals in that nest. Row after that contain the difference in score for that individual and its neighbour - i assigned a formula to each element (thus all the columns have different lengths, but

[R] using for loop for data frame

2014-04-15 Thread Monaly Mistry
Hi, I have a data frame with 15 different years and each year has a different sample size. I'm having trouble writing a for loop to have a t-test done for each year for two of the columns. Thus far I have been able to loop over the years but the output is the same t-test 15 times. I'm new to wr

Re: [R] nearest neighbour

2014-04-15 Thread Monaly Mistry
wrote: > On 04/04/14 01:16, Monaly Mistry wrote: > >> Hi, >> >> If I have a data frame of the location of individuals (x and y >> coordinate), >> how do I find the 5 nearest neighbours for each individual. >> > > The nnwhich() function from the spatsta

[R] nearest neighbour

2014-04-03 Thread Monaly Mistry
Hi, If I have a data frame of the location of individuals (x and y coordinate), how do I find the 5 nearest neighbours for each individual. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

[R] tripack package

2014-03-25 Thread Monaly Mistry
Hi, I'm trying to label the points on my voronoi diagram, but I'm not sure how to do this with the tripack library. Best, Monaly [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r