Displaying 20 results from an estimated 1000 matches similar to: "How to make a cartesian pairlist from a vector?"
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 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 =
2012 Dec 31
2
code to convert 3D geographical coordinates to Cartesian?
Is there packaged code to convert geographical coordinates (e.g.,
longitude, latitude, elevation) to Cartesian coordinates in 3-space?
I can see how to do this using
1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr)
http://cran.r-project.org/web/packages/pracma/
2. a geographical-to-spherical conversion. This seems to involve (in
roughly increasing order of difficulty or
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
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
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
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
1999 May 06
1
x,y vs row,column
I think my problems are coused by a fundamental R incompatibility in how
matrices are stored and the usual way of specifying Cartesian coordinates.
When I do
data<-read.table("~/r/rt/data/unif/6cbcif2d.out",header=TRUE)
x<-unique(data$lag1)
y<-unique(data$lag2)
z<-matrix(data$cif2d,length(y),length(x))
This z matrix is printed apparently correctly from a Cartesian point of
2017 Jun 25
2
Writing my 3D plot function
Hi all,I had a question last week on asking for a function that will help me draw three different circles on x,y,z axis based on polar coordinates (Each X,Y,Z circle are coming from three independent measurements of 1-360 polar coordinates). It turned out that there ?is no such function in R and thus I am trying to write my own piece of code that hopefully I will be able to share. I have spent
2011 Apr 08
1
asking about contour plot with R
I'm working in Rosario, Argentina, trying to plot some contours.
I found the function "draw.contour" created by James Forester at
R-bloggers. If you take a look at that function you'll see it's very
useful!
But I have a problem with it and James is trying to help me (but also
asked me to seek for more help) I hope you can help me (don't worry if you
can't):
Using
2017 Jun 25
0
Writing my 3D plot function
Please look at what I see in your code below (run-on code mush) to understand part of why it is important for you to send your email as plain text as the Posting Guide indicates. You might find [1] helpful.
[1] https://wiki.openstack.org/wiki/MailingListEtiquette
--
Sent from my phone. Please excuse my brevity.
On June 25, 2017 2:42:26 PM EDT, Alaios via R-help <r-help at r-project.org>
2008 Apr 12
3
Matrix Indexing
Hi
Does anyone know how I might pick out diagonal elements of a matrix using a
vector?
If I create a matrix a:
a <- matrix(c(1:16), 4, byrow=TRUE)
and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary
diagonal (upper or lower), is there any way I can use a vector to do this?
So if I want a diagonal of size 3, I could create a vector like x <- c(0:2)
and then pick
2012 Oct 05
2
Test for Random Points on a Sphere
Dear All,
I implemented an algorithm for (uniform) random rotations.
In order to test it, I can apply it to a unit vector (0,0,1) in Cartesian
coordinates.
The result is supposed to be a set of random, uniformly distributed,
points on a sphere (not the point of the algorithm, but a way to test it).
This is what the points look like when I plot them, but other then
eyeballing them, can anyone
2007 Oct 30
2
calculate spatial distance
Hi,
I have a set of locations defined by longitude and latitude (in degrees),
and want to calculate the spatial (or geographic) distance among all
locations.
I did not find such a function in the spatial-related packages. (I *cannot*
use 'dist', as I have geographic, not cartesian coordinates).
thanks!
Robert
Robert Ptacnik
Norwegian Institute for Water Research (NIVA)
Gaustadall?en 21
2013 Mar 05
2
Function completely locks up my computer if the input is too big
Dear r-help,
Somewhere in my innocuous function to rotate an object in Cartesian space
I've created a monster that completely locks up my computer (requires a
hard reset every time). I don't know if this is useful description to
anyone - the mouse still responds, but not the keyboard and not windows
explorer.
The script only does this when the input matrix is large, and so my initial
2007 Nov 27
2
measure smoothness
I have 3 sets of Cartesian data, one is 'original' data and the other
2 are "smoothed"data. The smoothed data is the result of applying a
smoothing algorithm to the original.One set of smoothed data is the
'old' algorithm and the other set is the 'new' algorithm.
Does R have the capability of telling me which data is "smoother"?
Example data (subsets
2018 Oct 15
2
sys.call() inside replacement functions incorrectly returns *tmp*
Kia Ora
> Although I'm not sure what problem it would solve...
Given that you asked, I was interested in writing a multiple assignment
function as a replacement function, so something like:
massign (x, y, z) = construct.some list ()
Obviously, that's not possible.
Probably the best example I can think of is converting cartesian
coordinates to polar coordinates.
Then we might have
2007 Jul 26
1
Average plan
Hello,
I'm looking for a method to compute an average plan from 4 or 5 point in an
cartesian space. I'm sure It can be done using a less-square method but
maybe it a function already exist in R system to get this plan.
Can somebody help me to solve this problem (I'm looking on the net for hours
but didn't find anything realy satisfiying me)
Thanks
--
View this message in
2007 May 28
1
off-topic: affine transformation matrix
This may sound like a very naive question, but...
give two lists of coordinate pairs (x,y - Cartesian space) is there any simple
way to compute the affine transformation matrix in R.
I have a set of data which is offset from where i know it should be. I have
coordinates of the current data, and matching coordinates of where the data
should be. I need to compute the composition of the affine
2009 Jan 05
1
How can pairs of values be stored in a 2D matrix ?
My question is motivated by dealing with pairs of values, like (3,12.5), (16,2.98), and so on
that are mapped to a cartesian plain (Time, Frequence)
I miss C multidimensional arrays. I am trying to simulate the 3rd dimension by declaring a matrix of lists.
R seems to accept the definition of such a matrix. But I'm experiencing some difficulty at storing pairs of data
in it. In the following