similar to: AJAX + Table.

Displaying 20 results from an estimated 200 matches similar to: "AJAX + Table."

2006 Jan 18
5
Exception not caught?
Hello all. I have started reading up on exceptions and tried replacing a manual check with one. Given the following code: def results begin @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname = ?", params[:componentlog][:cl_compname].strip] ) rescue ActiveRecord::RecordNotFound render_text "<p class=''center''>No
2006 Jan 26
1
Help constructing a find_by_sql command
Hello all. I am trying to do the equivalent of: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page, :order => "cl_spr DESC" ) in a find_by_sql statement. I cannot use the build in because the adaptor isn''t quite right (OCI8) When I use it I get the following error
2006 Jan 25
4
Cannot :order when using :offset and :limit in find
Hello all. I am using the Paginate_with_ajax code as described on the wiki but I am running into the following problem. The following code will work fine and retrieved unsorted records in a hunky dory fashion: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page ) However if I try and add an
2006 Mar 08
4
unless connected? + multiple databases
Hello all. I am still having fun with multiple databases. In this case it is the unless connected? statement. ActiveRecord::Base establishes a connection that is inherited by the majority of my models. However one Model (Componentlog) that uses a separate DB is coded as: unless Componentlog.connected? establish_connection( :adapter => "oci", :database =>
2006 Feb 20
1
Form linking question
Hello all. I currently have a method that is accessed from a form using this: View: <%= start_form_tag :action => :history %> <p><label for="componentlog_cl_compname">Component Name</label><br /> <%= text_field ''componentlog'', ''cl_compname'', :class => ''mandatory'', :value =>
2011 Apr 27
6
Assignments inside lapply
Dear all I would like to ask you if an assignment can be done inside a lapply statement. For example I would like to covert a double nested for loop for (i in c(1:dimx)){ for (j in c(1:dimy)){ Powermap[i,j] <- Pr(c(i,j),c(PRX,PRY),f) } } to something like that: ij<-expand.grid(i=seq(1:dimx),j=(1:dimy)) unlist(lapply(1:nrow(ij),function(rowId) { return
2010 Mar 12
1
Length as fun.aggregate in cast function of reshape package: unexpected error
Dear Everyone, I am having problems with use of the reshape package's cast function using length as an aggregating function. Unexpectedly, I receive the error: 2 arguments passed to 'length' which requires 1 I don't understand this at all - the data I'm using is very simple, and appears almost identical to that used in the ChickWeight example in the package. The problem can
2010 Feb 08
1
R ggplot2 legend text left justify
In ggplot2 how do you justify the legend text ? In the example below the opts(legend.text = theme_text(size = 9,hjust=0)) changes the size of the text OK but it remains right justified. > mydata=data.frame(RowID=c("A","B","C"),Name=c("long long long long long name","short name ","medium medium name"),Speed=c(100,140,120)) >
2012 Aug 17
2
How can we compare corresponding values of x and y (first value of x exacly matches with the first value of y)?
df <- data.frame ( "RowId" = 4:7, "x"=c("1_1", "2_2", "3_3", "3_3"), "y"=c("1_1", "3_3", "2_2", "3_3") ) How can we compare corresponding values of x and y (first value of x exacly matches with the first value of y)? If they were not matced
2020 Sep 24
1
How to use `[` without evaluating the arguments.
Hello R-devel, I am currently attempting to implement an API similar to data.table wherein single bracket subsetting can accept an unquoted expression to be evaluated in the context of my object. A simple example from the data.table package looks like this: DT <- data.table(col1 = c('a', 'b', 'c'), col2 = c('x', 'y', 'z')) DT[col1 ==
2012 Mar 07
1
SELECT CASE in RODBC
Hi all, I have a problem with a variable created by a SELECT CASE statement. See the code below. I would like the variable "event" to be a character variabel as I want to UNION my two SELECTs - and the "event"-variable is a character variable in the first SELECT result. I have tried different ways: * used ' ' in stead of " " around the string I want as the
2006 Mar 14
2
How to not display :id in link_to URL
Hello all. I have a page which has a form on it. the page''s URL is http://127.0.0.1:3000/Component/history and The form action is: <%= start_form_tag :action => :history %> <%= text_field_tag ''id'', "#{session[:component_criteria]}" || nil, :class => ''mandatory'' %><br /> <%= submit_tag "Search", :class
2013 Apr 26
1
Stratified Random Sampling Proportional to Size
Hello R Experts, I kindly request your assistance on figuring out how to get a stratified random sampling proportional to 100. Below is my r code showing what I did and the error I'm getting with sampling::strata # FIRST I summarized count of records by the two variables I want to use as strata Library(RODBC) library(sqldf) library(sampling) #After establishing connection I query the data
2011 Dec 18
1
Identifying records with the correct number of repeated measures
Dear list, I have a dataset where we sampled multiple individuals either 1 or 9 times. Our measurement variable is 'Delta13C' (see below sample dataset). I cannot figure out how to efficiently use a vector command (preferably) or a loop to create a new vector of the names of the individuals sampled 9 times. Note that the 'FeatherPosition' variable will only be "P1" for
2012 Jan 01
4
matrix position to list of coordinates
How can I extract a list of the positions in the matrix? > A=matrix(1:8, nrow=2,ncol=4) > A [,1] [,2] [,3] [,4] [1,] 1 3 5 7 [2,] 2 4 6 8 Something like this pos.A 1 1 1 2 1 3 1 4 2 1 2 2 2 3 2 4
2005 Oct 11
4
Any way to add to data frame saved as .rData file?
Hi all, I've got a script that generates a few moderate-size data frames, and then puts them together into one big data frame at the end in order to write that data frame to disk, so that it may be re-opened later on... I'm trying to trim down memory requirements in this script, so I was wondering if there was any way to append to a data frame already saved on disk (just like
2006 Mar 01
3
Optimization problem: selecting independent rows to maximize the mean
Dear R community, I have a dataframe with 500,000 rows and 102 columns. The rows represent spatial polygons, some of which overlap others (i.e., not all rows are independent of each other). Given a particular row, the first column contains a unique "RowID". The second column contains the "Variable" of interest. The remaining 100 columns ("Overlap1" ...
2011 Apr 09
3
Converting edgelist to symmetric matrix
Hi, I have network data in the form of a couple of edgelists containing weights in the format "x,y,weight" whereby x represents row header and y represents column header. All edgelists are based on links among 634 nodes and I need to convert them into a 634*634 weighted matrix. I searched for online help using possible keywords I know, but I could not find a clue how to do this in
2010 Nov 19
2
Question on overdispersion
I have a few questions relating to overdispersion in a sex ratio data set that I am working with (note that I already have an analysis with GLMMs for fixed effects, this is just to estimate dispersion). The response variable is binomial because nestlings can only be male or female. I have samples of 1-5 nestlings from each nest (individuals within a nest are not independent, so the response
2007 Nov 08
3
skip non-sequential lines using scan?
Hi all, Is there a way to skip non-sequential lines using the "skip" argument in the scan function? E.g., I have a matrix with 100 rows and 1e7 columns. I open a connection and want to read only lines 5, 7, 9, etc [i.e., seq(5,99,2)] It might seem that the syntax to do this would be something like this (if only the "skip" allowed vectors in the same way colClasses does in