search for: radians

Displaying 20 results from an estimated 64 matches for "radians".

Did you mean: radiant
2011 Jan 20
1
Generating time progressing line for Google Earth
...ail for large distances, as the generated lines are nowhere near being straigth (run the code to see the example). My R code so far: ############ #---LIBS---# ############ library(brew) ############################### #---GREAT CIRCULAR DISTANCE---# ############################### #degrees to radians Radians <- function (degree) { radian = degree * (pi/180.0) return(radian) } #radians to degrees Degrees <- function (radian) { degree = radian * (180.0/pi) return(degree) } # Calculates the distance between two points using the # Spherical Law of Cosines gcd.slc <- funct...
2009 Sep 03
1
Output from as.windrose() in oce package baffles me
...for the output for 180? The $data$theta value of 180 refers to a sector centered at 180 whose angle is 90, correct? library(oce) # azimuths <- c(22.5, 45, 90, 180, 270) # 0 and 360=north, 90=east, 180=south, 270=west angles <- c(67.5, 45, 0, 270, 180) # geometric equivalents of azimuths radians <- angles * pi /180 x <- round(cos(radians), 6) y <- round(sin(radians), 6) w <- as.windrose(x, y, dtheta = 90) # make a windrose object, oce package # part of windrose object w: $data$theta [1] 90 180 270 360 $data$count [1] 1 0 1 1 Thanks, Scott Waichler Pacific Northwest National...
2012 Feb 07
2
units for mapproject() function result
Does anyone know what the units are for projected coordinates obtained using mapproj's mapproject function with an Albers projection? Thanks for any and all help! Buck Stockhausen *************************************************** * Dr. William T. Stockhausen * *************************************************** * Resource Ecology and Fisheries Management * *
2012 Sep 02
1
why variations in accuracy between R to ARCGIS for the same point reprojection?
...same map, they are off by few meters in the tropics by up to 40km in the poles. I decided to investigate how the reprojections are done and my calculations are different from both R and ArcGis: First, I calculated the radious of the Earth in two different ways: =Re * (1 - e^2)/ (1 - e^2 *SIN(RADIANS(Latitude))^2)^(3/2) =Re * SQRT(1 - e^2) / (1 - e^2 * (SIN(RADIANS(Latitude)))^2) where Re is the radius of the Earth at the tropics(6378km) and e is the eccentricity of the ellipsoid (0.081082). According to several books I used, the position of a point in the Y-axis in the Berhmann projectio...
2006 Jun 18
3
ActiveRecord Help - Not finding Data
...@zip1 = Zipcode.find(:first, :conditions => ["zip = ?", zip]) lat = @zip1.latitude.to_f long = @zip1.longitude.to_f radius = 50 @bookstores = Bookstore.find_by_sql ["SELECT * FROM bookstores WHERE zipcode IN ( SELECT zip FROM zipcodes WHERE degrees(acos( sin( radians(zipcodes.latitude) ) * sin( radians(?)) + cos( radians(zipcodes.latitude)) * cos( radians(?)) * cos( radians(zipcodes.longitude - ?) ) ) ) * 69.09 < ?)", lat, lat, long, radius.to_i] end This is a proximity search by zip code. The problem is on the view which has this code: &lt...
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 haven't found exactly what I am l...
2013 Oct 08
2
[LLVMdev] What makes register allocation expensive?
Compile times increased by roughly 20X after upgrading the Radian compiler project from LLVM 3.1 to 3.3. I am curious whether this is considered normal. If it is not, I would appreciate some help figuring out what it is about the Radian compiler's output which is causing LLVM to spend so much time compiling such small programs. I recorded these times with Apple's Xcode Instruments
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 negative mean direction like -0.8309982. I think that this might be wrong. If it is correct, what is the meaning of a negative mean direction? I also read that some transformation of t...
2013 Mar 05
2
Function completely locks up my computer if the input is too big
...machine with 4 mb RAM. In the meantime I suppose I'll write a loop to do this function piece-wise for larger data and see if that helps. Script is attached and appended below. Thanks Ben Caldwell #compass to polar coordinates compass2polar <- function(x) {-x+90} #degrees (polar) to radians Deg2Rad <- function(x) {(x*pi)/180} # radians to degrees Rad2Deg <- function (rad) (rad/pi)*180 # polar to cartesian coordinates - assumes degrees those from a compass. output is a list, x & y of equal length Pol2Car <- function(distance,deg) { rad <- Deg2Rad(compass2pola...
2010 Sep 02
3
Simultaneous equations
...What I am trying to do is solve a non linear simultaneous equations... Could anyone give me an example (please) of the code that would be needed to return solutions for the following system using systemfit (or any other better package): y=1/x y=sin(x) within a range of say x=-10 to 10 (x in radians) Thanks, I really appreciate your help in advance. Ben -- View this message in context: http://r.789695.n4.nabble.com/Simultaneous-equations-tp2524645p2524645.html Sent from the R help mailing list archive at Nabble.com.
2005 Jun 22
2
A polar.plot BUG in plotrix 1.3.3 ?
Hi, I just updated to R-2.1.1 and updated packages acordingly However, after the update, routines that use polar.plot did not function as correctly. In plotrix 1.3.3 the polar.plot function does scale label.pos to radians prior to calling radial.plot Hence, the command polar.plot(c(5,10,5,0),c(-10,0,10,20),rp.type='P', labels=c("A","N","V","S"),label.pos=c(0,90,180,270)) produces absurd compass lines but the correct results are obtained if label.pos is scaled w...
2005 Sep 14
4
Converting coordinates to actual distances
Hello, I've been searching for a method of converting Lat/Lon decimal coordinates into actual distances between points, and taking into account the curvature of the earth. Is there such a package in R? I've looked at the GeoR package, but this does not seem to contain what I am looking for. Ideally the output would be a triangular matrix of distances. Thanks in advance, Paul Brewin
2002 Oct 17
0
Polar plot, circular plot (angular data)
...text.lab = NULL, num.lab = NULL, rlabel.method = 1, rlabel.pos = 3, rlabel.cex = 1, rlabel.col = "black", tlabel.offset = 0.1, tlabel.cex = 1.5, tlabel.col = "black", main = NULL, sub = NULL) { # r: (vector of) radial data. # theta: (vector of) angular data (in radians). # theta.zero: angular direction on plot of theta = 0 (in radians). # theta.clw: clockwise orientation of theta values (default = FALSE). # # method: (plotting of (r,theta)-data): # 1: points (default) # 2: line # 3: polygon # # rlabel.axis: angular direction on the plot of radial label axis (in...
2006 Jun 28
1
Help with circular statistics
Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060628/32226ee4/attachment.pl
2005 Apr 14
1
Strange behavior of atan2
...he same as atan(y/x) (as indicated on the help page). If we consider the vector with coordinates x = 0 and y = 0, we have the following result: > atan(0/0) [1] NaN This is expected. However: > atan2(0,0) [1] 0 Instead of a missing value, the function atan2 returns an angle equal to 0 radians. I've searched through the help pages, the FAQ and the forum, but I did'nt find any explanation to this result. Does anyone know if this behavior is expected, and why ? Thank you for any clues. Regards, Cl?ment Calenge -- Cl?ment CALENGE LBBE - UMR CNRS 5558 - Universit? Claude Bernar...
2009 Jan 28
1
Changing histogram stack in qplot
...e from the default qplot colors to the following: Low = Blue Middle = black High = Red   Here is pseudo code of what I have currently:qplot(Run, data = TestData, breaks = hist_breaks, ,            fill = TestData$Temperature,           main = short_title) +           scale_x_continuous("Run, Radians") + scale_y_continuous("Frequency") +           scale_fill_discrete("Temperature")   Thanks for any advice and insights.     [[alternative HTML version deleted]]
2005 May 15
1
CircStats and Anova
Hi, If I have two sets of directional data (in radians) and want to compare them with a multifactorial anova. Is it even legitimate to compare circular data with an anova? The books I've picked up from the library don't really say, but it looks unlikely. If it is allowable, is my having stored the data as circular (X = as.circular(A)) somethi...
2008 Aug 09
1
Converting nested "for" loops to an "apply" function(s)
...an "apply" function(s). The relevant code is: distances=c(51,65,175,196,197,125,10,56) #distances of 8 houses from the town centre in m bearings=c(10,8,210,25,74,128,235,335) #bearings of the houses in degrees xpos=distances*sin(bearings*pi/180) #in sin and cos the argument MUST be in radians ypos=distances*cos(bearings*pi/180) numpoints=length(distances) nnd=rep(sqrt(2*400*400),times=numpoints) #start with the maximum possible distance for (i in 1:numpoints) { for (j in 1:numpoints) { if (i!=j) { diffx=abs(xpos[i]-xpos[j]) diffy=abs(ypos[i]-ypos[j]) nd=sqrt((diffx^2)+...
2010 Sep 15
2
Using feather.plot to try and generate a stick plot of current velocity data (and having issues)
Hello All, I am attempting to use the feather.plot function from the plotrix package to graph current velocity data as I have speed and direction. I let "r" be the first 10 rows of current speed data and "theta" be the first 10 rows of directional data in radians. I had tried this with 10 measurements, but keep getting the following error message: > feather.plot(r,theta,1:10,yref=0,use.arrows=FALSE, fp.type="m") Error in segments(xpos, yref, xpos + x, y, ...) : invalid third argument My goal was to trouble shoot this smaller dat...
2007 Jul 17
1
Missing value in circ.mean and polar.plot
...t", or "na.fail=T". Also, I try to use "polar.plot" of the package poltrix with the same matrix, but angles are not display because of many NAs. Does any one know how what should be the right NA action to get results in these two cases ? # Example of data set of theta in radians day measure strenght theta.1 theta.2 theta.3 theta.4 1 1 1 4.101523742 4.71238898 5.393067389 4.276056667 2 1 2 2.583087293 0 NA NA 3 1 1 3.385938749 3.769911184 4.380776423 NA 4 1 2 1.239183769 0.680678408 1.570796327...