Displaying 20 results from an estimated 41 matches for "mudiver1200".
2009 May 26
4
Creating multiple graphs based on one variable
Dear List,
I would like to create several graphs of similar data. I have x and y values for several different individuals (in this case fish). I would like to plot the x and y values for each fish separately. I can do it using a for loop, but I think I should be using "apply". Please let me know what I am doing wrong, or if there is a "better" way to do this. What I have
2009 May 26
2
Problem with fractional seconds
Dear List,
I am having problems converting a file with fractional seconds to class POSIXct. I have set my options to include digits.secs and my format to just time, but my output is the current date with my time lacking the fractions of a second. For example:
options(digits.secs=3)
t<-c("06:00:00.100","06:00:01.231")
myt<-as.POSIXct(t,format="%H:%M:%S")
2009 Oct 09
4
Satellite ocean color palette?
Dear List,
Is there a color palette avaliable similar to what is used in satellite ocean color imagery? I.e. a gradient with blue on one end and red on the other, with yellow in the middle? I have tried topo.colors(n) but that comes out more yellow on the end. I am looking for something similar to what is found on the CoastWatch web page:
2009 May 22
5
Need a faster function to replace missing data
Dear List,
I need some help in coming up with a function that will take two data sets, determine if a value is missing in one, find a value in the second that was taken at about the same time, and substitute the second value in for where the first should have been. My problem is from a fish tracking study. We put acoustic tags in fish and track them for several days. Location data is supposed
2008 Nov 07
2
Faster way to combine data sets with different date ranges
I am trying to combine two data sets, one with daily values and one with weekly values. SurveyData conatins environmental data collected on a daily basis. sat.data contains satellite sea surface temperature that is an average of satellite measurements over a six day period. I would like to combine the two files so that my output file has the daily dates from SurveyData and the weekly average
2009 Aug 13
3
Finding minimum of time subset
Dear List,
I have a data frame of data taken every few seconds. I would like to subset the data to retain only the data taken on the quarter hour, and as close to the quarter hour as possible. So far I have figured out how to subset the data to the quarter hour, but not how to keep only the minimum time for each quarter hour.
For example:
2009 Sep 28
2
Data formatting for matplot
Dear List,
I am wanting to produce a multiple line plot, and know I can do it with matplot but can't get my data in the format I need. I have a dataframe with three columns; individuals ID, x, and y. I have tried split() but it gives me a list of matrices, which is closer but not quite what I need. For example:
id<-rep(seq(1,5,1),length.out=100)
x<-rnorm(100,5,1)
2010 Dec 12
4
legend not appearing in Word document
I need help with using graphics in Word 2007 that will later be converted into a
pdf document.? I have tried several formats and found that?I get the best
quality of graphics using .wmf, .eps format, but when I convert it to .pdf I get
a bunch of lines across the figures.? I also tried .tiff and .png but they give
me much lower quality.? The best quality that converts to pdf appears to be
2010 May 19
8
Generating all possible models from full model
Is there a function that will allow me to run all model iterations if I specify a full model? I am using information criteria to choose between possible candidate models. I have been writing out all possible model combinations by hand, and I am always worried that I am missing models or have made a mistake somewhere. It is also difficult to alter models if I want to change a term. For example,
2008 Nov 04
1
Combining many files into one
I have a few hundred .csv files in a folder on my hard drive, and I would like to combine them all into one file. They are all the same data, but the program that collected the data saved a file every 4 hours. I can combine the files one at a time using rbind, but am having a problem automating it in a for loop. The loop runs for a while, and finally gives an error message "no lines
2010 Apr 21
1
Best subset of models for glm.nb()
Dear List,
I am looking for a function that will find the best subset of negative binomial models. I have a large data set with 15 variables that I am interested in. I want an easy way to run all possible models and find a subset of the "best" models that I can then look at in more detail. I have found two functions that seem to provide what I am looking for, but am not sure which
2010 Nov 11
1
Count continuous dates
Dear List,
I have a series of dates and I am needing to know the greatest length of
continuous dates - i.e. the number of dates before a break in the series.? For
example, below there are three continuous series of dates with lengths 4, 6, and
8.? How can I count the number of continuous dates?? rle() will do it for
constant integers, but I can't figure a way to modify it for continuous
2009 Mar 21
1
Goodness of fit for negative binomial model
Dear r list,
I am using glm.nb in the MASS package to fit negative binomial models to data on manta ray abundance, and AICctab in the bbmle package to compare model IC. However, I need to test for the goodness of fit of the full model, and have not been able to find a Pearson's Chi Squared statistic in any of the output. Am I missing it somewhere? Is there a way to run the test using
2009 May 21
2
help with gsub and date pattern
Dear List,
I am having a problem using gsub to remove dates from a date/time string.
For example:
x<-c("5/31/2009 12:34:00","6/1/2009 1:14:00")
I would like to remove the date and have just the time.
I have tried:
gsub("[0-9+]/[0-9+]/[0-9+]","",x)
and various versions. I think my problem is that the / is a special character and is telling it
2010 Feb 19
1
r help date format changes with c() vs. rbind()
Dear List,
I am having a problem with dates and I would like to understand what is going on. Below is an example. I can produce a date/time using as.POSIXct, but I am trying to combine two as.POSIXct objects and keep getting strange results. I thought I was using the wrong origin, but according to structure(0,class="Date") I am not (see below). In my example a is a simple date/time
2010 Sep 27
2
Adding row name to dataframe
Dear all,
I am trying to add a value to a dataframe and name the row with a number.? I
have tried row.name, rowname, and attr(x,"row.names") but none seem to work.? It
seems like it should be simple, so not sure why I can't get it to work.? Any
suggestions?
Thanks,
Tim
x<-seq(1,20,2)
y<-seq(20,1,-2)
xy<-data.frame(x,y)
xy<-rbind(xy,c(0,0))
#Threeattempts that
2009 Feb 18
1
using stepAIC with negative binomial regression - error message help
Dear List,
I am having problems running stepAIC with a negative binomial regression model. I am working with data on manta ray abundance, using 20 predictor variables. Predictors include variables for location (site), time (year, cos and sin of calendar day, length of day, percent lunar illumination), oceanography (sea surface temp mean and std, sea surface height mean and std), weather (cos
2008 Oct 29
1
Subsetting data in a loop
I need some help with sub-setting my data. I am trying to divide a data frame into multiple data frames based on the year collected, and stored in a list with each new data frame labeled with "year X" where X is the year the data was collected. When I run my current code I get nine error messages stating
"In one_year[name] <- myear : number of items to replace is not a
2010 May 03
2
Estimating theta for negative binomial model
Dear List,
I am trying to do model averaging for a negative binomial model using the package AICcmodavg. I need to use glm() since the package does not accept glm.nb() models. I can get glm() to work if I first run glm.nb and take theta from that model, but is there a simpler way to estimate theta for the glm model? The two models are:
mod.nb<-glm.nb(mantas~site,data=mydata)
2009 Sep 28
1
xyplot help - colors and break in plot
Dear List,
I am new to lattice plots, and am having problems with getting my plot to do what I want. Specifically:
1. I would like the legend to have the same symbols as the plot. I tried simpleKey but can't seem to get it to work with autoKey. Right now my plot has dots (pch=19) and my legend shows circles.
2. I have nine groups but xyplot seems to only be using seven colors, so two