similar to: Comparing data frames

Displaying 20 results from an estimated 2000 matches similar to: "Comparing data frames"

2010 Apr 18
3
loops and if statements
Hello, I am very new to R and data analysis in general. I am trying to generate values to append to my data frame using conditional statements. I am playing with this simple example: a <- c(1:4) b <- c("meep", "foo", "meep", "foo") d <- cbind(a, b) now what I want to do is , each time there is a "meep" in column 2 of d, print
2007 Aug 06
2
used the described Class in a shared behavior
Is it possible to access the described class in a shared behavior? I''m trying to do something like this: describe "Siberian feline", :shared => true do described_class_instance_as :feline, :name => "fluffy", :breed => "Siberian" # or maybe before(:all) do @feline = described_class.new(:name => "fluffy", :breed =>
2008 May 13
2
[LLVMdev] Python bindings available.
Hm. I may misunderstand, but I'm not sure that's an improvement over the problem you're trying to solve. How about something like this? (Please forgive any accent; I don't speak snake fluently.) class Pet(object): @staticmethod def new(): # Create a 'free' pet. It can later become owned, but not to more than one owner. return
2005 Dec 21
1
ustack() issues && correlating SIGSEGV activity?
Howdy, I was playing around with the malloc/free D script provided by Philip Beevers: http://www.opensolaris.org/jive/thread.jspa?threadID=4224&tstart=15 And decided to change the free:entry probe from: pid24169::free:entry / sz[arg0] / { printf("Freeing %p (size %d)\n", arg0, sz[arg0]); sz[arg0] = 0; } to: pid24169::free:entry / ! sz[arg0] / { printf("[ *
2006 Dec 02
2
Strict STI?
Is there a way to set the base class to abstract? or otherwise enforce that no one can create a "Pet"? Pet < ActiveRecord Dog < Pet Pig < Pet I''ve tried: class Pet < ActiveRecord::Base validates_presence_of :type end but I get an error about ../vendor/rails/activerecord/lib/active_record/validations.rb:74: warning: Object#type is deprecated; use Object#class
2003 Apr 11
3
summary.formula: method reverse does not use fun argument
hi, recently i discovered the functionability summary.formula, awesome! from the help page i understand that method=reverse allows to summarize all variables on the right hand side of formula (the help page on line 229 wrongly refers to the left? hand side variables) in categories which are determined by a single left hand side variable. my problem is that the argument fun seems not to be
2006 Jan 10
5
Noob ActiveRecord Join Question
I''m new to rails and ruby, and after trying to get this to work correctly for hours, I thought I''d give this forum an try. I''ve setup a trivial project just to mess around with Rails database naming conventions and associations. I''ve got a table called Pets, and a table called Types. Pets contains a list of pets, Parky the cat, Daisy the dog, etc, And Types
2008 Dec 18
1
inserting zero instances with zeroes in a matrix
Hi all, Suppose I had the below example where a survey was carried out recording the number of each type of pet in each house count<-c(2,1,2,1,2,3,4) house<-c("house1","house1","house2","house3","house4","house4","house4")
2006 Oct 10
5
oddness when adding to index -
I was having some odd results when working with acts_as_ferret (current trunk), so I decided to test with the current version of ferret to see if I encountered the same problem. I did. Here are the details: installed ferret 0.10.10 on debian sarge with ''sudo gem install ferret'' (btw, same results on OSX) opened up an irb session: irb(main):001:0> require
2006 May 14
4
searching on foreing keys
Hey all, I''m using a simple search function. It''s working great except for foreign keys. I have one table pets (id,name,owner_id) and another table people(id,name) owner_id being a foreign key of pet pointing to people name. here it is on the pet controller: @paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id like
2004 Nov 25
1
gem rails 1.1.0.200411231446 flags has_many error
Hi I updated gem rails today and saw that rails had an update. With the new edition, I get a warning statement printed that was not in the two earlier versions. (No message with either: require_gem ''activerecord'', "= 1.0.0" require_gem ''activerecord'', "= 1.0.0.20041114" ) The code still works, but the warning makes no sense. Plus,
2006 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string of words and I return all the objects that have fields that match all of the words in one or a combination of fields. Person first_name last_name Pet name Person has_many :pets I want to write some SQL so that if I search for "Tony AAAA" I will get all the people who have Tony and AAA either in their
2011 Oct 26
1
Starcraft 2, oblivion, potentially skyrim and dota2?
Hello! I'm considering to get Linux on my computer, and do you guys think it would be reasonable easy to start up skyrim at the release date without TOO much work? Does starcraft 2 run easily? Oblivion? and potentially DoTA2? I know it might be difficult to answer about the Elder Scrolls V: Skyrim, but since I think you guys know your sh***. I thought you'd might have an idea :) Best
2006 Jul 25
3
Ruby hangman (was Re: List etiquette question)
"Beast" is more appropriate than you know. It''s definately Frankenstein code. (read: it ain''t pretty, but it works - some of the time). Anyway, it entertains my wife; not sure if hardcore programmers will get anything out of it or not. You might find it interesting (or pointless) that in a complete bastardization of rails'' main reason for being it
2012 Jan 27
1
Horizontal stacked 100% bars with ggplot2
Hello, R friends, I'm trying to crack this nut: Example Data. pet    gender dog    male dog    female dog    male cat    female cat    female cat    male Plot Task. Horizontal 100% bars where y axis shows gender factor (male vs. female) and x axis shows percentage of kind of pets (dog vs. cat) so that % dogs + % cats are stacked in 1 bar and sum up to 100% (for each gender group 1
2006 Apr 30
3
require "ajax_scaffold" in model error
Hi there, I''ve got installed ajax_scaffold_generator (3.1.2, 2.2.1) Anyway I''m following the example here <http://height1percent.com/ articles/2006/04/18/ajaxscaffold-3-1-0-released> which suggests the following in a model file: -------------------------------------------------------- require ''ajax_scaffold'' class Pet < ActiveRecord::Base
2008 May 13
1
[LLVMdev] Python bindings available.
On May 13, 2008, at 07:31, Mahadevan R wrote: > Um. Unfortunately in this case, Python will not collect an instance > of Pet which owned by an Owner, because both objects in the > reference cycle have finalizers (__del__). Python will just add both > objects to a garbage list (and will not call any of the finalizers). Actually, there's no reference cycle, which is what I
2008 May 13
0
[LLVMdev] Python bindings available.
Um. Unfortunately in this case, Python will not collect an instance of Pet which owned by an Owner, because both objects in the reference cycle have finalizers (__del__). Python will just add both objects to a garbage list (and will not call any of the finalizers). It does this because it cannot guess which finalizer to call first. But I get your point though, and will try to work this into the
2011 Feb 07
2
Trouble with WOW "Trouble finding sutible display device".
The launcher downloads fine but when I push "Play" I get this error message. I am have not updated the drivers on my laptop because I have no idea how. Also, I installed "wine-1.2.2-i486.pet" which was probably the wrong move but it was a pain to find a .pet for wine 1.2.2. Yes, I know that downloading WOW on a Puppy linux box is a little silly but I am also having trouble
2012 Jun 27
2
a problem of approach
Dear R-help list, Part of a program I wrote seem to take a significant amount of time, therefore I am looking for an alternative approach. In order to explain what is does: - the input is a sorted vector of integer numbers - some higher numbers may be derived (using a mathematical formula) from lower numbers, therefore they should be eliminated - at the end, the vector should contain only