similar to: if else loop

Displaying 20 results from an estimated 1200 matches similar to: "if else loop"

2011 Jul 05
4
if else lop
I am trying to use if...else loop and have included a code snippet which I might like to expand. Maybe you could steer me in the right direction. library(stats) library(prob) { a <- sample ( 1:4,100, replace=T,prob=c(0.1,0.2,0.5,0.3)) b<-sample(3:6,100,replace=T,prob=c(0.2,0.2,0.2,0.4)) } dd <- data.frame(a,b) if (subset finds a vector) ( print that vector) (else
2007 Sep 14
1
ISIN numbers into Bloomberg tickers
Hi R, Can I convert ISIN numbers into Bloomberg tickers in the RBloomberg package? BR, Shubha [[alternative HTML version deleted]]
2008 Mar 13
1
R Finance
Hi, I am an R novice working with financial data. I am developing a portfolio strategy evaluation technique to back-test the performance of our screens; checking how the screened stock would've performed over the period in question. I am using quantmod in R to download the historical data from yahoo and then analyzing it using PerformanceAnalytics. My problem is that, as our screens are done
2010 Oct 18
1
Basic structure operations doubt
I'm doing these manipulations on the data frame and wondering why does R have to remember historical data on my operation and not just keep the needed info. Probably a basic fundamentals of the way R handles data .. Pls point me to the manual if possible .. I have this Index data: > head(NIFTY_INDX) Constituents.list.of.S.P.CNX.Nifty X X.1 X.2 X.3
2010 Dec 14
17
n00b questions - verbosity of config????
Hi, I''m learning puppet as that is what they use at my current work, though that could change... Question 1: Last place of work, we wrote our own perl based system which was extremely simple and concise to drive - eg to distribute a file, we would put it in: <nfsdir>/noarch/dist/etc/syslog-ng/syslog-ng.conf/ # which means create a file /etc/syslog-ng/syslog-ng.conf on the
2011 Apr 22
2
Matching a vector with a matrix row
Hello I am trying to compare a vector with a Matrix's rows.The vector has the same length as the number of columns of the matrix, and I would like to find the row numbers where the matrix's row us the same as the given vector. What I am doing at the moment is using apply as follows: apply(Matrix,1,function(x)all(x%in%LHS)) but this isn't too fast actually. I would like to know if
2012 Aug 10
4
subsetting levels of a vector
Hi, I need to subset different levels of vector in a dataset to create a new dataframe that contains only these. These observations are not numerical, so I can't use the subset() function (at least this is the response I get from R). Suppose the dataframe looks like this:   ParticipID    ERP   Electrode 1         s1  0.0370       FP1 2         s2 35.0654       FP2 3         s3
2006 Jul 06
1
which data structure for a set of time series ?
Hello, I'm a R newcomer and I'm wondering the kind of data structure that would best fit to my problem: my data are equities (stocks) : so I have a time serie (say 1 year of weekly data), and a bunch of qualitative + quantitative variables : the sector of the stock (biotech/finance...), the geographical region, the name, ISIN code, P/E ratios, whatever... The data.frame is perfect for the
2007 Sep 18
0
FW: ISIN numbers into Bloomberg tickers
Hi David, I tried the following and get the below error messages.... con = blpConnect(show.days="trading",na.action="previous.days",periodicity="da ily")# connecting Bloomberg > dat <- blpGetData(con,"US4009703799 Equity","PX_LAST",start=as.chron(as.Date("01/01/2005",
2005 Jun 08
2
unknown boot options on kernel command line.
changing i386 COMMAND_LINE_SIZE to 1024 attached is a simplistic fix to change kernel's command-line size from 256 to 1024, tomatch capability in syslinux 3.08. It seems to work. Is this all there is to it ? One of the reasons I did this was to figure out what extra options are appearing, and why. b4 extending: (the last bit is truncated) Jun 4 06:31:05 truck kernel: Kernel command
2002 Jan 25
2
selecting clusters of points
All: Are there any functions out there for selecting all the points in a region of a plot. I envision something like the identify() function except one could circle a cloud of points (and perhaps a vector would be returned of the same length as the points plotted indicating logical membership in the circled cloud). Perhaps someone has done something with the locator() function that would
2009 Sep 15
0
xts and data.frame question
Hello there! does any one know how to convert the following type of data > z DATE TIME ISIN PRICE VOL ID_DEAL RANK 1881 2009-09-11 10:30:59 RTS-9.09 117445 10 98200801 1 1882 2009-09-11 10:31:59 RTS-9.09 117450 1 98202144 6 1883 2009-09-11 10:32:59 RTS-9.09 117285 1 98203075 1 1884 2009-09-11 10:33:59 RTS-9.09 117180 3 98203828 1 1885 2009-09-11
2005 Jul 20
2
Last two digits getting cut off?
We've just setup our A@H server, with our quad port card. Everything works well so far. One thing I notice is that when I leave the handset on the hook and dial a #, all is well. If I pick up the phone and dial, it cuts off at 10 digits, which is a problem if I need to dial 1+area+phone # (12 digits). The phones are Poly Soundpoint IP 600's. I'm wondering if I've missed a
2005 Aug 15
4
Vector comparison to matrix
I am looking for a fast way to count the number of rows in a matrix are identical to a pattern vector. For example, if I am interested in counting the number of row vectors in a matrix that are identical to (1,2,3) what would I do? I have tried the identical statement in a loop but this is far too slow. I have a very large matrix and need to avoid loops at all costs. Thanks for any help.
2005 Nov 01
2
vif-antispoof
Hi folks, I started testing the antispoof feature of xen stable (2.0.7). I am stuck with it. I have setup a standard bridged environment. I understood it like this: in domU config I set up the virtual NIC like vif = [ ''mac=ae:00:00:78:78:78, ip=192.168.0.100'' ] Then I configure /etc/network/interface of this domU to show the same IP address for eth0. After restarting
2005 Oct 06
0
RE: Error Creating Domain:vbd:Segment phy:/dev/hda3 isin writable use
I''ve seen this happen before, not sure why. I changed ''phy:'' to ''file:'' and it worked. I later rebooted and ''phy:'' worked again. So you might try ''file:'' rather than ''phy:''. -- Ray -----Original Message----- From: xen-users-bounces@lists.xensource.com
2002 Sep 25
1
rbind(NULL,NULL) and simplex()
Hello everybody. I found out the other day something quite astonishing (which I guess is not astonishing at all to those in the know): in d-dimensional space, determining whether a given point is inside the convex hull of a set of n points is elegantly and quickly solvable using linear programming. If the columns of matrix "ff" are the coordinates of the set of points, then in d=2
2007 May 25
1
email the silly fuckers instead.
An alle finanzinvestoren! Diese aktie wird durchstarten! Dienstag 29. Mai startet die hausse! Firma: Talktech Telemedia Kurzel: OYQ / OYQ.F / OYQ.DE WKN: 278104 ISIN: US8742781045 Preis: 0.54 5-T Prognose: 1.75 Realisierter kursgweinn von 450% in 5 tagen! OYQ Wird wie eine rakete durchstarten! DIENSTAG 29. MAI STARTET DIE HAUSSE! But thanks for drawing my attention to it anyway. These
2012 May 18
3
colocar subscripts y cursiva
Hola He estado tratando varias formas de colocar el subíndice para los grados de libertad del F test y la expresión adj; y sencillamente no funciona. legend("topright",legend=c(expression('r[adj]=0.40'),expression('F[3,23]=15.43'),expression('P < 0.001')),col=black, bty='n',cex=0.9) Luego al tratar de colocar las cusriva utilizando par(font=3)
2010 Sep 24
3
boundary check
Dear R, I have a covariates matrix with 10 observations, e.g. > X <- matrix(rnorm(50), 10, 5) > X [,1] [,2] [,3] [,4] [,5] [1,] 0.24857135 0.30880745 -1.44118657 1.10229027 1.0526010 [2,] 1.24316806 0.36275370 -0.40096866 -0.24387888 -1.5324384 [3,] -0.33504014 0.42996246 0.03902479 -0.84778875 -2.4754644 [4,] 0.06710229 1.01950917