similar to: subsetting data-frame by vector of characters

Displaying 20 results from an estimated 7000 matches similar to: "subsetting data-frame by vector of characters"

2006 Mar 16
8
Question on gems on Mac OSX
Hi all, lately I''ve been working with ROR on a MAC OSX tiger at work, however I have one huge problem with seems to be the root of all my problems whenever I use terminal or iTerm to start workign with ROR. Every single time I open a new terminal window or close one and open a new one, I have to reapply my path from .bash_login for Ruby and MySql, and than I have to install the
2009 Jul 09
2
correct way to subset a vector
Hi, #make example data dat <- data.frame(matrix(rnorm(15),ncol=5)) colnames(dat) <- c("ab","cd","ef","gh","ij") If I want to get a subset of the data for the middle 3 columns, and I know the names of the start column and the end column, I can do this: mysub <- subset(dat,select=c(cd:gh)) If I wanted to do this just on the column names,
2006 Apr 05
4
Development Mode on Dreamhost
Anyone know (or know where to point me to) to figure out how to force Rails into development mode? I''d like to not have to kill dispatch.fcgi everytime I make a change. My site is not live and I''m just doing development and testing right now. Thanks. -- Posted via http://www.ruby-forum.com/.
2002 Apr 17
3
not quite a shorewall question but..
does anyone know how to enable the "udp loose" function in kernel 2.4.x? one of my fave games requires this to work on the net and i''d really like to move away from the 2.2 series kernels. tia
2006 Feb 09
30
why there is no automatic relationship discovery
When I explain RoR to someone I don''t have a convincing argument that explains why everything is so automatic and transparent, but relationships have to be encoded by hand in models. That shows I don''t understand well that part of AR. There''s the argument that says that not all databases offer metadata about foreign keys, but the natural question then is that,
2006 Mar 29
3
Bash
I have installed Ruby and Rails on my Intel iMac according to the instructions provided by Hivelogic. Everything works perfectly. I have noticed that if I close Terminal and later come back and open it, It seems like the paths set in bash_login are lost. If I open bash_login the paths are still there however if i do ruby -v it says I am running 1.8.2 (mac default) when I have installed 1.8.4.
2006 Mar 27
7
rjs template ? (how to check for existence of a dom element?
In my rjs template I''m using the following line. page.visual_effect :slideUp, ''comment_error_details'', :duration => 0.5 It works fine if I have created the div with the id="comment_error_details", but if I haven''t created the error yet then my whole rjs template fails. How can I check to see if an element has been created? I could then put
2006 Mar 15
4
Ruby - Feed Generators
Hi All, Can anyone help me in making feed[xml/rss] generator for a webpage based on ruby/ruby on rails. Tell me if any ruby code is already available, to generate feeds for a webpage. Thanks in Advance. Sumanth. -- Posted via http://www.ruby-forum.com/.
2006 Mar 21
8
How to avoid multiple submits/posts?
Hello, How do I prevent previously submitted form data from being reinserted into the database when the user presses the browser''s Refresh button? On Aughey''s advice in #irc I tried using `redirect_to'' a new `:action'' but this approach doesn''t seems to work. Any idea what might be wrong or how to tackle this problem? Thanks for your help. P.S.- I
2013 Feb 26
3
Sporadic Issues
The problem is not icecast streaming, its trying to stream through a browser. It is very complicated to do. Each browser has it quirks depending on OS, version and what other audio programs that are installed. Having the external player link should resolve the issues. We gotten from using a browser player to letting the customer choose there fave audio player to use :) Even this has cause
2006 Feb 19
8
select, first option empty value?
using the below: <%= select(''project'', ''project_type_id'', @project_types.collect {|x| [x.name,x.id]}, {:include_blank => true}) %> but i''d like that first option to have something like "select project type" with an empty value?
2002 Mar 04
4
script to rysnc to spare hard drive
Im brand new to rsync and i been doing alot of reading about it and it looks like the tool I have long been wanting. Bascially i got 1 server, 2 hard drives. partions are / /boot /home /usr /var /backup (2nd drive) Bascially what i am looking at doing is mirroring the first drive to the 2nd drive, and once that intial one is moved over, have a cron run nightly (or when specified) that will
2014 Jan 22
2
Question about Asterisk 12
Okay - maybe I'm just suffering from a moment of horrible ADD - but, I'm a little lost. I see that Asterisk 12 has a nice REST API - very nice - something I can use. However, and this is gonna sound dumb - but all the CLI commands are different now. What did I miss? Can anyone, please, anyone point me to a good, simple to understand tutorial on the new CLI? I am so, so freaking lost!
2009 Aug 10
2
strsplit a matrix
Dear all, I am trying to split a matrix into 2 as efficiently as possible. It is a character matrix: 1 2 3 1 "2-271" "2-367" "1-79" 2 "2-282" "2-378" "1-90" 3 "2-281" "2-377" "1-89" I want to make 2 matrices from this, as succinctly and efficiently as possible. I've tried such
2010 Aug 25
2
[LLVMdev] [REQUEST FOR FEEDBACK] Inline asm multiple alternative constraints
Hi, I'm looking for some feedback on the changes represented in the attached patches, which I'll describe below. I'm sending this to both the LLVM and Clang list because it affects both, though the main focus here is LLVM. Basically, I've partially implemented some changes for choosing multiple alternative constraints largely on the LLVM side. The Clang change is to output the
2010 Jul 01
2
Sweave function
Dear list, I have a question about the interaction between R code and Latex language trough the Sweave function in the package "utils". What I'm trying to do is to write a report. Contrary to the examples shown in the Sweave Manual in which table already constructed by R are "exported" on Latex files, what I would like to do is to build a table in which I combine text and
2006 Sep 18
1
Sorting Boolean fields
Hey there, I came across this thread: http://www.ruby-forum.com/topic/78148#126235 where sorting in reverse by a boolean field wasn''t working properly. I''m having the same issue now, but there''s not a reply in that thread. I was wondering if anyone has figured this out yet? Bascially, I want all the records with a "1" (true) to float to the top of the
2006 Apr 09
4
submitting forms help
I cant seem to figure this problem out and i was hoping someone could help me out. I have a page with a list of forms. I would like the user to be able to submit each form individually, or submit them all at once, to a different action (bascially, one that will do batch processing of all the forms). Is this possble? Please help. -------------- next part -------------- An HTML attachment was
2010 Jun 14
2
list matching
Hello,   I could not find a clear solution for the follow question. please allow me to ask. thanks   mynames=cbind(c('a','b'),c(11,22)) lst=list(a=c(1,2), b=5) now I try to combine mynames and lst: a  1  11   a  2  11 b  5  22   thanks jian   [[alternative HTML version deleted]]
2006 Jul 02
1
prevent duplicate inserts with has_many :through ??
Does anyone have an efficient/elegant way to prevent duplicate inserts when using a has_many :through relationship. So I have something like this: class User < ActiveRecord::Base has_many :favorite_teams has_many :teams, :through => :favorite_teams end class FavoriteTeams < ActiveRecord::Base belongs_to :user belongs_to :team end class Teams < ActiveRecord::Base has_many