search for: tonightsthenight

Displaying 20 results from an estimated 43 matches for "tonightsthenight".

2008 Jul 06
4
Numbers as Points in Graphs
I am trying to produce a simple plot where the points in the plot are actually integers from my data. That is, I am making a length/width plot and I would like the points, rather dots or triangles, appear as different numbers corresponding to a column in my data. I have tried using this: ...,pch="column title" but this merely returns the first letter of the column title, B. Is there
2012 Jun 11
2
Define a variable on a non-standard year interval (Water Years)
Hello, I am trying to define a different interval for a "year". In hydrology, a "water year" is defined as the period between October 1st and September 30 of the following year. I was wondering how I might do this in R. Say I have a data.frame like the following and I want to extract a variable with the water year specs as defined above:
2008 Jul 01
2
Graph Order in xyplot
I have constructed a Trellis style xyplot. lengthf <- factor(length) xyplot(SLI$velocity ~ SLI$width | SLI$lengthf, layout = c(2,7), xlab = "Width (cm)", ylab = "Velocity (m/s^2)", col = "black") This produces a lovely little plot. However, the grouping factor(lengthf) isn't in the right order. My values range from 2-28 and the 2 graph on the bottom left and
2010 Mar 12
5
Vertical subtraction in dataframes
Hello all, I have not been able to find an answer to this problem. I feel like it might be so simple though that it might not get a response. Suppose I have a dataframe like the one I have copied below (minus the 'calib' column). I wish to create a column like calib where I am subtracting the 'Count' when 'stain' is 'none' from all other 'Count' data for
2010 Jul 22
3
Hydrology plots in R
Hello, I am trying to create a plot often seen in hydrodynamic work than includes a contour plot representing the water speed with arrows pointing in the direction of flow. Does anyone have any idea how I might add arrows based on wf$angle (in the example below) to the plot below? Thanks in advance! Sam library(lattice) speed <- runif(100, 0, 20) wf <- data.frame(speed) wf$width <-
2012 Jan 27
3
Subsetting for the ten highest values by group in a dataframe
Hello, I am looking for a way to subset a data frame by choosing the top ten maximum values from that dataframe. As well this occurs within some factor levels. ## I've used plyr here but I'm not married to this approach require(plyr) ## I've created a data.frame with two groups and then a id variable (y) df <- data.frame(x=rnorm(400, mean=20), y=1:400,
2009 Nov 06
1
Web implementation of R?
Hello, Can anyone recommend a good example of web implementation of R? Can't seem to find anything on my own. Thanks in advance! Sam [[alternative HTML version deleted]]
2012 Apr 13
1
Displayed Date Format in Plot Title.
Hello all, I can't seem to figure out how to format a date as a title. I have something like this: plot(x=1:10, y=runif(10,1,18), main=paste(as.Date("2011-05-03", format="%Y-%m-%d"))) ## When I would really like this plot(x=1:10, y=runif(10,1,18), main=paste("May-03-2011")) ## I thought to try this but that produces an NA. plot(x=1:10, y=runif(10,1,18),
2012 Feb 01
1
Combining month and year into a single variable
Hello all, ## I am trying to convert some year and month data into a single variable that has a date format so I can plot a proper x axis. ## I've made a few tries at this and search around but I haven't found anything. I am looking for something of the format "%Y-%m" ## A data.frame df <- data.frame(x=rnorm(36, 1, 10), month=rep(1:12, each = 3), year=c(2000,2001,2002)) ##
2012 Mar 27
1
Convert day of year back into a date format.
Hello, I am having trouble figuring out how to convert a Day of Year integer back into a Date format. For example I have the following: date <- c('2008-01-01','2008-01-02','2008-01-03','2008-01-04','2008-01-05','2008-01-06','2008-01-07',
2008 Jul 09
3
Grid building in R
This might not possible in R but I thought I would give it shot. I am have to set up a 40 x 40 cm grid of 181 points equidistant from each other. Is there any way to produce a graph with R that can do this for me? Actual sizes are unimportant as long it is to scale. Thanks -- View this message in context: http://www.nabble.com/Grid-building-in-R-tp18371874p18371874.html Sent from the R help
2012 May 29
1
Extract time from irregular date and time data records
Hello, I am having a problem making use of some data outputted from an instrument in a somewhat weird format. The instrument outputs two columns - one called JulianDay.Hour and one called Minutes.Seconds. I would like to convert these columns into a single column with a time. So I was using substr() and paste to extract that info. This works fine for the JulianDay.Hour column as there are always
2010 Feb 20
3
Error Bars in lattice- barcharts
Hello, I am attempting to write a script that adds error bars to a barchart. I basing my attempt heavily on the following thread: http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2791.html I can't seem to get around the problem that was discussed in the thread. The following example should illustrate my problem. Sorry about the messy example but I am 1) trying to make it as close as possible
2012 Jun 01
1
Drop values of one dataframe based on the value of another
Hello all, Let me first say that this isn't a question about outliers. I am using the outlier function from the outliers package but I am using it only because it is a convenient wrapper to determine values that have the largest difference between itself and the sample mean. Where I am running into problems is that I am several groups where I want to calculate the "outlier" within
2012 Mar 19
1
Lag based on Date objects with non-consecutive values
Hello all, I need to figure out a way to lag a variable in by a number of days without using the zoo package. I need to use a remote R connection that doesn't have the zoo package installed and is unwilling to do so. So that is, I want a function where I can specify the number of days to lag a variable against a Date formatted column. That is relatively easy to do. The problem arises when I
2012 Jan 19
3
Establishing groups using something other than ifelse()
Hello all, This is one of those "Is there a better way to do this questions". Say I have a dataframe (df) with a grouping variable (z). This is my base data. Now I know that there is a higher order level of grouping that exist for my group variable. So what I want to do is create a new column that express that higher order level of grouping based on values in the sub-group (z in this
2010 Apr 03
2
Using ifelse and grep
Good Morning, I am trying to create a new column of character strings based on the first two letters in a string in another column. I believe that I need to use some combination of ifelse and grep but I am not totally sure how to combine them. I am not totally sure why the command below isn't working. Obviously it isn't finding anything that matches my criteria but I am not sure why. Any
2011 Aug 15
2
Alternative and more efficient data manipulation
Hello list, ## I have been doing the following process to convert data from one form to another for a while but it occurs to me that there is probably an easier way to do this. I am often given data that have column names which are actually data and I much prefer dealing with data that are sorted by factors. So to convert the columns I have previously made use of make.groups() in the lattice
2011 Aug 25
1
Specifying argument values in a function
Hello all, I am trying write a fairly simple function that provide a quick way to calculate several distributions for a data set. I am trying to provide a function that has a argument that specifies which distribution is outputted (here "norm" or "cumu"). I also have a melt argument but that seems to be working fine. I have been able to get my function working well for just
2009 Nov 13
2
linear model and by()
Hello R list, This is a question for anyone who has used the by() command. I would like to perform a regression on a data frame by several factors. Using by() I think that I have able to perform this using the following: > lm.r <- by(master, list(Sectionf=Sectionf, startd=startd), function(x) lm (tot.c ~ starttime, data = x)) So that is, I would like to perform separate regressions for