similar to: Distances between two datasets of x and y co-ordinates

Displaying 20 results from an estimated 3000 matches similar to: "Distances between two datasets of x and y co-ordinates"

2008 May 06
3
Spatial join between two datasets using x and y co-ordinates
Hi R users I am trying to create a spatial join between two datasets. The first data set is large and contains descriptive data including x and y co-ordinates. The second dataset is small and has been selected spatially. The only data contained within the second dataset is the x and y coordinates only i.e. no descriptive data. The aim of a join made between the two datasets is to select
2008 Jun 06
3
R loop
I all I am just trying to get the idea of a loop if statement for another purpose. I was going to label a new variable based on date ie first week 1, second week 2 etc. My code in bold is wrong but seems logical to me, could someone help. x <- rep(c(2660156,2663703,2658165,2659303,2661531,2660914),c(2,2,2,2,1,1)) y <- rep(c(6476767,6475013,6475487,6479659,6477004,6476388),c(2,2,2,2,1,1))
2008 Mar 06
2
R code for selecting places spatially and by time
Hi all The code of trying to write relates to selecting properties (given by x and y co-ordinates) spatially (distance "X" from "infected" properties identified by date) over a certain time period. i.e. what properties are within 3 km from properties infected on "2008-01-01" over the last 14 days. Is any one able to give me some clues on how to write code to solve
2011 May 03
2
Overlapping x axes using Lattice
Hi R users I apologise in advance for this question as I suspect it is simple and perhaps others have had this problem. I am struggling to sort out how to fix the x axes so that the labels don't overlap. I have put the following example together to show my problem. library(lattice) titre <- as.factor(rep(c(10999,20999,30999,40999,50999,60999,
2009 Apr 01
4
Recode of text variables
Hi all I am trying to do a simple recode which I am stumbling on. I figure there must be any easy way but haven't come across it. Given data of A","B","C","D","E","A" it would be nice to recode this into say three categories ie A and B becomes "Treat1", C becomes "Treat 2" and E becomes "Treat 3". I tried
2009 Mar 17
3
Combining columns from two dataframes
I all I am trying to combine columns from two dataframes to make a completely new dataframe consisting of one column of dates (ie a combination of dates from the two dataframes). >From the following dataframes a b 1 2008-07-27 1 2 2008-10-01 2 3 2008-08-15 3 4 2008-08-14 4 5 2008-08-14 5 6 2008-09-20 6 c d 1 2008-07-27 1 2 2008-10-01 2 I would like to get: z
2009 Apr 14
2
Subset function: selecting variables within a factor
Hi all I know this must be an easy one so sorry for the trouble. I would like to select a list of variables within a factor The following example is given in help for subset: subset(airquality, Temp > 80 select = c(Ozone, Temp)) So how do I select all temperatures of 90 and 80 ie Temp = c(80,90) I would appreciate your help. Kind regards andy Andrew McFadden MVS BVSc Incursion
2008 May 13
1
Legend in scatterplot and adding regression lines
Hi R users The scatterplot (used package R-Cmdr ) obtained has the legend off the plot in the upper left I would like to decide where to put the legend - is that option still available and how do I do it? code: Dataset <- read.table("J:/Pigmatingsb.txt", header=TRUE, sep="\t", na.strings="NA", dec=".", strip.white=TRUE)
2009 Apr 01
1
Adjusting font size in a lattice graph
Hi all I have created a lattice graph but the text appears too big. Just wondering if there was a way I could change the font size. tp1.nDai=xyplot(value ~ yr | Name, data = nDai,type = 'o') update(tp1.nDai, aspect = c(0.8), layout = c(4, 4)) I would appreciate your help. Kind regards andy Andrew McFadden MVS BVSc Incursion Investigator Investigation & Diagnostic Centres -
2010 Feb 14
1
Adding a regression line to an xyplot
Hi R users > I am trying to add a regression line to a graph for "c" for factor 2 > only. Any suggestions? > library(lattice) a=(1:10) b=c(1:5,16:20) c=as.factor(c(rep(1,5),rep(2,5))) d=data.frame(a,b,c) xyplot(a~b, pch=c(6,8),data = tavg, groups=d$c, reg.line=lm, smooth=FALSE, type=c("p","g"),xlab="a",ylab="b") > I would
2011 May 17
1
Dealing with null values Aggregate function
Hi R users I trying to some aggregate statistics on a very large dataset. The null values are causing a problem. I would like to calculate aggregate values for groups. I am just no sure how to deal with the "" I would ideally like them to ignored ie if there is only 1 value over several columns than that value would be the summary statistic. I have put the following example together to
2010 May 20
1
finding euclidean proximate points in two datasets
Hello all, I've been pouring through the various spatial packages, but haven't come across the right thing yet. Given a set of points in 2-d space X, i'm trying to find the subset of points in Y proximate to each point in X. Furthermore, the proximity threshold of each point in X differs (X$threshold). I've constructed this myself already, but it's horrificly slow with a
2008 May 11
1
Finding unmatched data between two dataframe using several factors
Hi R users I am trying to find unmatched data from two dataframes. I would like to find unmatched data based on several factors. For the following data: dat1 <- data.frame(x = paste("A", 1:6, sep=""), y = c("andy","bob","ciaran","dan", "eion", "fred")) dat1 dat2
2011 Apr 15
1
Idetntifying nearest topographic contours to data points
Hi there, I have two data sets, one of locations at different elevations (x,y,z) and the other of points that make up topographic contours (also x,y,z). I have used: result<-apply(distppll(data2,cbind(topocon[-nrow(topocon),],topocon[-1,])),1,min) where 'data2' are my measurement coordinates (x, y) and 'topocon' are my topographic contours (x,y). While this gives me an output
2011 Nov 21
1
Lattice graph help
Hi all I hope you might help me with some aspects of producing a graph in lattice. There are three things I have struggling with and that is: 1. to separate the horizontal box rows from each other; 2. to change the colour of the horizontal and vertical strips to white; and 3. to place the axes labels on the left y axes and on the bottom x axes. I would really appreciate some help. I have put the
2010 May 26
3
cluster analysis and supervised classification: an alternative to knn1?
Hi, I have a 1.000 observations with 10 attributes (of different types: numeric, dicotomic, categorical ecc..) and a measure M. I need to cluster these observations in order to assign a new observation (with the same 10 attributes but not the measure) to a cluster. I want to calculate for the new observation a measure as the average of the meausures M of the observations in the cluster
2003 Jun 27
2
Returning contour co-ordinates
Dear R-helpers, I'd like to be able to post-process contours coming from contour(). Does anyone have a version of contour() (or something similar) which will return the contour coordinates? In searching the archives I've come across a message in Nov 01 which had this on a wish-list, but I can find no later reference. With thanks, John Field Adelaide, South Australia
1999 May 17
1
Character height & width in user co-ordinates
Is there an equivalent to the S-PLUS par()$cxy in R? Also, is it possible to get notice taken of some equivalent of \n in R when using text()? For what it is worth I am using RW-0.64.1. John Maindonald email : john.maindonald at anu.edu.au Statistical Consulting Unit, phone : (6249)3998 c/o CMA, SMS, fax : (6249)5549 John Dedman Mathematical
2007 Oct 09
2
window (x,y) co-ordinates of datapoints
Hi, In the getGraphicsEvent function the (x,y) co-ordinates returned from the mouse move are in relation to where the mouse is located within the device window (i.e. the lower left corner of the window is '(0,0)', the upper right is '(1,1)'). Is there a way of returning the (x,y) co-ordinates of data points plotted where instead of x and y being the actual data points they are
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