similar to: How to use R to perform prediction based on history data

Displaying 20 results from an estimated 5000 matches similar to: "How to use R to perform prediction based on history data"

2006 Aug 10
4
I need "validates_presence_of" help
Hi - I have 3 fileds a user can fill out. They can fill out 2 of them or just one of them, for example. fill out these 2 fields: Field1 and Field2 Or fill out this field: Field3 In my model how do I use validates_presence_of for Field1 and Field2 or just Field3. I want to do something like this: validates_presence_of Field1, Field2 OR validates_presence_of Field3 So the user can fill out
2008 May 29
2
how to use substring match as condition?
Hi, How can I use a substring match as a condition in a subset command? Sth like this: subset(input, field1=="blah1" & field2=="blah2") # but now with substring match in field2 subset(input, field1=="blah1" & field3 *substringmatch* "blah3") I've tried with gsub, but it won't work: subset(input, field1=="blah1" &
2006 Jan 13
4
How to add virtual fields in model
I want to add virtual fields in a model. table: field1 field2 I want to add field3 which is field1*2 + field2 I know tihs can be achieved in View, but I want it in model. Then I will pass this model to PagerRenderer to paginate. How to achieve this? thanks -- Posted via http://www.ruby-forum.com/.
2011 Oct 05
1
Weird behaviour of tab characters in a string in R (vs Python)
Hello, I wanted to parse some information from a text, where fields are tab separated. When I copy the text into an R session (under emacs) like: mystring <- "field1 field2 field3" the tab character is replaced by a single space! For ex, if I type mystring, I get: "field1 field2 field3" The tabs have disappeared!!! I checked with Python that the text I copied was tab
2005 Dec 27
1
Rails/Ajax question from a newbie (to both)
I''m trying to get a Rico LiveGrid working, and I am a bit stuck on how to accomplish this. I have a page that successfully queries a controller and updates a <div> containing a table. I have two versions of the action; one uses the render_partial to return a rendered version of that table, and the other returns an XML-RPC document, and this is where I hit a snag. The Rico LiveGrid
2018 Jan 28
3
Addressing the problem of noisy GPUs under Nouveau
On 28/11/17 07:32, John Hubbard wrote: > On 11/23/2017 02:48 PM, Martin Peres wrote: >> On 23/11/17 10:06, John Hubbard wrote: >>> On 11/22/2017 05:07 PM, Martin Peres wrote: >>>> Hey, >>>> >>>> Thanks for your answer, Andy! >>>> >>>> On 22/11/17 04:06, Ilia Mirkin wrote: >>>>> On Tue, Nov 21, 2017 at 8:29
2008 Sep 30
12
dtrace missing ''unlinkat''? showing process stack?
everyone, Just out of curiosity, I did a dtrace -n ''syscall:::entry { @num[execname, probefunc] = count(); }'' and looked at the entries produced by ''rm''. I see everything that rm did, *except* the unlinkat - which is unfortunate because I want to trace which processes have deleted which files. So - does dtrace contain unlinkat as a probe for a system call?
2018 Feb 07
1
Addressing the problem of noisy GPUs under Nouveau
On 01/28/2018 04:05 PM, Martin Peres wrote: > On 29/01/18 01:24, Martin Peres wrote: >> On 28/11/17 07:32, John Hubbard wrote: >>> On 11/23/2017 02:48 PM, Martin Peres wrote: >>>> On 23/11/17 10:06, John Hubbard wrote: >>>>> On 11/22/2017 05:07 PM, Martin Peres wrote: >>>>>> Hey, >>>>>> >>>>>> Thanks
2006 Aug 18
4
Database Triggers?
Hi, I''m new to RoR and exploring its use with an existing application. One thing I can''t seem to find much detail on is using database triggers. All RoR examples and tutorials I''ve seen are very basic saving data back to a single table. My use case includes a somewhat denormalized DB that uses triggers to store data in multiple tables on occassion. I currently
2009 Jul 30
0
RODBC and Oracle
I just joined and though I did quickly read the posting guide it is quite possible not going to be a perfect posting. For one I tried to figure out how to reply to an existing message on the topic. I gave up but figured I keep at least the same subject. In a gist I get an empty data frame after issuing the following select query from R 2.9.1 to Oracle 10.2.0.1 64bit via RODBC 1.3 and Oracle 11g
2009 Jan 16
3
rspec model testing - test on user defined validation- How do I test that the create failed.
I''m new to rspec and looking for way to test a validation I added to a model. The test checks to see that if field1 has a value then field2 must be nil and vice versa. ------------------------------- When I did the rspec_scaffold it generated one test which worked before :each do @valid_attributes = { :field1 = "value for field1" :field2 = "value for
2005 Feb 24
2
OT - C structure question
I hae tried searching the web for the answer, but, man is there a lot of pages ... :( in the language I develop in, if I have a structure I can dynamically refer to the contents of a field of the structure like so: MESSAGE SomeStructure:Field(SomeFieldName):Value where SomeFieldName is either a quoted constant or a variable expressions In "C", I beleive that you can refer to
2008 Apr 04
6
validates_numericality_of :not_equal_to
I have a situation in which I want to validate a number is not zero. Both positive and negative values are acceptable, just not zero. validates_numericality_of has an :equal_to attribute, but I don''t see a :not_equal_to. I have not yet been able to find anyone who has discussed this. I did find information about custom validators, so I am now using a custom validator to check the field
2006 Jan 23
16
Adding form fields (extending a form) on the fly
Hello, I just can''t seem to find a way to extend a form dynamically in ROR. Say I am writing a recipe website. There is one form to enter the recipe. There is room for N number of ingredients (let''s say a text field for each ingredient name and selection list for the amount). What if the user wants to add more than N ingredients as he types them in? how do I do this without
2006 Mar 21
1
Form Validation
Hi, I''ve got an interesting one here :) I have a form with three fields : serial_number initial surname now, if serial_number is entered, it must be between 1 and 64000. If it''s filled in, the other two fields must be blank. If serial_number is left blank then the other two boxes must be filled. Any suggestions? -- Posted via http://www.ruby-forum.com/.
2005 Dec 30
2
help on submit_to_remote
hi, read the API doc and made search with google but can''t get a precise explanation on how submit_to_remote work. can someone help on that? thanks
2007 Jul 16
2
Field initialization order bug?
I believe that I may have found a bug in R. The top code sample gives an error as shown. However, by simply switching which field is initialized first as in the bottom code sample, it works as expected. This gives an error: a <- NULL a[["field1"]] <- 1 a[["field2"]] <- matrix(c(2,1), 1) Error in a[["field2"]] <- matrix(c(2, 1), 1) : more elements
2007 Feb 17
1
Conditional data frame manipulation
Hi all, My current project brought forth the snippet below, which modifies in each row of a data frame a certain field depending on another field in the same row. Dealing with data of some 30000 entries this works, but is horribly slow. Can anyone show this newbie how to do this properly (faster ;0)? for (i in 1:nrow(dataframe)){ if
2007 Feb 23
2
bug with boolean query evaluation containing parenthesis and NOT ?
Hi, The following [simplified] query works well, however a variation which includes parenthesis seems to fail, in that it returns hits which should be excluded by the NOT term. This is surprising because in this simple case, the parenthesis shouldn''t change the Boolean evaluation ... any pointers? Working Query: field1:value1 AND NOT field2:value2 Failing Query: field1:value1 AND
2006 Mar 09
7
how to make two forms on the same page???
I can get the forms to be displayed, but i want to have only one "create" button. i''ve tried everything i can think of... -- Posted via http://www.ruby-forum.com/.