similar to: code to convert 3D geographical coordinates to Cartesian?

Displaying 20 results from an estimated 1200 matches similar to: "code to convert 3D geographical coordinates to Cartesian?"

2023 Nov 09
1
Dependency errors for package pracma
I tried to update my package {pracma} on CRAN from 2.4.2 (2022-09-21) to version 2.4.4 (2023-11-08). This package reverse depends / imports / suggests on 350 packages on CRAN and 25 packages on Bioconductor. The only changes are small corrections on some help files, a new function for stereographic projection, and `gcd` and `Lcm` require integer inputs now (these functions are not used in the
2013 Feb 15
1
minimizing a numerical integration
Dear all, I am a new user to R and I am using pracma and nloptr libraries to minimize a numerical integration subject to a single constraint . The integrand itself is somehow a complicated function of x and y that is computed through several steps. i formulated the integrand in a separate function called f which is a function of x &y. I want to find the optimal value of x such that the
2012 May 09
2
problem with Gauss Hermite ( x and w )
Hi all, I am using the 'gaussHermite' function from the 'pracma' library ############ CODES ########### library(pracma) cc=gaussHermite(10) cc$x^2 cc$x^5 cc$x^4 ############ CODES ########### as far so good. However, it does NOT work for any NON integer values, say ############ CODES ########### cc$x^(2.5) cc$x^(-2.5) ############ CODES ########### But just think about it
2012 Jan 27
3
Numerical instability in new R Windows development version
I have a question concerning the new Windows toolchain for R >= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3 <- function(x, y) sqrt((1 - (x^2 + y^2)) * (x^2 + y^2 <= 1)) > dblquad(f3, -1, 1, -1, 1) # 2.094395124 , i.e. 2/3*pi , err = 2e-8 Warning in sqrt((1 - (x^2 + y^2)) *
2012 Nov 20
2
[lattice] how to overlay a geographical map on a levelplot?
r-help lattice adepts: I have a question which is somewhat geospatial, so I posted to r-sig-geo rather than here: https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html > summary: How to overlay a geographical map on each panel in a lattice > (or Trellis), e.g., of levelplot's? Note I am not inquiring about > creating choropleth maps[,] which Sarkar 2008 covers quite
2012 Oct 10
3
Generating random geographical coordinates
Dear all, I have two coordinates vectors, say X and Y of length n. I want to generate for each couple of coordinates X1,Y1 X2,Y2 X3,Y3....Xn,Yn a random coordinate which is located in a square define as X +/- dx and Y +/- dy. I saw the runif function which can generate for just one value at a time what I want : runif(1, X - dx, X + dx) for X and runif(1, Y - dy, Y + dy) for Y. I would like
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
Dear all, I tried running the following syntax but it keeps running for about 4 hours and then i got the following errors: Error in if (is.na(f0$objective)) { : argument is of length zero In addition: Warning message: In is.na(f0$objective) : is.na() applied to non-(list or vector) of type 'NULL' Here is the syntax itself: library('nloptr') library('pracma') #
2009 Nov 21
1
How to make a cartesian pairlist from a vector?
Hi, I'm looking for a function that will take a list of columns or data.frame and corvert it to cartesian pairlist. For example for this data.frame (see below), I'd like to get a list of all possible pairs: > sound cs rs ns 7 5 2 4 5 4 6 3 1 8 4 1 6 4 2 6 7 1 2 2 5 9 2 5 how can I get this? > mylist ((cs,rs), (cs,ns), (rs,ns))
2004 Sep 10
1
Efficient Cartesian product of data.frames
Hello List, I am looking for efficient code to produce the Cartesian product of two or more data.frames. I'd like to be able to do this without resorting to looping. I have searched the FAQ, web, etc without luck. That being said, the help page for merge says that the function can produce what I'm looking for if the by vectors are of zero length. Would someone be so kind as to
2010 Aug 18
1
Plot in cartesian plane
Hi all, I'm trying to plot this two curves in a single cartesian plane, but when I plot the first one, the plot appears with no negative "y" value. When I plot the second curve, it almost does not apear in the graph. I was trying the plot.window but with no success. Can someone help me with this? If possible, I'd like to plot this curves in a perfect cartesian plane. f =
2008 Dec 05
1
Cartesian Product Of Character Vectors
Hi all (I'm sure this question has been asked before, but I cant find it). If I have two character vectors: > x <- c("aaa","bbb","ccc") > y <- c("1","2","3") How can I get the cartesian product of the string values? > expand.grid(x,y) Gives me a data frame with separate columns...however, I cant seem to get *apply
2009 Nov 21
0
How to make a cartesian pairlist?
Hi, I'd like to make a pairwise comparison of a data.frame and I'm looking for a function that will take a list of columns or data.frame and corvert it to cartesian pairlist. For example for this data.frame (see below), I'd like to get a list of all possible pairs: > sound cs rs ns 7 5 2 4 5 4 6 3 1 8 4 1 6 4 2 6 7 1 2 2 5 9 2 5 how can I get
2010 Jul 07
0
HELP - four.nines.cartesian.probability.grid
My routine (below) works OK but misbehaves if the on-screen plot is made wider using the mouse. The problem is caused by using par("usr")[1] - 0.07 * (par("usr")[2] - par("usr")[1]) to locate two items on the y-axis. The rest of the labeling is controlled by the "line=0" parameter setting. Of course resizing changes the absolute plot width, and
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
SUMMARY: Specific problem: I'm regridding biomass-burning emissions from a global/unprojected inventory to a regional projection (LCC over North America). I need to have boundaries for Canada, Mexico, and US (including US states), but also Caribbean and Atlantic nations (notably the Bahamas). I would also like to add Canadian provinces and Mexican states. How to put these together? General
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
2012 May 03
1
Creating a point pattern with cartesian co-ordinates
I have the following data from an image analysis program, in which the x and y co-ordinates are locations of the centroids of shapes on a 2 dimensional plot. The Y co-ordinates were positive, but I changed them to negative as the resulting scatterplot was upside down (the image analysis program reads from the top of the image to the bottom, so it seems) I now need these as point pattern data, as I
2012 Sep 02
5
[newbie] scripting remote check for R package
summary: e.g., how to replace '<query R for package=package_name>' in the following: for RSERVER in 'foo' 'bar' 'baz' ; do ssh ${RSERVER} '<query R for package=package_name>' done or is there a better way to script checking for an R package? details: For my work I need a few non-standard R packages. I do that work on 2 clusters. One uses
2003 Oct 16
2
Interpolation of azimuth values
Hello I will make an interpolation of data which represents azimuth direction ( angle from north in clockwise direction) values. But there is a problem. Say, for instance, while 1 and 359 indicate somewhat same direction, interpolation puts values in the range from 1 to 359. What can I do to solve the problem ? Anything you offer ? thanks in advance Ahmet Temiz General Directory of
2012 Feb 15
2
[newbie] separating plot output from debug output
I'm attempting to refactor an R script that does a lot of plotting, among other things. Ideally I'd like to do something like setup # does pdf(...) for each part of input { plot(process(part)) } cleanup # does dev.off() but have problems: 1 I'm plotting to PDF, so everytime I dev.off() creates a new file, and I want everything in one file (as does my boss :-) 2 I'm