search for: lat

Displaying 20 results from an estimated 716 matches for "lat".

Did you mean: at
2013 Feb 12
3
reorganize data
Hi R users, Wonder if somebody could give me help on how to reshape this type of data: ----------------------------------------------------------------------------------------------------------------------- Date:10.09.19 Time:21:39:05 Lat:N62.37.18 Long:E018.07.32 0000-0010 | 28| 28 0010-0020| 302| 302 0020-0030| 42| 42 0030-0040| 2| 2 0040-0050| 1| 1 0060-0070| 1| 1 _ Date:10.09.19 Time:21:44:52 Lat:N62.38.00 Long:E018.09.07 0000-0010| 32| 32 0010-0020| 334| 334 0020-0030| 27| 27 0030-0040|...
2007 Apr 04
5
how to image.plot a XY grid file into a lat-lon map
Hi All, I have a netcdf gridded file with LCC projection. I can easily use image.plot to visualize it. However, as the axises are in X,Y, not Lat and Lon, I could not add state or country maps onto it (or lat lon information). I do have a grid2d file that describes the lat and lon for each (X,Y) grid, but the lat and lon are not regularly spaced, so I could not use image.plot. Does anyone know how to plot this type of gridded data so that...
2012 Aug 10
1
virtio-scsi <-> vhost multi lun/adapter performance results with 3.6-rc0
...per vhost and multiple virtio PCI adapters to scale the total number of virtio-scsi LUNs into a single KVM guest. The test setup is currently using 4x SCSI LUNs per vhost WWPN, with 8x virtio PCI adapters for a total of 32x 500MB ramdisk LUNs into a single guest, along with each backend setting emulate_write_cache=1 to expose WCE=1 via virtio-scsi to SCSI core. Using a KVM guest with 32x vCPUs and 4G memory, the results for 4x random I/O now look like: workload | jobs | 25% write / 75% read | 75% write / 25% read -----------------|------|----------------------|--------------------- 1x...
2012 Aug 10
1
virtio-scsi <-> vhost multi lun/adapter performance results with 3.6-rc0
...per vhost and multiple virtio PCI adapters to scale the total number of virtio-scsi LUNs into a single KVM guest. The test setup is currently using 4x SCSI LUNs per vhost WWPN, with 8x virtio PCI adapters for a total of 32x 500MB ramdisk LUNs into a single guest, along with each backend setting emulate_write_cache=1 to expose WCE=1 via virtio-scsi to SCSI core. Using a KVM guest with 32x vCPUs and 4G memory, the results for 4x random I/O now look like: workload | jobs | 25% write / 75% read | 75% write / 25% read -----------------|------|----------------------|--------------------- 1x...
2012 Feb 21
3
Using earth.dist function
Hi Everyone, I am a graduate student who will be using R to do my analysis. I need to do a spatial analysis, and the first step is to calculate the geographic distance between my study sites. I am hoping to use earth.dist because it allows for multiple pairwise distances to be calculated at one time. I have done a sample calculation, and I seem to have a problem between the steps of using create.lats and earth.dist. I've copied the...
2011 Mar 21
1
Lat Lon NetCDF subset
Hi, I'm trying to read a subset of a netcdf file into R, but although I'm relatively experienced using R, I'm still new to netCDF files, so this may be a very simple/stupid question! I've included an example of the type of file I'm looking at here. www.met.reading.ac.uk/~swp06hg/ccd1983_01-dk1_20.nc (~7Mb) It's a 2D array of the variable CCD along with...
2008 Apr 24
2
problem with "which"
Hi, I'm having trouble with the "which" or the "seq" function, I'm not sure. Here's an example : > lat=seq(1,2,by=0.1) > lat [1] 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 > which(lat==1) [1] 1 > which(lat==1.1) [1] 2 > which(lat==1.2) [1] 3 > which(lat==1.3) [1] 4 > which(lat==1.4) [1] 5 > which(lat==1.5) [1] 6 > which(lat==1.6) [1] 7 > which(lat==1.7) *intege...
2009 Nov 10
3
NetCDF output in R
...ly the first time step is written. For example: >library(ncdf) >path <- '/home/work/' >forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep="")) > fore <- get.var.ncdf(forecast,'ppt') > lon <- get.var.ncdf(forecast,'lon') > lat <- get.var.ncdf(forecast,'lat') >dim(fore)[3] >26 > times <- 1:dim(fore)[3] > write.netcdf.time(paste(path,'cam_fore.nc',sep=""), fore,lon,lat,times) [1] "put.var.ncdf: warning: you asked to write 1440 values, but the passed data array has 37440 entr...
2009 Nov 10
3
NetCDF output in R
...ly the first time step is written. For example: >library(ncdf) >path <- '/home/work/' >forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep="")) > fore <- get.var.ncdf(forecast,'ppt') > lon <- get.var.ncdf(forecast,'lon') > lat <- get.var.ncdf(forecast,'lat') >dim(fore)[3] >26 > times <- 1:dim(fore)[3] > write.netcdf.time(paste(path,'cam_fore.nc',sep=""), fore,lon,lat,times) [1] "put.var.ncdf: warning: you asked to write 1440 values, but the passed data array has 37440 entr...
2010 Jan 05
3
R matching lat/lon pairs from two datasets?
Hello, I am trying to match lat/lon from one dataset with the lat/lon from a second dataset and use that rows data for calculations. I am using match, but this is finding the first match and not comparing the pair, how can I determine if the lat/lon are the same? See example below. Is there a better way to determine to a m...
2007 Oct 05
3
help in substitute function
Hi, I try to use a substitute function to generalise a equation. I have this: expression(1+2*pred+3*lat) I need to define the equation in function of x1 and x2 variables. Also I try to define who is x1 and x2. I try this: X1 <- "pred" X2 <- "lat" Now I need substitute pred and lat in equation by x1 and x2 defined on X1 and X2 above, I try this way: > substitute(exp...
2018 May 20
1
How to average values from grid cells with coordinates
Hi lily, It's not too hard to do it using dataframes. Getting the indexing right is usually that hardest part: # these values are the centers of the black cells lat<-rep(28:38,11) lon<-rep(98:108,each=11) pop<-sample(80:200,121) # just use the data.frame function blackcells<-data.frame(lat=lat,lon=lon,pop=pop) plot(0,type="n",xlim=c(97.5,108.5),ylim=c(27.5,38.5), xlab="Longitude",ylab="Latitude") abline(h=27.5) abline...
2018 Jan 24
2
Issue with concatenation of URL losing
Thank you for your help in advance. I am trying to pull some data back from a web service library(httr) sample2 <- GET("https://elevation.mapzen.com/height?json={\"range\":false,\"shape\":[{\"lat\":40.7,\"lon\":-76.5}]}&api_key=mycode") result2 <- content(sample2) height <- result2$height[[1]] I would like to put by own latitude and longitude in but alas when I use paste() to combine the double quotes become stuck as literally \" lat <-10 long <...
2003 Jul 30
3
nested for() loops for returning a nearest point
I'm trying to do the following: For each ordered pair of a data frame (D1) containing longitudes and latitudes and unique point IDs, calculate the distance to every point in another data frame (D2) also containing longitudes, latitudes and point IDs, and return to a new variable in D1 the point ID of the nearest element of D2. Dramatis personae (mostly self-explanatory): D1$long D1$lat D1$point...
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...
2018 Jan 24
0
Issue with concatenation of URL losing
...g the string but is actually part of it. If you want to see the contents of the string without the escaping, use the cat function instead of depending on the default print behavior (which shows the escape characters). c) The format of the GET request string includes parameter identifiers "lat" and "lon"... don't get confused between those strings being sent to the webserver and what your variables are called. Also, following those strings and a colon are numeric values... those are what you need to replace. Your attempt did not remove the literal digits from the s...
2008 Jan 30
2
data.frame transformation
Dear all, maybe somebody can provide some help for this problem: Example: I've got the following dataframe "data": grid.id<-c(1:4) lat<-c(10,12,13,15) species1<-c(0,0,0,1) species2<-c(1,1,0,0) species3<-c(1,1,1,1) data<-data.frame(cbind(grid.id,lat,species1,species2,species3)) How can I, out of "data" make a new dataframe, where the cells of value "1" in the species columns ("species1&quot...
2004 Apr 16
1
Spatial Voter Model
Has anyone coded (in R) a spatial voter model with mutation (e.g., Kimura and Weiss 1964, Holley and Liggett 1975, Durrett and Levin 1996)? In principle, it is quite straightforward, but useful simulations require many many iterations, making my "straightforward" version too time intensive. I am happy to share my version (without mutation, below), for what it is worth. Thank you in advance, Hank Stevens # Voter model with no mutation in a square grid of size L^2 L = 50 #Dimension of...
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...
2012 Dec 11
6
Latitudinal mean of values in a data frame
Dear all, I have a big file containing latitude points(-10 to 80) and corresponding values. Example data Lat=c(69.48134, 69.49439, 69.50736, 69.52026, 69.52438, 69.53308, 69.53746, 69.54365, 69.54582, 69.6884, 69.69272, 69.998, 70.00055, 70.00106, 70.00295, 70.00308, 70.00363, 70.00427, 70.00665, 70.00906, 70.01049, 70.01053, 70.01075,...