Hello everyone, In geology we often do rose diagrams showing the number of features along a certain compass direction within a given range (bin) of angle (0-180 degrees). I was wondering if anybody has had experience with this in R and if they could recommend a package. I looked at the circular package but it seems to deal only in radian and we normally use degrees. I've also looked a little at openair being rose diagrams are often used for wind directions. Any suggestions / guidance would be greatly appreciated. Thank you for your time. David Doyle
Rose Diagrams for Geology
7 messages · David L Carlson, David Winsemius, David Doyle +2 more
Look at circular more carefully. It accepts both degrees and radians, but you have to create a circular object with circular() to specify what kind of circular data you have. Then you can plot and get circular statistics on your data. ------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of David Doyle Sent: Tuesday, November 18, 2014 3:42 PM To: r-help at r-project.org Subject: [R] Rose Diagrams for Geology Hello everyone, In geology we often do rose diagrams showing the number of features along a certain compass direction within a given range (bin) of angle (0-180 degrees). I was wondering if anybody has had experience with this in R and if they could recommend a package. I looked at the circular package but it seems to deal only in radian and we normally use degrees. I've also looked a little at openair being rose diagrams are often used for wind directions. Any suggestions / guidance would be greatly appreciated. Thank you for your time. David Doyle ______________________________________________ R-help at 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 commented, minimal, self-contained, reproducible code.
On Nov 18, 2014, at 1:42 PM, David Doyle wrote:
Hello everyone, In geology we often do rose diagrams showing the number of features along a certain compass direction within a given range (bin) of angle (0-180 degrees). I was wondering if anybody has had experience with this in R and if they could recommend a package. I looked at the circular package but it seems to deal only in radian and we normally use degrees. I've also looked a little at openair being rose diagrams are often used for wind directions. Any suggestions / guidance would be greatly appreciated.
Learn to search, Grasshopper.
Choose one of:
-----------------
install.packages("sos")
library(sos)
findFn("rose diagram")
found 19 matches; retrieving 1 page Downloaded 14 links in 9 packages.
unique( findFn("rose diagram")$Package )
found 19 matches; retrieving 1 page Downloaded 14 links in 9 packages. [1] "circular" "GEOmap" "oce" "CircStats" "plotrix" "HistData" [7] "climatol" "openair" "xergm" -------------- OR use Rseek.org ------------ OR http://stackoverflow.com/search?q=[r]+rose+diagram
> > Thank you for your time. > David Doyle > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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 commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA
Thank you to David and David for their help. The code below generated what
I needed.
library(circular)
mydata <- read.table("http://doylesdartden.com/R/Joints.csv", header=TRUE,
sep=",",)
x <- circular(mydata$JointsRad)
rose.diag(x,
#Set point character to use
pch = 20,
#sets font size
cex = 1,
#parameter that controls the size of the circle.
#1= default <1 makes it larger > makes it smaller
shrink = 1,
#the color for filling the rose diagram.
col=2,
prop = 2,
# number of bins. 36 = 10 degrees each. 18 = 20 degree each
bins=36,
# Ticks showing bins
ticks=TRUE,
# Unites.
units="degrees",
# list main title
main="Rose Diagram of XXX")
# for more info see
http://www.inside-r.org/packages/cran/circular/docs/rose.diag
Example of my data
JointsDegrees JointsRad
30 0.523598776
34 0.593411946
35 0.610865238
35 0.610865238
37 0.645771823
37 0.645771823
On Tue, Nov 18, 2014 at 5:16 PM, David Winsemius <dwinsemius at comcast.net>
wrote:
On Nov 18, 2014, at 1:42 PM, David Doyle wrote:
Hello everyone, In geology we often do rose diagrams showing the number of features
along a
certain compass direction within a given range (bin) of angle (0-180 degrees). I was wondering if anybody has had experience with this in R
and
if they could recommend a package. I looked at the circular package but it seems to deal only in radian and
we
normally use degrees. I've also looked a little at openair being rose diagrams are often used
for
wind directions. Any suggestions / guidance would be greatly appreciated.
Learn to search, Grasshopper.
Choose one of:
-----------------
install.packages("sos")
library(sos)
findFn("rose diagram")
found 19 matches; retrieving 1 page Downloaded 14 links in 9 packages.
unique( findFn("rose diagram")$Package )
found 19 matches; retrieving 1 page Downloaded 14 links in 9 packages. [1] "circular" "GEOmap" "oce" "CircStats" "plotrix" "HistData" [7] "climatol" "openair" "xergm" -------------- OR use Rseek.org ------------ OR http://stackoverflow.com/search?q=[r]+rose+diagram --
Thank you for your time.
David Doyle
[[alternative HTML version deleted]]
______________________________________________ R-help at 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 commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA
2 days later
On Tue, 18 Nov 2014 22:06:03 -0600
David Doyle <kydaviddoyle at gmail.com> wrote:
Thank you to David and David for their help. The code below
generated what I needed.
library(circular)
mydata <- read.table("http://doylesdartden.com/R/Joints.csv",
header=TRUE, sep=",",)
x <- circular(mydata$JointsRad)
rose.diag(x,
#Set point character to use
pch = 20,
#sets font size
cex = 1,
#parameter that controls the size of the circle.
#1= default <1 makes it larger > makes it smaller
shrink = 1,
#the color for filling the rose diagram.
col=2,
prop = 2,
# number of bins. 36 = 10 degrees each. 18 = 20 degree
each bins=36,
# Ticks showing bins
ticks=TRUE,
# Unites.
units="degrees",
# list main title
main="Rose Diagram of XXX")
# for more info see
http://www.inside-r.org/packages/cran/circular/docs/rose.diag
I've been following this thread with some interest. One problem that I might have with the code above is that as it is, the plot is labeled with 0-deg to the left, and numbered counter clockwise (standard trigonometric format). Most field mapping data I have collected has been either in quadrant form (rarely) or more commonly in azimuthal form (0-360 degrees order clockwise from the top). Is that an issue? jwdougherty
No. Just use the circular() function to specify that your data are in degrees and clockwise and the graph will be labeled that way. David C (I was beginning to think that this thread was only for Davids). -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of jwd Sent: Friday, November 21, 2014 1:58 AM To: r-help at r-project.org Subject: Re: [R] Rose Diagrams for Geology On Tue, 18 Nov 2014 22:06:03 -0600
David Doyle <kydaviddoyle at gmail.com> wrote:
Thank you to David and David for their help. The code below
generated what I needed.
library(circular)
mydata <- read.table("http://doylesdartden.com/R/Joints.csv",
header=TRUE, sep=",",)
x <- circular(mydata$JointsRad)
rose.diag(x,
#Set point character to use
pch = 20,
#sets font size
cex = 1,
#parameter that controls the size of the circle.
#1= default <1 makes it larger > makes it smaller
shrink = 1,
#the color for filling the rose diagram.
col=2,
prop = 2,
# number of bins. 36 = 10 degrees each. 18 = 20 degree
each bins=36,
# Ticks showing bins
ticks=TRUE,
# Unites.
units="degrees",
# list main title
main="Rose Diagram of XXX")
# for more info see
http://www.inside-r.org/packages/cran/circular/docs/rose.diag
I've been following this thread with some interest. One problem that I might have with the code above is that as it is, the plot is labeled with 0-deg to the left, and numbered counter clockwise (standard trigonometric format). Most field mapping data I have collected has been either in quadrant form (rarely) or more commonly in azimuthal form (0-360 degrees order clockwise from the top). Is that an issue? jwdougherty ______________________________________________ R-help at 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 commented, minimal, self-contained, reproducible code.
Most field mapping data I have collected has been either in quadrant form (rarely) or more commonly in azimuthal form (0-360 degrees order clockwise from the top).
You can specify that when making the 'circular' object, by using the zero and roation arguments. Compare the plots made by the following: par(mfrow=c(1,2)) A <- circular(rep(seq(0, 180, len=11), c(1:11)), units="degrees", zero=pi/2, rotation="clock") rose.diag(A) B <- circular(rep(seq(0, 180, len=11), c(1:11)), units="degrees") rose.diag(B) Bill Dunlap TIBCO Software wdunlap tibco.com
On Thu, Nov 20, 2014 at 11:57 PM, jwd <jwd at surewest.net> wrote:
On Tue, 18 Nov 2014 22:06:03 -0600 David Doyle <kydaviddoyle at gmail.com> wrote:
Thank you to David and David for their help. The code below
generated what I needed.
library(circular)
mydata <- read.table("http://doylesdartden.com/R/Joints.csv",
header=TRUE, sep=",",)
x <- circular(mydata$JointsRad)
rose.diag(x,
#Set point character to use
pch = 20,
#sets font size
cex = 1,
#parameter that controls the size of the circle.
#1= default <1 makes it larger > makes it smaller
shrink = 1,
#the color for filling the rose diagram.
col=2,
prop = 2,
# number of bins. 36 = 10 degrees each. 18 = 20 degree
each bins=36,
# Ticks showing bins
ticks=TRUE,
# Unites.
units="degrees",
# list main title
main="Rose Diagram of XXX")
# for more info see
http://www.inside-r.org/packages/cran/circular/docs/rose.diag
I've been following this thread with some interest. One problem that I might have with the code above is that as it is, the plot is labeled with 0-deg to the left, and numbered counter clockwise (standard trigonometric format). Most field mapping data I have collected has been either in quadrant form (rarely) or more commonly in azimuthal form (0-360 degrees order clockwise from the top). Is that an issue? jwdougherty
______________________________________________ R-help at 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 commented, minimal, self-contained, reproducible code.