similar to: If else statements

Displaying 20 results from an estimated 2000 matches similar to: "If else statements"

2010 Mar 23
2
Create NA
Hi, How can I create an NA? for example, i have this program but it has errors > x=scan() 1: 1 2 3 4 5 6: Read 5 items > "na"*x Error in "na" * x : non-numeric argument to binary operator what should I multiply x so that I will get an NA? And I really need to multiply that with my x vector. I need this output: (na,na,na,na,na) Thank you for your time and help!=) --
2010 Mar 23
3
Summing with NA
Hi all, May I request for your help if you have time and if you have an idea on how to do this. I want to add three vectors... And my goal is to obtain the sum of the vectors, ignoring the vector of "na"... Here is what i did in R.. I'm adding the three vectors, e,z,k, and my objective is to get an answer = -23. I tried putting the na.omit but it did not work. Thanks. > z [1]
2010 Mar 20
3
How to count the number of occurence?
Hi, may I ask for your help... What is the R code if I want to count the number of times that "2" appeared in the following R output > k [1] 1 1 1 1 1 1 3 1 2 1 1 1 1 1 1 1 1 3 2 1 1 4 1 1 1 1 1 5 1 1 Thank you for your help. :-) -- View this message in context: http://n4.nabble.com/How-to-count-the-number-of-occurence-tp1661733p1661733.html Sent from the R help mailing list
2008 Jul 26
4
parametric bootstrap
Hi I am trying to find a parametric bootstrap confidence interval and when I used the boot function I get zero bias and zero st.error? What could be my mistake? Thank you and take care. Laila [[alternative HTML version deleted]]
2012 Mar 16
3
Cosinor
Hola, ¿qué tal?: Tengo la siguiente duda: Para el caso del Cosinor Simple: Y = M + A * cos(2*pi*t/T + phi) + error Cuando T conocido, podemos asumir: Y = M + beta * X1 + gamma * X2 + error, siendo X1 = cos(2*pi*t/T) y X2 = sin(2*pi*t/T) En este caso (Cosinor simple) el modelado lo llevo a cabo del siguiente modo: lm( y ~ X1 + X2) Para el caso de componentes múltiples: Y = M + ?Aj *
2007 May 11
1
Cannot use an escape character in regexp
Given the string > mystr <- "(Preconsuntivo del giorno gas 10 maggio 2007)Tj" I'm trying to detect and eliminate the string ")Tj" at the very end of mystr by means of gsub(rx2,"",mystr) BUT preparing the matching regexp string a warning pops up > rx2 <- "\)Tj$" Warning messages: 1: '\)' is an unrecognized escape in a
2008 Jun 27
3
For loop
Hi, Could you please let me know to use a list in a for loop here geneset is a loop.I am trying to match the names of the list with 1st row of the output. result<- list() for(i in 1:length(output) { result[[i]] <- geneset(which(geneset %n% output[,1])) } Kindly help me out -- View this message in context: http://www.nabble.com/For-loop-tp18163665p18163665.html Sent from the R
2006 Jul 06
5
Building a standalone application with RoR
Hello, I have to code a small application for a car repair shop running under Windows (98 SE but may be my client could upgrade to 2000) and using RoR is my definite choise ! The app will be powered by WebRick (which is enough powerfull for a small app used by only ONE user at a time) My questions are targeted to the best database to use... I had a look to SQLite and Firebird but support
2006 Jun 17
4
Simple tutorial weirdness
Sorry - working on a simple tutorial but something is throwing me here. I''m supposed to get a Time.now() print to the page but it''s not working and I can''t figure out why. No errors are thrown my the page shows: Howdy, world! My name is Stuart Felenstein. This was verified at . So no time stamp showing. I went into IRB , did a Time.now() and it''s working
2009 Mar 30
3
[PATCH 0/3] v2: mbr: Ctrl-key press forces load from first hard disk
Version 2 of these patches includes optimisations suggested by H Peter Alvin to save bytes: * Use memory-mapped I/O register to read keyboard shift flags * Don't reload DX from memory; move immediate byte to register Tested using mbr.bin. TJ (3): mbr: Ctrl-key press forces load from first hard disk gptmbr: Ctrl-key press forces load from first hard disk isohdpfx: Ctrl-key press
2007 Oct 02
3
Logwatch for postfix
On CentOS5 with the latest updates applied, the logwatch filter for postfix returns way too many lines from the log. I get an "unmatched entries" message and all messages that have gone through the system is listed. Here is an example: 8F930A8092: to=<morten at foo.bar>, orig_to=<morten at localhost>, relay=local, delay=0.19, delays=0.06/0.01/0/0.12, dsn=2.0.0,
2010 Mar 31
6
ODD and EVEN numbers
Hi, anyone here who knows how to determine if an integer is "odd" or "even" in R? Thanks. tj -- View this message in context: http://n4.nabble.com/ODD-and-EVEN-numbers-tp1747032p1747032.html Sent from the R help mailing list archive at Nabble.com.
2006 Jun 28
2
(no subject)
Hey everybody, Is it alright to run two TDM400s on the same machine? If it is, how would one differentiate between the channels on each card? So, if I'm running strait FXS and my first card is fxsks 1-4, would the second be fxsks 5-8? Would there be any interrupt problems? Any help would be great! Thanks! Tj -------------- next part -------------- An HTML attachment was
2018 Dec 12
2
doveadm proxy list repeats header line
Hi all, just a minor thing: Why does `doveadm proxy list` repeat the header line after each entry? Too me, that just makes the output harder to read. So instead of this: root at mail1 ~ # doveadm proxy list username proto src ip dest ip port info at domain1.de imap 80.152.196.98 222.133.127.53 993 username service src-ip dest-ip
2006 Jul 15
4
learning from typo.
i have a copy of the typo source on my desktop that i am going through just to get a better understanding of the rails framework and ruby itself. i''m fairly new to everything so it has proved to be very helpful and very inspiring. i''m stuck on a part though. i was trying to figure out how everything on the sidebar works. i found the components folder and started looking
2011 Apr 16
3
if else statements in data frame
Dear R experts, I have again a problem. Let I have a data frame like below: x y ---------- A A A B B B A B where x and y are the column names. I want to create a new column z where it is elements will be like that, if at each row has there at least one 'B', then z will have value of B, if not then Z will have missing value(NA) for the corresponding row. So my result data frame should be
2006 May 17
1
Example Syntax for if - then- and - else Statements
Hello R users, I am a fairly new R user, however, one of the problems I am having is the use of applying if-, and-, then-, else- statements in R against datasets & dataframe. Rtips mentions it, but without simple examples I am not quite sure what my syntax should look like. I am particularly interested in syntax that can be used with the transform function. for example if foo[,1] ==
2004 May 04
2
If Then Else Statements - Outbound Dialling on ISDN using CAPI -Individual Dial out Plans using msns
Hi All, Many thanks to Marc who helped me with a previous Capi Dialout plan - however..... What I now would like to be able to do is: - We have 8 msn's 383590, 383591 383592 etc. What I would like to do is set up an If Then Else type statement along the following lines: - If extension 7957 Then Dialout on Capi msn 383590 ElseIf extension 7958 Then Dialout on Capi msn 383591 ElseIf
2006 Feb 23
6
lighttpd on mac for local development
I''m having trouble installing lighttpd for local development on Mac OS X Tiger. Here are the commands I''ve run: sudo port install fcgi sudo port install lighttpd Here''s a snippet from running "port installed" with several ports removed for brevity: fcgi @2.4.0_1 (active) lighttpd @1.4.9_0 (active) rb-rubygems @0.8.11_0 (active) readline @5.0.005_0+darwin_8
2006 Jun 14
13
A good tutorial
Are there any other tutorial than "Agile Web Development with Rails" that you can suggest? So far I can''t say that RoR has been easy to learn. :-) -- Posted via http://www.ruby-forum.com/.