similar to: Newbie:problem when using validates*

Displaying 20 results from an estimated 1000 matches similar to: "Newbie:problem when using validates*"

2007 May 27
1
na.approx and columns with NA's
Hi, I have a object 'zoo': dim(zz) [1] 720 5551 where some columns only have NA's values (representing land data in a sea surface temperature dataset) I find straightforward the use of 'na.approx' for individual columns from the zz matrix, but when applied to the whole matrix: zz.approx<-na.approx(zz) Erro en approx(along[!na], y[!na], along[na], ...) : need
2007 Jun 01
1
zoo matrix manipulation
Hi, I have this dataset where columns z1.3 and z1.4 are full of NA's. I want to perform some calculations in the remaining columns, but after doing this, I want to recontruct the original matrix. I can with: out <- which( colMeans( is.na( z ) ) == 1 ) gd<-z[, - out] select the columns full of NA's and those without that pattern. Then after doing the calculus I need to
2006 Jun 09
2
appending arrays
Hi All, I have 2 arrays: dim(a1) [1] 3 23 23 dim(a2) [1] 3 23 23 And I want a new array, to say, a3, where: dim(a3) [1] 6 23 23 where the first dimension is supposed to be (months) so the resultating array would start in jan and finish in june. Best regards, Antonio
2006 Jun 07
2
how to read hdf files under R?
Hi! I am trying to install in my R environment the rhdf5 package and library but it seems to have vanished from either the CRAN or BioConductors sites. Can you tell me where it would be possible to find it or any R library (or function) able to read hdf files? Sincerely, Nicolas Degallier UMR 7159 / IRD UR182 Laboratoire d'Oc?anographie et du Climat, Exp?rimentation et Approches
2006 May 25
21
Converting HTML into an Image
I have this challenge of converting a bit of html into an image file and then shrinking it into a thumbnail. The shrinking part shouldn''t be too bad, but what advice can you give on converting the html to the image? My thinking is that I will need to convert it to postscript or latex and then convert it to an image from there. Is there an easier / better approach? Michael
2007 Jul 23
3
Aggregate daily data into weekly sums
Dear Lest, I have a two-variable data frame as follows (the time peirod of the actual data set is 10 years): Date Amount 1 6/1/2007 1 2 6/1/2007 1 3 6/4/2007 2 4 6/5/2007 2 5 6/11/2007 3 6 6/12/2007 3 7 6/12/2007 3 8 6/13/2007 3 9 6/13/2007 3 10 6/18/2007 4 11 6/18/2007 4 12 6/25/2007 5 13 6/28/2007 5
2006 May 18
0
[newbie]problem when using validates*
Hi, I have performed the cookbook tutorial. Before tailoring the views and controllers, when I put in the model recipe.rb: validates_uniqueness_of :title validates_length_of :title, :within => 1...20 And I tried to introduce some new recipe without the above conditions I got the message: --------------------------------------------------- New recipe 1 error prohibited this category from
2007 Jun 26
2
aggregating daily values
Hi, I swear I have read almost all the posted messages about this issue, but it's evident I couldn't find an answer (surely esay) to my problem. What I want is the following: Make 8 days aggregates from a daily series like this (dput output): structure(c(6.91777181625366, 0.79051125049591, 9.00625133514404, 9.86966037750244, 14.4326181411743, 3.70155477523804, 9.67768573760986,
2006 Jun 16
2
image_select_tag with name and value
What have I missed I have a .rhtml with the sandard form parameters <%= image_submit_tag("excel.gif", :alt => "Download List to Excel", :border => 0, :name => ''render_action'', :value => ''excel'' ) %> Which genenerates I believe a valid html fragment for a submit button. <input alt="Download List to Excel"
2017 Feb 14
2
pregunta
Estimados Adjunto en excel el canal endémico de Bortman, se brindan las tasas de cinco aaños anteriores de cualquier enfermedad endémica y no0s alerta si nos alejamos de la media histórica (media geométrica) los intervalos de confianza son con conversión logaritmica. ¿Es posible traducir este excel a R? saludos José -- Este mensaje le ha llegado mediante el servicio de correo electronico que
2005 Mar 10
4
error messages, loops and saves, actionmailer and finaly authentication
Thanks to everyone who responded to my first set of questions. Not only did I get my questions answered but I improved my code and learned a couple new things. I think I prefer the mailing list over IRC... easier to follow :-) I have some more questions if you don''t mind. Some are Rails related and some are Ruby related. 1) This is concerning displaying error messages. I am assuming
2005 Sep 19
1
help with has_one relationship??
Hi I''m new to Rails and I''m struggling with a ''has-one'' relationship. I''m trying to save product and image data in seperate tables with one to one relationship. I''m assuming the problem lies in the controller method below but can''t work it out. The models contain the has_one and belongs to statements, and I tried swapping these
2005 Jan 07
3
multicolumn primary keys in activerecord
hi, I''ve got the following tables in mysql notation: CREATE TABLE `nodes` ( `id` int(11) NOT NULL auto_increment, `parent_id` int(11) default ''0'', `group_id` int(11) default ''0'', PRIMARY KEY (`id`), ); CREATE TABLE `groups` ( `parent_id` int(11) NOT NULL default ''0'', `id` int(11) NOT NULL auto_increment,
2007 Jun 19
5
Problems translating should_render from 0.8.2 to 1.0.5
<font size="2">I''m working on a large Rails site and we want to move from RSpec 0.8.2 to the latest and greatest.&nbsp; So we ran the translator and yet we''re having a lot of trouble translating should_render.<br><br>I found this on the web:<br><br>We will NOT be supporting the following in the new syntax:<br>&nbsp;
2005 Jun 13
3
validations not working with collection population droplists
I have an ADD form with foreign key field values selectable via select list ( collection_select (...)). When I add validates_presence_of :someotherfield to my model for error trapping, I get the following error for each droplist: NoMethodError in Reviews#create_curriculum Showing /reviews/_form.rhtml where line #16 raised: undefined method `inject'' for nil:NilClass Extracted source
2007 May 08
3
How to restore fields ("validates_presence_of")
Hi all, I am using "validates_presence_of" for validating all fields of my registration form. It is working fine and generating custom error message as mentioned. Also clearing all fields. How can restore those fields which are already filled. Problem is "validates_presence_of" clearing (blank) field if it fails, instead of restoring fields which are already filled. Help.
2006 Jul 13
1
error_messages_for
I can''t seem to figure out how to validate a few fields some1 please help me out model--------- class Record < ActiveRecord::Base validates_presence_of :sw, :flex end controller------------ class RecordController < A;;icationController def new @record = Rrecord.new @product = Product.find(params[''product_id'']) end def create
2006 Jan 11
7
Create a relationship with 2 or more tables on 1 insert
userstable: |id|name|password| userdetailstable: |id|col1|col2|col3|user_id| this is my code: [code] def create @user = User.new(@params[''user'']) @userdetail = Userdetail.new(@params[''userdetail'']) if @user.save and @userdetail.save flash[:notice] = "Save succeeded..." redirect_to :action => ''list''
2006 Feb 02
2
uninitialized constant
Ok, I searched but couldn''t find anything and I even tried the RoR IRC channel with no help. I get this error: uninitialized constant Airport I used this code which I got from the RoR site. helper :sorting def list @sorter = SortingHelper::Sorter.new self, %w(icao host_id name), @params[''sort''], @params[''order''], ''icao'',
2006 Jul 21
3
Specifying a view template
I''m new to Rails (and liking it!) and I have multiple controllers, each of which has a method which uses a view template which is identical to what the others use. I would like to be able to have just one template to maintain that they can all use. What is the customary way to do this? I tried using render_action to specify the template explicitly, and it "works". But I