similar to: Fw: data frames re-ordering and naming columns

Displaying 20 results from an estimated 3000 matches similar to: "Fw: data frames re-ordering and naming columns"

2011 Dec 01
1
Fw: calculate mean of multiple rows in a data frame
NAME ID a b c d 1 Control_1 probe~B01R01C01 381 213 345 653 2 Control_2 probe~B01R01C02 574 629 563 783 3 Control_1 probe~B01R09C01 673 511 521 967 4 Control_3 probe~B01R09C02 53 809 999 50 5 MM0289~RFU:11810.15 probe~B29R13C06 681 34 115 587 6 MM0289~RFU:9238.41 probe~B29R13C05 784 443 20 784 7 MM16597~RFU:36765.38 probe~B44R15C20 719 251 790 445 8 MM16597~RFU:41258.94 probe~B44R15C19 677
2007 Aug 10
0
Odp: having problems with factor()
You've spotted it! table(df$area) 0 1 2 3 4 5 7 21 27 71 46 19 3 1 There are no values in area 6. Thank you very much. Jabez ----- Original Message ---- From: Petr PIKAL <petr.pikal@precheza.cz> To: Jabez Wilson <jabezwuk@yahoo.co.uk> Cc: R-Help <r-help@stat.math.ethz.ch> Sent: Friday, 10 August, 2007 1:02:21 PM Subject: Odp: [R] having problems with
2008 Nov 28
1
True ActiveRecord result set iteration
Hello, For an internal project we were looking for a solution which extends ActiveRecord by an iterator function. Using find(:all) is no fun if you have to process some 10.000 records. Until now there have been two ways of dealing with that scenario: - write your logic a second times (e.g. use stored procedure) - bet on AR plugins which work around that limitation by fetching IDs and
2007 Aug 11
0
DOE and interaction plot general question
This is a general question about Design of experiments. If i am not allowed to post general questions like this here please accept my apologies and ignore the question. I did a DOE with six factors in eight runs. I know i cannot check for interactions using this design, but i tried the interaction plot and it showed me many interactions. After this I foldover the design and ran the 8 runs to learn
2005 Apr 05
1
accessing header information in a table
Dear list, I have read an excel table into R using read.table() and headers=T. The table is 7 columns of figures. Is there any way to gain access to the header information? Say the table headers are Mon, Tue etc I can get to the data with myTable$Tue, but how do I get the headers themselves. TIA Jab [[alternative HTML version deleted]]
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I like to keep related columns together. Is there a way to specify where the column is added in a table with migrations? For example, in MySQL you can do: ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column I was hoping migrations would support something like this: add_column :my_table, :new_column, :integer,
2006 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there ! I try to figure out how to do something like this in Rails : SELECT * FROM my_table WHERE name LIKE ''GOGONAM%'' My problem is the % and the quotes. >From now, I do like this : searched_name = params[:name]+''%'' user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name]) But is there a more gracefull way to do a LIKE
2009 Nov 13
4
processing log file
Dear all, I'm trying to process a log file which logs the date, the username and the computer number accessed. The table looks like this: >table.users          Date UserName Machine 1  2008-11-25     John     641 2  2008-11-25    Clive     611 3  2008-11-25   Jeremy     641 4  2008-11-25     Walt     722 5  2008-11-25     Tony     645 6  2008-11-26     Tony     645 7  2008-11-26    
2007 Aug 10
3
having problems with factor()
Dear R Help, I have a set of data of heights of trees described by area that they are in. The areas are numerical (0 to 7). ht area 1 320 3 2 410 4 3 230 2 4 360 3 5 126 1 6 280 2 7 260 2 8 280 2 9 280 2 10 260 2 ....... 180 450 4 181 90 1 182 120 1 183 440 4 184 210 2 185 330 3 186 210 2 187 100 1 188 0 0 I want to convert the
2011 Nov 24
2
how to add "waiting for page change" to my script
I'd like to "step" through 24 histograms by using the return or click button option, as shown in the demo(graphics) demonstration. I've searched for "interactive graphics", and "waiting for page change" in R documentation but with no result. I'm sure that this is a relatively straightforward procedure. Can anyone point me to the correct solution?   Jabez
2008 Mar 21
5
foreign key question
Hi- Say I have a db with following schema: MyTable: Id, name, user_id, date User: id, name, description I know that I want to add "belongs_to" in my "user" model but how can I enforce a proper constraint on the user_id in "MyTable"? Is this done using a has_one in the "MyTable" model? Thanks! --~--~---------~--~----~------------~-------~--~----~ You
2005 Feb 16
2
Positive log-likelihood in lme
Kia ora I'm a using lme (from nlme package) with data similar to the Orthodont dataset and am getting positive log-likelihoods (>100). This seems usual and I wondered if someone could offer a possible explanation. I can supply a sample dataset if requested, but I feel almost certain that this question has been asked and answered recently. However, I can find no trace of it in the mail
2006 Nov 29
5
AR, find(:all), loops and memory usage
I''m a beginning programming using ActiveRecord outside of Rails to do conditional processing of database records. So far, I''ve been successful. However, my script loads all matching records into memory first. There are hundreds of thousands of matching records so the script quickly consumes over 500MB of RAM before any processing is done. Is there a way to avoid this preloading
2006 May 23
3
ez-where headscratch
Hi there, I''m puzzled by this apparently simple query I can''t manage to reassemble using ez_where plugin. cond = Caboose::EZ::Condition.new :my_table do start_on < Time.now any {end_on > Time.now; end_on.nil?} end I keep getting the following result : >> cond.to_sql => ["my_table.start_on < ? AND (my_table.end_on > ?)", Tue May 23
2009 Oct 01
1
Help me replace a for loop with an "apply" function
...if that is possible My task is to find the longest streak of continuous days a user participated in a game. Instead of writing an sql function, I chose to use the R's rle function, to get the longest streaks and then update my db table with the results. The (attached) dataframe is something like this: day user_id 2008/11/01 2001 2008/11/01 2002 2008/11/01 2003
2007 Aug 30
1
belongs_to with foreign keys that reference non primary key columns
Hello, I have a situation where the foreign key into a table doesn''t correspond to that table''s primary key: my_table ------------- id (pk) name ... other_table -------------- id (pk) my_table_name (fk references my_table(name)) ... I want to be able to say something like: class OtherTable < ActiveRecord::Base belongs_to :my_table, :foreign_key => { :my_table_name
2007 May 06
1
simple table ordering question
Hi all, I'm sure this is simple but I don't get it. I have a table mytable<-c(rep("Disagree",37),rep("Agree",64)) table(mytable) this gives me Agree Disagree 64 37 but I didn't ask for it to be in alphabetic order. How can I get it in original order? Disagree Agree 37 64 Thanks, Jeff Jeffrey. M. Miller, PhD
2005 May 19
5
[OT] Sqlite2 question
So, under Sqlite2, if I want to update a database''s schema, I have to dump the DB, modify the table''s structure, then go and modify EVERY insert statement. The insert statements look like (from memory): INSERT INTO my_table VALUES (''some_id'', ''some_val'', '''', '''', '''', ''some_other
2013 Mar 14
1
error: object of type 'closure' is not subsettable
Hi all, when i run this script: >read.table("Angelika.txt",header=T,sep="\t") >mytable=read.table("Angelika.txt",header=T,sep="\t") >for ( dye in c("A","B","C","F","G","K","L","M")) + { + for (cond in 1:8) + { + measurement =
2004 Aug 06
1
DarkIce make problem
Yea, I figured it out...brain fart on my part. Got it working, but getting some sort of TCPSocket error now... still trying. :) [root@jabez etc]# darkice -c /usr/local/etc/darkice.cfg DarkIce 0.6 live audio streamer, http://darkice.sourceforge.net Copyright (c) 2000-2001, Tyrell Hungary, http://tyrell.hu Using config file: /usr/local/etc/darkice.cfg Using POSIX real-time scheduling, priority