similar to: How to pass javascript variables to a method

Displaying 20 results from an estimated 11000 matches similar to: "How to pass javascript variables to a method"

2006 Jun 18
3
ActiveRecord Help - Not finding Data
Hello, I''m farily new to RoR and am having a problem trying to retrieve data from my database. Here is the code from my controller: def index zip = params["zip"] @zip1 = Zipcode.find(:first, :conditions => ["zip = ?", zip]) lat = @zip1.latitude.to_f long = @zip1.longitude.to_f radius = 50 @bookstores = Bookstore.find_by_sql ["SELECT * FROM
2008 Nov 24
0
spatial subset of ncdf
dear I was lokking for a solution or an example on the internet for quite a time but since haven?t found an answer yet, I'd like to ask a maybe to simple question: I have a large ncdf-file with five dimension. temperature (t2m), the variable against, lat, lon and time. (height is included as well) the structure is [1] "file C:/RDaten/t2m.ETH.HC_A2.nc has 5 dimensions:" [1]
2006 Jul 19
5
Model Validation - with a twist
I''m stuck in a catch-22 type problem. I have an insert form for a table that uses the validation in the model. i.e. When you click submit on the form and haven''t filled in the required fields then you get the nice rails error messages saying "field can not be blank". This works fine until I introduce some more logic. What I''m trying to do is to validate
2018 May 19
0
How to average values from grid cells with coordinates
Hi lily, You could also create "blackcells" as a dataframe (which is itself a type of list). I used a list as I thought it would be a more general solution if there were different numbers of values for different grid cells. The use of 1 for the comparison was due to the grid increments being 1. If you had larger or smaller grid increments, you would use the grid increment size for the
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
2011 Jun 17
0
Inconsistent results from var.get.nc in RNetCDF
Hello - I am having trouble extracting data from NetCDF data files using RNetCDF. The data files each have 3 dimensions (longitude, latitude, and a date) and 3 variables (latitude, longitude, and a climate variable). Here is some of the output from print.nc for clarity: ----- dimensions: month = UNLIMITED ; // (1368 currently) lat = 3105 ; lon = 7025 ; variables: float
2006 Apr 04
1
imaging and contouring
Dear R'Helpers and Colleagues, I have looked in the documentation, asked to some colleagues in the lab, but was unable to solve the following difficulty. I am running R on a iMac G5 with OS 10.4. The file below (73 rows x 144 col) shows the values of a climatic index on the globe with a grid of 2,5 ? x 2,5 ? (NA = no value): ? With image() and map() and running the following
2020 Oct 22
0
3d plot of earth with cut
On 21/10/2020 8:45 a.m., Balint Radics wrote: > Hello, > > Could someone suggest a package/way to make a 3D raster plot of the Earth > (with continent boundaries), and then make a "cut" or "slice" of it such > that one can also visualize some scalar quantity as a function of the > Radius/Depth across that given slice ? > > Formally, I would have a
2004 Aug 22
1
latitude longitude data
Dear R-helpers, I get GPS readings with bug counts (bugs meaning insects in this case) made along rows in crop fields and use these to make maps of bug distribution. The GPS readings are not quite accurate enough for my purpose, so since I know what row each reading is made in, I adjust the latitudinal coordinate using: grd<-lm(lat~lon+Row,data)
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 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 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) :
2006 Feb 09
1
converting lat-long coordinates to Albers Conical Equal Area coordinates
#################################################################################### We have used maptools to construct state, county, township, census-tract, and zipcode level R maps with an Albers Conical Equal Area projection. We would like to be able to plot the location of weather stations or other point locations on the maps. The data the point locations are in latitude-longitude units
2017 Aug 28
0
Extracting subset from netCDF file using lat/lon and converting into .csv in R
Two questions: 1. Is the order of the dimensions shown what is shown if you look at str(ncin) - I mean shown at the end where it describes the variable and its dimensions? 2. Is you problem how to subset the netcdf file, how to write to the .csv file, or both? -Roy > On Aug 28, 2017, at 2:21 PM, Eeusha Nafi <eshad002 at gmail.com> wrote: > > I have a series of nertCDF files
2009 May 01
0
Copying ncdf dims and vars from one file to the other
Hi, all I have a large number of NetCDF files that I need to average and then put the mean in a new NetCDF file. My problem is that I do this every time for files with different variables, so I do not want to hard-code the variables in the new NetCDF file I creat. does anyone know how I can copy ALL the dimensions and variables from one NetCDF file to another, and just put the mean I calculated as
2006 May 08
0
ZipCode Search
I''ve looked through the messages regarding implementing a ZipCode search and I have a few questions to make sure I have my head wrapped around this. Here''s what I have. I have a database table called zipcodes with the following info (for example) 30310 Atlanta GA 33.727807 -84.41983 -5 1 That''s zip, city, state, latitude, longitude, timezone, and dst. So when a
2016 Apr 27
1
Determine if a set of x and y-latitude points are inside of a polygon using R
Objective: Determine if a set of x and y-latitude points are inside of a polygon using R. Lets say I have 9 polygons. Where I have labeled the polygons to be checked from 1-9. The problem I?m running into is running the point.in.polygon to check if those points are in one of several polygons, as my code overwrites the result. To accomplish this I am using the R-built in function called
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) ;
2009 Nov 17
1
How to plot an image in R
Dear all Im new in R I have a necdf data set that I want to plot : this is my data set [1] "file Tmax.DJF.daily.1981_1999.echama2.nc has 4 dimensions:" [1] "longitude Size: 127" [1] "latitude Size: 110" [1] "ht Size: 1" [1] "t Size: 1680" [1] "------------------------" [1] "file Tmax.DJF.daily.1981_1999.echama2.nc has 1
2012 Dec 07
0
apply a function at: dateX, dateX+1, dateX+2, ....
Dear knowing people, Dennis Murphy helped me a lot with my first loop last week. Thanks again - I could have made more than 10 "Thank-You cakes" in the time it saved me! But now I want to complicate the thing. My ideas didn't work. Let's see if anyone is smarter ;-) The following packages are needed: library(adehabitatHR) library(rgdal) library(plyr) # My dataframe looks