similar to: Finding rows common to two datasets

Displaying 20 results from an estimated 10000 matches similar to: "Finding rows common to two datasets"

2009 Jan 12
3
Working with duplicated rows
Dear all, I have a dataframe of 3 columns, consisting of 'longitude', 'latitude' and a corresponding 'value'. Where identical 'longitude' and 'latitude' pairs occur more than once, I want their corresponding 'value' to be summed and the 'pair' to only appear once. For example: long lat value 10 20 5 6 2 3
2009 Apr 08
2
Reshape - strange outputs
Dear R Users, I am using the reshape package to reformat gridded data into column format using the code shown below. However, when I display the resulting object, a single column is fomed (instead of three) and all the latitude values (which should be in either column one or two) are collected at the bottom. Also, the NA values aren't removed, despite this being requested in the code. Code:
2009 May 01
1
Problems with 'valid columns' when using merge
Dear all, I am trying to use 'merge' within a loop, however, I receive an error relating to the 'by' argument of the command, as follows: > merge_year <- 1986 > > for (i in 1:10) { # Number of file pairs + assign(paste("merged_arunfek_", merge_year, sep=""), merge(x=paste("arunoff_",start_arunoff, sep=""),
2008 Jul 15
3
Melt (reshape) question
Dear all, I have a grid of 720 columns by 360 rows of global population density values, and hope to convert this to column format using the 'melt' command in the 'reshape' package. I'm not receiving any errors as such, but when the code has finished running, my output looks like this: > head(PopDens.long) Latitude Longitude PopDensity 1 -84.75 V1 0 2
2009 Apr 30
1
Using 'aggregate' when dependent on row value increments
Dear all, I have a data frame of three columns, which I have sorted by Latitude as follows: > test2[60:80,] Latitude Longitude Sim_1986 61948 85.25 -29.25 2.175345 61957 85.25 -28.75 8.750486 61967 85.25 -28.25 33.569305 61977 85.25 -27.75 23.702572 61988 85.25 -27.25 26.488602 62000 85.25 -26.75 23.915724 62012 85.25 -26.25 25.055082 62027
2009 Aug 17
3
Reshape package: Casting data to form a grid
Dear R Users, I'm trying to use the 'cast' function in the 'reshape' package to convert column-format data to gridded-format data. A sample of my dataset is as follows: head(finalframe) Latitude Longitude Temperature OrigLat p-value Blaney 1 -90 -38.75 NA -87.75 17.10167 NA 2 -90 135.75 NA -87.75 17.10167 NA 3 -90 80.25
2010 Jan 25
4
R Output and ArcGIS
Dear all, I've been using R on a Mac to process some data for export to ArcMap GIS (which only runs on Windows). ArcMap seems to require tab-delimited data (my data are in 3 columns), so I've been using the sep="\t" argument. However, this resulted in strange end-of-line characters when displayed on a PC. I looked in the write.table help file to find that eol="\r\n"
2008 Jun 17
2
Reshape or Stack? (To produce output as columns)
Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: > columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)). > rnames <- sprintf("%.2f", seq(from = -89.75, to = 89.75, length = 360)) > colnames(Jan) <- columnnames
2008 Sep 05
2
Use of colour in plots
Dear all, I have 3 datasets all of which share the same longitude and latitude values, which I'm looking to plot onto a scattergraph. The third dataset has values which can only be either '1' or '2'. So to incorporate all three datasets onto two axes, I'm wondering if I can plot dataset1 and dataset2 as normal, but then use colour to determine whether these points are
2012 Sep 14
2
plotting points on a map, assigning vectors to values from dataset
Dear everyone, as a newbie I fear I have made an easy mistake and am just too blind to see it. Can anyone help me seeing the (possibly) obvious? I have a command that creates a map of South America. In a separate txt-file I stored data about latitude and longitude of languages, and in a third column values that differ from language to language. The command should read that file and assign the
2009 Jun 29
2
How to select partially (not completely) unique rows?
Dear R-helpers, I know how to use unique to select unique rows, e.g. unique.rows<-unique(dataframe) but I would like to select those rows that are unique only only TWO of my dataframe's columns (so, two rows with the same value on these two columns would not be kept, even if they had different values in other columns). For example, I have a dataframe with 10 columns, two of which are
2013 Jan 21
2
Regex for ^ (the caret symbol)?
Hello R-helpers, I am trying to search for string that includes the caret symbol, using the following code: grepl("latitude^2",temp) And R doesn't like that. It gives me: > temp<-c("latitude^2","latitude and latitude^2","longitude^2","longitude and longitude^2") > temp [1] "latitude^2" "latitude and
2009 Mar 06
1
help to use ppp in spatial analysis
Hi, i am using spatstat package for spatial data analysis and now i have a problem to create a point pattern. The points are in file "points.txt" (first column for Latitude and second column for Longitude ) and I imported them and separated each columns in two arrays x and y. If I plots x and y ( e.g plot(x,y) ) the result appears in square area without problems and the scale is
2002 Oct 02
6
help to make a map on R
Hi all, I need a little help for construct an state's map on R. The first problem is to get the data. I have a datafile of longitude and latitude in the follow format: trajectory latitude longtude T -22.045618 -51.287056 T -22.067078 -51.265888 T -22.067039 -51.207249 T -22.059690 -48.089695 T -22.075529 -48.074608 T -22.072460 -48.044472 T -22.062767 -48.298473 T -22.077349
2012 Feb 23
4
saving all data in r object
I have 100 data files, which contains very huge data sets of location details ( e.g latitude, longitude, time, temp) Now I would like to save the all data of these 100 files in r object, so I can reload data any time. * Every file has different length of data latitude <- NULL longitude <- NULL time <- NULL temp <- NULL for ( i in 1:100) { data<-
2012 Jun 05
2
Converiting longitude/latitude to utm
Dear all, I have been trying to convert coordinates from longitude/latitude to utm but I got an error. As soon as the longitude coordinate is greater than 90, I get the folloowing error message: "error in pj_transform: latitude or longitude exceeded limits" Here is what I did: SP<-SpatialPoints(cbind(126.59,-14.30),proj4string=CRS("+proj=longlat"))
2002 Mar 10
1
lattice library: xyplot and polygons
Dear R-Helpers, Is there a way to draw shaded (filled) polygons in panel graphs produced by xyplot ? I made different trials (see below) with polygon() and grid.polygon() but polygons are not drawn (probably for the same reason that prevents the use of lines, points, etc. in xyplot panels). Thanks in advance, Renaud > Water id label longitude latitude 515 21 Zone inondable
2009 Aug 25
2
latitude and longitude distribution
Good day to you all, I have lightning data containing date, time, latitude and longitude. I hope that distribution of latitude and longitude will give number of lightning occurrence in a region. I have used factor function to sum up the number of events on latitude and longitude axis and saved as x and y. But when I tried to plot the two, I had and error message ( Error in image.default(x, y, z) :
2012 Feb 07
1
read.csv "Duplicate row.names not allowed"
I'm trying to read in a CSV, with lines looking like: HEADER, Latitude DecDeg, Latitude Hemisphere, Longitude DecDeg, Longitude Hemisphere, Speed knots, Bearing Degrees, fixQualityGga, noOfSatGga, altGga, heightGga, selectionGsa, fixGsa, pdopGsa, hdopGsa, vdopGsa, noOfSatGsv, Time, *checkSum $GPS, 3747.0224, N, 12223.4522, W, 0.36, 348.21, 1, 3, 4.01, 175.5, -25.2, A, 2, 4.14,
2013 Oct 31
2
Make Multiple plots in R
Dear All, I would wish to make multiple plots and give title/ headings same time, is there a simpler/ tidier way compared to below(, especially the headings as they are missing)? See output attached. #####################################Making multiple Plots start######################## plot(mybrick9, y = 2, col = terrain.colors( length(seq(0,1, by = .2))-1),breaks= seq(0, 1, by = 0.2), axes =