Displaying 10 results from an estimated 10 matches for "lake2".
Did you mean:
lake
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.018 0 0.001
Lake3 2.88 0 0"
DF <- read.table(textConnection(x), header = TRUE...
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),summarize,CL=mean(CL,na.rm=TRUE))
#or from `result`
?res <- setNames(cbind(expan...
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, Lake4)
#Running a for loop that indicates when an error or wa...
2018 May 22
3
Using tryCatch in a for loop
...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({
? ? y.val <- y[,i]
? ?...
2018 May 22
0
Using tryCatch in a for loop
...ailey 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, Lake2, Lake3, Lake4)
>
> #Running a for loop that indic...
2018 May 22
4
Using tryCatch in a for loop
...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({
? ? y.val <- y[,i]
? ?...
2018 May 22
0
Using tryCatch in a for loop
...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)...
2018 May 22
0
Using tryCatch in a for loop
...e 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){...
2018 May 22
0
Using tryCatch in a for loop
...e 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){...
2009 Apr 01
0
回复: R-help Digest, Vol 73, Issue 32
...: 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 ...