quot; "12:30:01" "12:45:01"
"13:00:00" "13:15:02"
This gives me the data taken at quarter hour intervals (removes 12:20:00) but I
am still left with multiple values at the quarter hours.
I would like to obtain:
"12:00:00" "12:15:05&quo
ontex, or what the number one at the end
does.
Thanks for you help,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 8/14/09, jim holtman wrote:
> From: jim holtman
> Subject: Re: [R] Finding minimum of time subset
> To: "Tim Clark"
> Cc: r-help@r
Jim,
Got it! Thanks for the explanation and the example. Always nice to learn new
tricks on R.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 8/14/09, jim holtman wrote:
> From: jim holtman
> Subject: Re: [R] Finding minimum of time subset
>
Thanks for everyones help and for the alternate ways of doing this. I am
always amazed at how many solutions this list comes up with for things I get
stuck on! It really helps us non-programmers learn R!
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 8/14/09
slotNames().
> slotNames(mymcp)
[1] "data""polygons""plotOrder" "bbox" "proj4string"
What am I missing here? Is Slot "ID" not a slot? Can I export the ID's with
the shapefiles to qGIS? Can I rena
,y1,y1,y1,y2,y1,y2,y1,y2)
xy<-cbind(x,y)
I would like to know each time the numbers change.
Correct answer should be:
x=1,11,21,51,61,71,81,91
I would appreciate any help or suggestions. It seems like it should be simple
but I’m stuck!
Thanks,
Tim
Tim Clark
Department of Zoology
Unive
Thanks everyone! I would have been banging my head around for quite a while
and still wouldn't have come up with either solution. The function rle() is a
good one to know!
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Wed, 2/10/10, Ben Tupper wrote:
&
# SEE WHAT RLE GIVES
test <- rle(xy[,2])
print(str(test)
# USE JIM"S TRICK OF CUMULATIVE SUMMING
# TO GET THE LOCATIONS
result <- cumsum(c(1,rle(xy[,2])$lengths))
Tim Clark
Department of Zoology
University of Hawaii
--- On Wed, 2/10/10, Ben Tupper wrote:
> From:
format (x1)?
#Sample data
x<-c(1,2,3,4,5,6)
y<-c(1,2,2,1)
#I need to format the data like this
x1<-c(1,1,2,2,NA,3,3,4,4,NA,5,5,6,6,NA)
y1<-rep(c(1,2,2,1,NA),length(x)/2)
#Final plot
plot(c(1,6), 1:2, type="n")
polygon(x1,y1,density=c(40))
Thanks,
Tim
Tim Clark
Department
Thanks Uwe! And Peter for the correction. I would never have come up with
that!
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 2/12/10, Uwe Ligges wrote:
> From: Uwe Ligges
> Subject: Re: [R] Formatting question for separate polygons
> To: "Peter
-01-01 22:00:00 HST"
[2] "2000-01-01 22:00:00 HST"
> d<-c(a,a)
> d
[1] "2000-01-01 12:00:00 HST"
[2] "2000-01-01 12:00:00 HST"
> structure(0,class="Date")
[1] "1970-01-01"
Tim Clark
Department of Zoology
University of Hawaii
Glad to know it isn't just me! I couldn't use Phil's data.frame method since
my real problem went from a POSIXct object to a large matrix where I used rbind
and then back to POSIXct. Jim's function worked great on converting the final
product back to the proper date.
Than
iff<-diff(SP.utm$Lat)
d=(long.diff^2+lat.diff^2)^.5
speed=d/date.diff
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the po
(07/30/02 00:00:00) (08/06/03 17:45:00)
Is there a reason different dates would come up as duplicate values? I would
prefer not to have to delete them if I don't have to. Any suggestions on how
to get R to realize they are different?
Thanks,
Tim
Tim Clark
Department of Zoolo
Don and Jim,
Thanks! I got it! Duplicated is only returning one of the two duplicated
dates (the second date). It all makes sense now!
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 7/24/09, Don MacQueen wrote:
> From: Don MacQueen
> Subject: Re: [R] Dupl
choose between these and obtain the one with
the fewest missing values.
In my real dataset I have multiple variables collected every second and I would
like to subsample it every 5, 10, and 15 minutes.
I appreciate your help.
Tim
Tim Clark
Department of Zoology
Univer
r
a valid alternative to narrowing down models when you have a lot of data and a
large number of variables your interested in.
Any thoughts on either of these methods? Or should I be doing something else?
Thanks for your help,
Tim
Tim Clark
Department of Zoology
University
, 0.88, 0.62, 0.19, 0.21, 0.01, 0.70, 1.00, 0.88, 0.04, 0.70, 0.93,
0.23, 0.99, 0.19, 0.79, 1.00, 0.03, 0.01, 0.00)
g1<-glm(y~cos((2*pi*lp)/29.530589)+sin((2*pi*lp)/29.530589))
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
theta for the glm
model? The two models are:
mod.nb<-glm.nb(mantas~site,data=mydata)
mod.glm<-glm(mantas~site,data=mydata, family=negative.binomial(mod.nb$theta))
How else can I get theta for the family=negative.binomial(theta=???)
Thanks!
Tim
Tim Clark
Department of Z
ting a multiple line plot.
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-gu
? I don't have to use matplot(), but would like to understand its
use.
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Sun, 9/27/09, Henrique Dallazuanna wrote:
> From: Henrique Dallazuanna
> Subject: Re: [R] Data formatting for matplot
> To: "
Thanks for everyones help. It is great to have a number of options that result
in the same graph.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Mon, 9/28/09, Henrique Dallazuanna wrote:
> From: Henrique Dallazuanna
> Subject: Re: [R] Data formatti
Data Point",
ylab = "MCP Area",
ylim = c(0,150),
scales = list(tck = c(1, 0)), #Removes tics on top and r-axis
pch=19,cex=.4,
auto.key = list(title = "Mantas", x = .05, y=.95, corner =
c(0,1),border = TRUE)) #Legend
Thanks,
Tim
n you have data that groups in clusters
separated by a large range.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Mon, 9/28/09, Felix Andrews wrote:
> From: Felix Andrews
> Subject: Re: [R] xyplot help - colors and break in plot
> To: "Tim Cla
Did not work!
id<-factor(id,levels=c(7,8,9,4,5,6,1,2,3),lables=letters[1:9])
Your help would be greatly appreciated.
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/list
Peter,
Thanks, that did it!
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Wed, 9/30/09, Peter Ehlers wrote:
> From: Peter Ehlers
> Subject: Re: [R] bwplot scales in alphabetical order
> To: "Tim Clark"
> Cc: r-help@r-project.org
> Date: Wednesd
nd to "100". So I am stuck.
What I want is:
homerange[[1]]$polygons$"100"
What I need is something like the following, but that works:
percent<-c("100","75","50")
p=1
paste(homerange[[1]]$polygons$,percent[p],sep="")
Thanks fo
at is what I am stuck
on. The result should be a vector the values for the "100","75",and "50"
levels, but not the "90" level.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Sat, 10/3/09, David Winsemius wrote:
> From:
ode and couldn't figure
it out. I knew there had to be an easier way.
I greatly appreciate all your help,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Sat, 10/3/09, David Winsemius wrote:
> From: David Winsemius
> Subject: Re: [R] Paste a character to an
similar to what is found on the
CoastWatch web page:
http://oceanwatch.pifsc.noaa.gov/imagery/GA2009281_2009282_sst_2D_eddy.jpg
Thanks!
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
R-help@r-project.org mailing list
https://stat.ethz.ch
Thanks! The colorRampPalette() did just what I need.
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 10/9/09, Barry Rowlingson wrote:
> From: Barry Rowlingson
> Subject: Re: [R] Satellite ocean color palette?
> To: "Tim Clark"
> Cc: r-hel
between min(x) and max(x)).
Mark Hindell asked the same question in 2006
(http://tolstoy.newcastle.edu.au/R/e2/help/06/12/7034.html). I contacted him
and he never found a workable function. Has one been developed since then?
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
1.8 1.212584 -0.30800666
4 809535.2 2190965 2003-05-31 14:14:59 -171.14372 791.1522 809.4516 902
1665046.9 1.783836 0.57125215
5 809364.0 2191756 2003-05-31 14:30:01 302.26979 707.0157 768.9202 900
4169281.4 1.166785 -0.61705039
6 809666.3 2192463 2003-05-31 14:45:01 284.40962 725.21
er=c("A","B"),number=c(1,2))
df3<-data.frame(letter=c("A","B","C","D","E"),number=c(1,2,3,4,5))
df4<-data.frame(letter=c("A","B","C","D","E"),number=c(1,2,3,4,5))
lst<-li
Linlin,
Thanks! That works great!
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Sat, 11/28/09, Linlin Yan wrote:
> From: Linlin Yan
> Subject: Re: [R] Removing objects from a list based on nrow
> To: "Tim Clark"
> Cc: r-help@r-project.org
> Da
Jim,
Good catch! I know in my current problem there are objects with less than 3
rows, but will make sure to modify the function for future use.
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Sun, 11/29/09, Linlin Yan wrote:
> From: Linlin Yan
> Subje
x<-rnorm(100, mean = 50, sd = 50)
y<-rnorm(100, mean = 50, sd = 50)
z<-seq(1,100, by=1)
plot(x,y,pch=16,col=Sat.Pal[z])
legend("topleft",
legend=seq(0,100, by=1),
fill=Sat.Pal[seq(1,101, by=1)],
bty="n",
y.intersp=.5)
I would appreciate any help or suggestions on how
Thanks Jim, that is exactly what I was looking for!
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Sun, 11/29/09, Jim Lemon wrote:
> From: Jim Lemon
> Subject: Re: [R] Continuous legend colors
> To: "Tim Clark"
> Cc: r-help@r-project.org
> Date:
s for
bottom left corner of plot
TR<-unlist(corner.label(x=1,y=1,figcorner=FALSE)) #Coordinates for top
right corner of plot
par(xpd=NA) #Plots to the device region (outer margin)
library(plotrix)
col.labels<-seq(0,100,20)
color.legend(TR[1],BL[2],TR[1]+1,TR[2],col.labels,myc
Peter,
Thanks, layout() does exactly what I want. Now I also realize why I wasn't
able to get the legend where I wanted it. I didn't realize par(xpd=...) was
only for the last plot. That explains why I was getting weird results when
trying to move my legend around!
Aloha,
Tim
and various versions. I think my problem is that the / is a special character
and is telling it something that I don't mean. I would appreciate any
suggestions on how to proceed.
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
attern
> To: "Tim Clark"
> Cc: r-help@r-project.org
> Date: Thursday, May 21, 2009, 11:34 AM
> On May 21, 2009, at 4:13 PM, Tim
> Clark wrote:
>
> >
> > Dear List,
> >
> > I am having a problem using gsub to remove dates from
> a date/time st
]))
{
if ((min(abs(mygarmin$DateTime-myvscan$DateTime[k]))) < minute.diff )
{
index.min.date<-which.min(abs(mygarmin$DateTime-myvscan$DateTime[k]))
myvscan$Latitude[k]<-mygarmin$Latitude[index.min.date]
}}}
I appreciate your help and advice.
Aloha,
Tim
Tim Clark
Department of Zoolog
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 5/22/09, jim holtman wrote:
> From: jim holtman
> Subject: Re: [R] Need a faster function to replace missing data
> To: "Tim Clark"
> Cc: r-help@r-project.org
> Date: Friday, May 22, 200
Many thanks to Jim, Bill, and Carl. Using indexes instead of the for loop gave
me my answer in minutes instead of hours! Thanks for all of your great
suggestions!
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 5/22/09, jim holtman wrote:
> From:
y","Name")
#Create function to plot x and y
myplot<-function() plot(dat$x,dat$y)
#Apply the function to each of the names
par(mfcol=c(2,2))
apply(dat,2,myplot,by=dat$Name) #Does not work - tried various versions
I would like separate plots for Tony, Mike, and Vicky. What
have also tried Chron times() which did not work either. Interestingly,
Sys.time() does produce fractional seconds, so I know the options are working.
I would appreciate your help and suggestions.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
Luc,
Thanks! I was not aware of that package. It looks a lot easier than what I
have been trying to do!
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Tue, 5/26/09, Luc Villandre wrote:
> From: Luc Villandre
> Subject: Re: [R] Creating multiple graphs
Stefan,
Thanks for the suggestion. Lattice works great. You might also want to check
out the ggplot2 package that Luc suggested. They both seem to provide quite a
few more options than the basic graphics package in R.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
here other ways to deal with
just time and not date?
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Tue, 5/26/09, Gabor Grothendieck wrote:
> From: Gabor Grothendieck
> Subject: Re: [R] Problem with fractional seconds
> To: "Tim Clark"
>
n what is going on?
Thanks,
Tim
Tim Clark
Department of Zoology
University of Hawaii
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
5,meters
>44,A,00231,2004-02-04,09:21:04
>44,A,00231,2004-02-04,09:22:53
>44,A,00231,2004-02-04,09:25:32
>44,A,00231,2004-02-04,09:29:31
>44,A,00231,2004-02-04,09:30:05
>43,C,00232,2004-02-04,09:53:25,2.5,meters
>43,C,00232,2004-02-04,09:53:53,1.5,meters
>46,B,00301,2004-0
- Original Message ----
From: Uwe Ligges
To: Tim Clark
Cc: r-help@r-project.org
Sent: Sun, July 18, 2010 6:03:47 AM
Subject: Re: [R] Reading files with varying number of columns
See argument "fill" in ?read.table
Uwe Ligges
On 18.07.2010 12:14, Tim Clark wrote:
> De
3.5), ylim = c(0, 35), yaxs = "i")
boxplot(len ~ dose, data = ToothGrowth, add = TRUE,
boxwex = 0.25, at = 1:3 + 0.2,
subset = supp == "OJ", col = "orange")
legend(2, 9, c("Ascorbic acid", "Orange jui
<-seq(1,20,2)
y<-seq(20,1,-2)
xy<-data.frame(x,y)
xy<-rbind(xy,c(0,0))
#Threeattempts that fail
row.names(xy[11,])<-c("12")
rownames(xy[11,])<-c("12")
attr(xy[11,], "row.names")<-c("12")
Tim Clark
Marine Ecologist
National Park o
,max(mydat$Time)),
yaxt="n",
yaxs="i",
pch=19, cex=.4,
type="n")
par(yaxp=c(as.POSIXct(as.character("02:00"),
format=c("%H:%M")),as.POSIXct(as.character("22:00"), format=c("%H:%M")),5))
axis(2)
Thanks,
Tim
Median :-3358
Mean :-156.1 Mean :19.73 Mean :-3012
3rd Qu.:-155.5 3rd Qu.:20.41 3rd Qu.:-1601
Max. :-155.0 Max. :21.00 Max. : 0
> str(b.depth)
'data.frame': 15328 obs. of 3 variables:
$ x: num -157 -157 -157
, 1, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1)
Tim Clark
Marine Ecologist
National Park of American Samoa
Pago Pago, AS 96799
__
R-help@r-pro
0","11/10/10",
"13/10/10","14/10/10","15/10/10","16/10/10","17/10/10","18/10/10","19/10/10","20/10/10")
x<-strptime(x,"%d/%m/%y")
Thanks!
Tim
Tim Clark
Marine Ecologist
National
Josh,
Great use of rle()! I knew it had to fit in there somewhere! Thanks for the
help!
Tim
Tim Clark
Marine Ecologist
National Park of American Samoa
Pago Pago, AS 96799
- Original Message
From: Joshua Wiley
To: Tim Clark
Cc: r help r-help
Sent: Wed, November 10, 2010 7:45
100 to give larger range. Max is 3.1415, rounded up to 3.15 plus one.
col.labels<-round((seq(0,5000,length.out=5)/1000),1)
plot(0, 0, type="n", axes=F, xlab="", ylab="") #New plot for legend
color.legend(0,0,1,1,col.labels, mycol, align="rb&
Thanks, I will take it up with MS. I just downloaded their latest converter
and that hasn't fixed the issue. Hopefully they will have additional advice.
Aloha,
Tim
Tim Clark
Marine Ecologist
National Park of American Samoa
Pago Pago, AS 96799
Dear List,
I have read and read and still don't get why I am getting a memory issue. I am
using a Samsung PC running Windows 7. I have set memory in the target field:
"C:\Program Files (x86)\R\R-2.11.1\bin\Rgui.exe" --max-mem-size=3G
But when I try a simple plot I get:
> plot(mydat$Date,my
70 15509
17112
17136 17159 17209 17239 17266 21527 ...
I didn't properly convert date and time using chron. Not sure how R plots
factor levels, but obviously it has problems with it!
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
- Original Message
From
Brian,
glm.convert() does exactly what I am wanting. Thanks for putting it in MASS.
Sorry about not giving credit. It is a great package and I keep finding
functions that make statistical programming easy!
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Mon, 5/3
0.818563
#I then try to plot the data and it plots it in alphabetical instead of
#numeric order
library(lattice)
barchart(y~x, data=xy)
Why are the rows not re-indexed, and how do I get barchart() to plot my data in
increasing numeric order?
Thanks,
Tim
Tim Clark
Department of Zoology
U
Greg,
Thanks for the great explanation. Knowing the philosophy behind these kind of
things really helps avoid problems in the future.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Thu, 5/6/10, Greg Snow wrote:
> From: Greg Snow
> Subject: RE: [R] bar
site*year+cosmonth+coslunar+sinlunar+plankton,
data=mydata))
m124567<-glm.convert(glm.nb(mantas~site*year+sinmonth+coslunar+sinlunar+plankton,
data=mydata))
m134567<-glm.convert(glm.nb(mantas~site+cosmonth+sinmonth+coslunar+sinlunar+plankton,
data=mydata))
Thanks to everyone for the replies and functions. For some reason my emails
are not going to the thread. I just switched to the newer mail version for my
yahoo account, so hopefully this one will get posted.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii
69 matches
Mail list logo