Displaying 20 results from an estimated 10000 matches similar to: "help identifying clusters"
2010 Jun 09
1
[R-sig-Geo] How to extract coordinates values from a shapefile?
I'm not sure if this is what you want. But the function coordinates() in sp
package gives you the coordinates of SpatialObjects.
Regards.
Rodrigo.
2010/6/9 Nikhil Kaza <nikhil.list@gmail.com>
> You need to execute gpclibPermit() to enable gpclib.
>
> library(maptools) should have issued a warning to that effect.
>
>
> Nikhil Kaza
> Asst. Professor,
> City and
2010 Jul 19
2
replacing elements of distance matrix
Hi! I am trying to implement non-bipartite matching. I have around 500 sites
which can be clustered by 10 regions. I am able to calculate pairwise
Mahalanobis distances between sites (thanks to another post in the forum).
However, I want to constrain my match to sites within the same region. Thus
I want to replace elements of the distance matrix with a high value, say
999999, for sites not of the
2010 Jun 20
3
Spatial: number of independent components?
Hi all, I am sorry if this is a very basic quesion, but I have no experience
with analyzing spatial data and could not find the right function/package
quickly. Any hints would be much appreciated. I have a matrix of spatial
point patterns like the one below and want to find the number of independent
components (if that's the right term) in that matrix (or in that image).
x=matrix(c(0,1,0,0,0,
2012 Oct 30
2
issues with krige function
Greetings all,
Ran into a strange problem with the krige function from geoR. The
problem that I am having is that while the krige function seems to
work well, the resulting predicted values are all NAs. Given the size
of the datasets I am working with can't attach it, but I can provide
snippets of the datasets.
> casedata
station year month day obs mpe bias type
2012 Jul 18
2
duplicate data between two data frames according to row names
Hi everybody.
I'll first explain my problem and what I'm trying to do.
Admit this example:
I'm working on 5 different weather stations.
I have first in one file 3 of these 5 weather stations, containing their
data. Here's an example of this file:
DF1 <- data.frame(station=c("ST001","ST004","ST005"),data=c(5,2,8))
And my two other stations in
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),
2018 Jan 24
0
Issue with concatenation of URL losing
a) you need to read the help pages on the paste function... more likely
you are looking for the paste0 function because extra spaces will most
likely break the GET request format.
b) quotes do not become "stuck" as \" ... that is a visual representation
intended to clarify that that quote is not terminating the string but is
actually part of it. If you want to see the contents
2009 Jan 22
1
convergence problem gamm / lme
Hope one of you could help with the following question/problem:
We would like to explain the spatial
distribution of juvenile fish. We have 2135 records, from 75 vessels
(code_tripnr) and 7 to 39 observations for each vessel, hence the random effect
for code_tripnr. The offset (‘offsetter’) accounts for the haul duration and
sub sampling factor. There are no extreme outliers in lat/lon. The model
2011 May 06
1
read a netcdf file _Fill_value=-32768
Hello
I am a new user of R .
and I ve problem with R and netcdf .
I succed installation , I could use all examples .
But when I take my netcf it is different .
I want to do statistic on this kind of file .
1)
first calculate mean .
my data is like that
through ncdump -h test.nc
netcdf test {
dimensions:
lat = 301 ;
lon = 401 ;
time = UNLIMITED ; // (80 currently)
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2018 May 16
0
How to average values from grid cells with coordinates
Hi lily,
There are one or two assumptions to be made here. First is that the
latitude and longitude values of the "black" cells are equally spaced
as in your illustration. Second, that all latitude and longitude
values for the "red" cells fall at the corners of four "black" cells.
You can get the four "black" cells by finding the lat/lon values that
are
2018 May 22
0
How to average values from grid cells with coordinates
Hi Jim,
Thanks. It works. I now have more complex problems. If at each blackcell,
there are two variables such as pop and mood. For each variable, there are
daily records in one year, so 365 records for pop and 365 records for mood.
The averaged values for the redcells should be daily records too. What kind
of format do you recommend for this problem? Right now, I just get the
latitudes and
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 its lat and
2013 Feb 20
2
xyplot help
I am ploting gridded time series data. I would like the actual lat and lon value appear on the graph-if possible inside the graph as numbers. If there is also more elegant ways to plot the graphs I will appreciate more suggestions.
#################################
library(ggplot2)
library(lattice)
month <- c("Jan", "Feb", "Mar", "Apr", "May",
2011 Jun 07
1
RgoogleMaps Axes
R Help,
I posted a question on StackOverflow yesterday regarding an issue I've been having with the RgoogleMaps packages' displaying of axes. ?Here is the text of that submission:
http://stackoverflow.com/questions/6258408/rgooglemaps-axes
"I can't find any documentation of the following problem I'm having with the axis labels in RGoogleMaps:
library(RgoogleMaps)
datas
2008 Feb 28
1
problem of subscript value from vector and list
Hi, everyone
I got some problems when trying to subscript the value of vector and
list, by using calculated indices.
Here is the vector I am generated
lon<-rep(0,886);lat<-rep(0,691)
for (i in 1:886){
lon[i]<-112+0.05*(i-1)
}
for (i in 691:1){
lat[i]<--44.5+0.05*(691-i)
}
For a given location of lon(xp) and lat(yp), I would like to calculate
the position of them,
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 matching pair of lat/lon values?
Example Datasets:
> data2
2012 Nov 18
2
[newbie] convert 3D spatial array to dataframe
summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get)
to a dataframe suitable for use by lattice::levelplot(), e.g.,
levelplot(conc ~ lon * lat | lev, data = data.frame)
details:
I have atmospheric data in netCDF files specifying gas concentrations
over a 3D space with dimensions longitude, latitude, and (vertical)
level. I need to plot the data by level. Since there are
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