similar to: Using aggregate() and apply() on circular data

Displaying 20 results from an estimated 6000 matches similar to: "Using aggregate() and apply() on circular data"

2008 Jan 08
1
Range of circular data
I want to get the minimum arc (in degrees) needed to include a set of compass directions. I would like to use the range.circular() function of the package circular, because that package understands a compass-type of angle convention, but it gives results I don't understand. Howver, I can get the correct answer in the example below, 90 degrees, using the CircStats package. How can I make the
2005 May 16
1
Omitting NAs in aggregate.ts()
I have a time series vector (not necessarily ts class) that has NAs in it. How can I omit the NAs when using aggregate.ts() to compute a function on each window? If there is at least one non-NA value in each window, I'd like to proceed with evaluating the function; otherwise, I would like NA returned. I'm not wedded to aggregate.ts and don't need ts class if there is another fast,
2009 Sep 03
1
Output from as.windrose() in oce package baffles me
I'm having trouble understanding the output from as.windrose(). For one thing, data on a boundary between sectors seem to be left out of the counts. I assume that explains the missing point in the output below (angle 45). Shouldn't one side of each sector interval be open, to include values such as my 45 in the example? Also, why does the angle 180 in my input apparently not result in
2010 Feb 19
3
plot circular histogram
In conducting studies of animal orientation and displacement, I need to produce circular histograms of angles (bearings in radians 0-2pi) where the centre of the circle indicates very few observations for a given bin of angles and outwardly concentric circles indicate greater frequencies of observations for a given bin of angles. I'd like not to have to write the function myself but I
2008 Nov 12
1
rimage doesn't install on Mac OS X 10.4
Hi, I'm trying to install rimage on a Mac OS X 10.4 machine. I followed the advice in previous R-help threads and got over the hurdles of having the header files in the right places, among other things. But I can't figure out what to do with this error. ice.pnl.gov:/home/waichler<949>system_profiler -detailLevel mini SPSoftwareDataType Software: System Software Overview:
2004 May 03
1
circular correlation
I have a problem that deals with correlating wind velocity to seed collection data. The problem lies in that I have a wind data set that is contains 2000+ data points and weed collection data on the order of a couple hundred. Both data sets were collected for the same time period, but there is not a one-to-one wind velocity->seed location match. My understanding of correlation is that you
2002 Mar 27
0
Re: RE Vertical bars with barchart()
Hi, [I'mm cc-ing r-help on this, since some others might be interested (Tony Rossini is, at least)] Yes, I saw your mail and was wondering about what would be the best approach to do it. It's definitely not trivial, mainly because Trellis is not designed to handle factors on the x-axis (chiefly for convenience, as factors typically have long names which are difficult to write on the
2003 Nov 13
1
Can't get Sweave syntax highlighting with Emacs
I can't get Emacs to automatically do syntax highlighting of Sweave files. I have followed Friedrich's suggestion for code to insert into my .emacs file. The complete section from my .emacs file is given below. When I load a *.Snw file, font is white until I press M-x, then the first code and document chunks get highlighted, but not the rest of the file. Latex and Noweb menus are
2009 Mar 10
0
Alternative to interp.surface() offered
I wanted a simple function for bilinear interpolation on a 2-D grid, and interp.surface() in the fields package didn't quite suit my needs. In particular, it requires uniform spacing between grid points. It also didn't have the "visual" reference frame I was looking for. Here is an alternative function, followed by an example. # A function for bilinear interpolation on a 2-d
2002 Jan 31
1
Example scripts for trellis graphs
How can I access examples of trellis graphs in R? I'm especially interested in getting code for xyplot() examples. Failing a collection of examples in R, I see that under Splus there are numerous example.*() functions. I can access Splus with a command line but can't open a graphics window, so I can't to execute the example.*() functions. Is there a way I could get the associated
2007 Apr 25
2
levelplot and unequal cell sizes
I am using levelplot() from lattice with grids that have unequal cell sizes. This means that the boundary between two cells is not always half-way between nodes, as levelplot() assumes. The result is that some cell sizes are rendered incorrectly, which can be painfully obvious if using relatively large cells. Is there any work-around? I am using the conditioning capability of lattice and
2010 Apr 20
1
bug in aggregate.ts
Hi, I am getting unexpected behaviour from aggregate.ts(). The 'ndeltat' argument is effectively being reduced by 1 in some cases, even when it is an integer, with the result that the blocks to be aggregated are not of the expected size, and also that the end() of the aggregated series is much later than the end() of the original series. rawts <- ts(rep(1:10, each = 5), start = 1) ##
2004 Dec 16
2
Unsightly lines from x*y grid in levelplot with Postscript
When I generate levelplot figures with Postscript, the lines from the underlying grid (i.e., the x and y in z ~ x* y) show up as faint white lines in the output. If I have a dense grid, the lines wash out the contour colors. I can avoid the problem if I use png instead, but that brings up other problems. Any ideas for how I can get Postscript to not show those lines around the cells? Scott
2008 Oct 13
2
Using an image background with graphics
I would like to use a map or aerial photo as a background to plotting solid lines and text, and semi-transparent color contours, in base and lattice graphics. Plot coordinates need to be consistent with the georeferenced background. For example, a color contour plot would have an gray-toned aerial photograph as a background for overprinted semi-transparent color contours of some spatially
2006 Jan 14
2
change lattice panel background color
I can't find a way to change just the panel background color in lattice. I would like NA regions in levelplot() to appear black. I've tried the trellis.par.set() stuff, but it it makes the background of the whole graphic black. Thanks, Scott Waichler Pacific Northwest National Laboratory scott.waichler _at _ pnl.gov
2003 Feb 21
1
calculating mean direction (CircStats)
Hi, I've currently to work with some circular data. Unfortunately I'm not very familiar with circular statistics and would really appreciate if I could get some help concerning the CircStats package this way. My data lies in the range 0 to 2*pi, and is transformed to radians (as expected by the CircStats methods). Calculating the mean direction (circ.mean) results for some datasets in a
2002 Feb 06
1
dev.off() prematurely stops xyplot()
I have a script containing an xyplot() to print to a postscript file, followed by dev.off(). When I source the script, the dev.off() seems to cut off the xyplot() execution before it is finished. The resulting postscript file has about the right size, but it appears blank when I try to view it. If I manually execute the xyplot(), then wait for the return of the R prompt before executing
2002 Nov 08
0
Polar plot, circular plot (angular data): II
Dear R-users, As noted by Paul Murrell < p.murrell at auckland.ac.nz > there is errors in the code for polar plotting I send to R-help under the title "Polar plot, circular plot (angular data)" at Thu Oct 17 2002 - 12:18:20 CEST. Thanks! I have reorganized the code into a structure ('pp'). This allows plots to be modified to a greater extent by passing arguments by ...
2003 Dec 19
1
Different scales for keys in lattice levelplots
Can anyone tell me how to obtain a custom scale for the colorkey in each levelplot of a lattice? I am using lattice and levelplot to plot z = f(x, y) for multiple z variables. x and y values are the same across plots, but units for z are different and therefore I need to create a custom scale for each plot's key. It follows that I need to place each plot's key inside that plot's
2005 Apr 22
3
Problem with R-2.1.0: install.packages() doesn't work
I installed R-2.1.0 from source on a Linux box running Red Hat Enterprise Linux WS release 4 but install.packages() wouldn't work (see below). When I install R-2.0.1 from RPM on the same system, everything is fine. Version 2.1.0 (2005-04-18), ISBN 3-900051-07-0 . . . > options(CRAN = "http://cran.fhcrc.org/") > install.packages("rgenoud") --- Please select a CRAN