similar to: problem of subscript value from vector and list

Displaying 20 results from an estimated 2000 matches similar to: "problem of subscript value from vector and list"

2008 Jan 14
2
plot POSIXct format data
Hi, everyone I've been trying to make a scatter plot of POSIXct format data to see the difference between two start time. Like X: [1] "1995-05-26 19:00:00" "1995-05-27 01:00:00" "1995-05-27 07:00:00" [4] "1995-06-29 01:00:00" "1995-06-29 07:00:00" "1995-06-30 13:00:00" [7] "1995-06-30 19:00:00" "1995-07-01
2008 Jan 15
1
Retrieve results from chisq.test programmatically
Hello, I would like to run a series of chisq.test() and store results (x-square, df, p-value) in a matrix for further analysis, but don't know how to do such. Currently I run the command line for each set of data at a time and it is time consuming. Thank you for your help. --My Coyne [[alternative HTML version deleted]]
2012 Apr 04
1
Subscript Error
json_dir is a list of JSON lists mapping lat/long route points between locations using CloudMade's API. post_url is the URL of the HTTP request for (n in json_dir) { i = i + 1 if (typeof(json_dir[[i]]) != "NULL") { if (i == 1) { dat_add <- ldply(json_dir[[i]], function(x) t(data.frame(x)), .progress = "text")
2011 Sep 07
3
Editing the variables attributes section in the netCDF header of netCDF files created using the package ncdf.
Hi, I am using the package ncdf to create netCDF files and I want to mimic the the header of an exiting netCDF file created outside of R. Below is what the existing header looks like (part of it that is different): netcdf ccd1984_05_08 { dimensions: lat = 1974 ; lon = 1894 ; time = UNLIMITED ; // (1 currently) variables: int time(time) ;
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),
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)
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 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 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
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
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
2003 May 16
1
data.frame contents are not displayed
Dear r-help, I need to unite contents of two files with variables into one data frame, produce some derivative variables from them and store them in that data frame. Here is the set of commands (processing first file for now) data7902<-data.frame(year=NULL,lon=NULL,area=NULL,extent=NULL,area.std=NULL,extent.std=NULL, area.norm=NULL,extent.norm=NULL);
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
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
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
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
2013 Feb 22
3
Help xyplot
Hi Mackay and anybody (a) Is it possible to select randomly (let say five grids) and plot? (b) Is it possible to plot five nearest grid in one figure? The original question and improved codes: #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