Displaying 10 results from an estimated 10 matches for "lake1".
Did you mean:
lake
2013 Nov 15
0
getting the results of tapply into a single matrix
Hi,
Try:
example <- read.table(text="ID Sex Location CL
1?? F??? lake1?? 40
1?? F??? lake1???
1?? F??? lake1???? 43
2?? M??? lake1??? 30
3?? M??? lake2??? 22
4?? F??? lake2???? 25
4?? F??? lake2???? 27",sep="",header=TRUE,stringsAsFactors=FALSE,fill=TRUE)
aggregate(CL~.,example,mean,na.rm=TRUE)
#or
library(plyr)
ddply(example,.(ID,Sex,Location),sum...
2009 Mar 30
2
ggplot2-geom_text()
Hi: I need help with geom_text().
I would like to count the number of Locations
and put the sum of it right above each bar.
x <- "Location Lake_dens Fish Pred
Lake1 1.132 1 0.115
Lake1 0.627 1 0.148
Lake1 1.324 1 0.104
Lake1 1.265 1 0.107
Lake2 1.074 0 0.096
Lake2 0.851 0 0.108
Lake2 1.098 0 0.095
Lake2 0.418 0 0.135
Lake2 1.256 1 0.088
Lake2 0.554 1 0.126
Lake2 1.247 1 0.088
Lake2 0.794 1 0.112
Lake2 0.181 0 0.152
Lake3 1.694 0 0.001
Lake3 1.01...
2018 May 22
2
Using tryCatch in a for loop
Data and code as promised:
#Creating a test dataset
Year<- c(2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014)
Lake1<- c(2, 4, 5, 2, 1, 1, 2, 3, 4, 5, 6, 2, 3, 1, 2)
Lake2<- c(1, 3, -1, 4, -2, 1, 2, 3, 4, 5, 6, 2, 3, 1, 2)
Lake3<- c(1, 2, 5, -3, 1, 1, 2, 3, 4, 5, 6, 2, 3, 1, 2)
Lake4<- c(1, 1, 1, 1, 1, 1, 1, 250, 240, 240, 240, 240, 240, 239, 255)
mydata<- data.frame(Year, Lake1, Lake2, Lake3, Lake...
2018 May 22
4
Using tryCatch in a for loop
Hi Bert,
Thank you for the quick response!?
In its current?state?the code?prints three lines that say "warning". What I was expecting is that I would?get?a matrix with 4 columns, 1. column names (from the original data, ex. Lake1) 2. breakpoint year 3. slope 4. slope difference from the first to the?second segment of the segmented regression. Each row in the matrix would be the results of the segmented regression test for each lake in the original data frame, so?Lake1 results would be in row 2 (row 1 would be titles) and so...
2018 May 22
0
Using tryCatch in a for loop
.../22/2018 11:32 AM, Bailey Hewitt wrote:
> Hi Bert,
>
> Thank you for the quick response!
>
> In its current?state?the code?prints three lines that say "warning". What I was expecting is that I would?get?a matrix with 4 columns, 1. column names (from the original data, ex. Lake1) 2. breakpoint year 3. slope 4. slope difference from the first to the?second segment of the segmented regression. Each row in the matrix would be the results of the segmented regression test for each lake in the original data frame, so?Lake1 results would be in row 2 (row 1 would be titles) and so...
2018 May 22
0
Using tryCatch in a for loop
...County" comic strip )
On Tue, May 22, 2018 at 1:11 PM, Bailey Hewitt <bailster at hotmail.com> wrote:
> Data and code as promised:
>
> #Creating a test dataset
> Year<- c(2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
> 2011, 2012, 2013, 2014)
> Lake1<- c(2, 4, 5, 2, 1, 1, 2, 3, 4, 5, 6, 2, 3, 1, 2)
> Lake2<- c(1, 3, -1, 4, -2, 1, 2, 3, 4, 5, 6, 2, 3, 1, 2)
> Lake3<- c(1, 2, 5, -3, 1, 1, 2, 3, 4, 5, 6, 2, 3, 1, 2)
> Lake4<- c(1, 1, 1, 1, 1, 1, 1, 250, 240, 240, 240, 240, 240, 239, 255)
> mydata<- data.frame(Year, Lake1...
2018 May 22
3
Using tryCatch in a for loop
...ey Wickham's document in Advanced R but I am still a novice when it comes to coding and I am having a hard time getting the code to work properly. Below is the code I have developed thus far (with a test dataset as an example):
#Creating a test dataset
Year<- c(2000, 2001, 2002, 2003, 2004)
Lake1<- c(2, 4, 5, 2, 1)
Lake2<- c(1, 3, -1, 4, -2)
Lake3<- c(1, 2, 5, -3, 1)
mydata<- data.frame(Year, Lake1, Lake2, Lake3)
#Running a for loop that indicates when an error or warning occurs
y<- mydata[,2:4]
year <- mydata$Year
regimeshift <- data.frame()
for (i in 1:3){
? tryCatch...
2018 May 22
0
Using tryCatch in a for loop
...ced R but I am still a
> novice when it comes to coding and I am having a hard time getting the code
> to work properly. Below is the code I have developed thus far (with a test
> dataset as an example):
>
> #Creating a test dataset
> Year<- c(2000, 2001, 2002, 2003, 2004)
> Lake1<- c(2, 4, 5, 2, 1)
> Lake2<- c(1, 3, -1, 4, -2)
> Lake3<- c(1, 2, 5, -3, 1)
> mydata<- data.frame(Year, Lake1, Lake2, Lake3)
>
> #Running a for loop that indicates when an error or warning occurs
> y<- mydata[,2:4]
> year <- mydata$Year
> regimeshift <-...
2018 May 22
0
Using tryCatch in a for loop
...tmail.com>
wrote:
> Hi Bert,
>
>
> Thank you for the quick response!
>
>
> In its current state the code prints three lines that say "warning". What
> I was expecting is that I would get a matrix with 4 columns, 1. column
> names (from the original data, ex. Lake1) 2. breakpoint year 3. slope 4.
> slope difference from the first to the second segment of the segmented
> regression. Each row in the matrix would be the results of the segmented
> regression test for each lake in the original data frame, so Lake1 results
> would be in row 2 (row 1 wou...
2009 Apr 01
0
回复: R-help Digest, Vol 73, Issue 32
...lp@stat.math.ethz.ch
Message-ID: <558876.15811.qm@web56608.mail.re3.yahoo.com>
Content-Type: text/plain; charset=us-ascii
Hi: I need help with geom_text().
I would like to count the number of Locations
and put the sum of it right above each bar.
x <- "Location Lake_dens Fish Pred
Lake1 1.132 1 0.115
Lake1 0.627 1 0.148
Lake1 1.324 1 0.104
Lake1 1.265 1 0.107
Lake2 1.074 0 0.096
Lake2 0.851 0 0.108
Lake2 1.098 0 0.095
Lake2 0.418 0 0.135
Lake2 1.256 1 0.088
Lake2 ...