Displaying 20 results from an estimated 7000 matches similar to: "I think a simple question"
2006 Nov 14
3
the secret (?) language of lists
A couple days ago, Mark Leeds asked about a solution that would
basically stagger two lists, a and b, to return a list in the form of
a[1], b[1], a[2], b[2], a[3].... In particular, the summary of his
question was in reference to lists defined by
x <- 5
tempin <- seq(1,1411, by=30)
a <- tempin
b <- tempin + x
I offered the following function
everyOther <-
2006 Nov 13
2
indexing question
I have the following set of indices, call it idx, that correspond to the
indices of a vector say temp.
[1] 31 36 41 61 66 71 91 96 101 121 126 131 151
156 161 181 186 191 211 216 221 241 246 251 271 276 281
301 306 311 331 336 341 361 366
[36] 371 391 396 401 421 426 431 451 456 461 481 486 491
511 516 521 541 546 551 571 576 581
2007 Apr 16
1
Names in vector occurring in another vector
I have a vector of character strings such as
mainnames<-c("CAD","AUD") and another vector say
checknames<-c("CAD.l1","AUD.l1","JPY.l1","EUR.l1","CAD.l2","AUD.l2","JPY
.l2","EUR.l2")
I want a new vector of character strings that is just
2006 Nov 27
5
automatic cleaning of workspace
I'm having that problem where I am sometimes using an object that's from
a previous workspace when I don't want to be doing that. I was thinking
of putting rm(objects=ls()) in my first.R function But, the problem with
doing this, is that it doesn't prompt you with "are you sure" and there
could be very rare cases where I don't want to delete the workspace ? Is
there a
2012 Jan 04
5
simulating stable VAR process
Hello all,
I looking at package dse or vars or mAr
I know how to simulate a VAR(p) process, my problem is that most of those
processes are unstable (not weakly stationary).
Do anybody know how to generate a random VAR (or VARMA even better) process
that is weakly stationary?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/simulating-stable-VAR-process-tp4261177p4261177.html
2015 Jan 29
2
[RFC PATCH v1 2/2] armv7(float): Optimize encode usecase using NE10 library
Viswanath Puttagunta wrote:
> if OPUS_ARM_NEON_INTR
> CELT_ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \
> - %test_unit_rotation.o %test_unit_mathops.o
> -$(CELT_ARM_NEON_INTR_OBJ): CFLAGS += $(OPUS_ARM_NEON_INTR_CPPFLAGS)
> + $(CELT_SOURCES_ARM_NE10:.c=.lo) \
> + %test_unit_rotation.o %test_unit_mathops.o \
> +
2006 Oct 24
6
extract certain values from a ts
Hi,
Having several daily wind speed time series I want to extract those
consecutive days over and below certain values (i.e. 5 < x <8) Don't
know which funtion to use (aggregate, lapply?) and how to do it.
Thanks in advance
Antonio
2007 Aug 24
4
Turning a logical vector into its indices without losing its length
I have the code below which gives me what I want for temp based on
logvec but I was wondering if there was a shorter way ( i.e :
a one liner ) without having to initialize temp to zeros. This is
purely for learning purposes. Thanks.
logvec <- c(TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,FALSE)
temp<-numeric(length(invec))
temp[invec]<-which(invec)
temp
[1] 1 0 0 4 0 0 7 0
obviously, the
2007 Oct 11
6
confusion with R syntax
I just noticed something by accident with R syntax that I'm sure is
correct but I don't understand it. If I have
a simple numeric vector x and I subscript it, it seems that I can then
subscript a second time with TRUE
or FALSE, sort of like a 2 dimensional array in C. Does someone know if
this is documented somewhere
Because it's neat but I never knew it existed. To me it seems like a
2007 Oct 12
2
Plotting question
I am constructing plots ( regular not lattice ) and my initial command
is
par(mar=c(3,4,2,2), mfcol=c(5,2))
and then I create 10 plots on the page. It looks great but the plots on
the page go in the order
1 6
2 7
3 8
4 9
5 10
Where the numbers denote decile breakdowns.
Is there an easy way to make them go from left to right so
1 2
3 4
5 6
7 8
9 10
I could try
2006 Nov 14
2
putting a column name on a zoo object
does anyone know how to put a column name on a zoo object. I think achim
and gabor are off line or they have gotten totally tired of me
an decided to ignore me ( which is totalyy understandable ).
logbidask<-log((aggfxdata[,"bid"] + aggfxdata[,"ask"])/2.0)
logbidask doesn't have a name and I can't figure out how to get one on
it ?
aggfxdata is a zoo object.
2007 Jun 12
3
Panel data
Dear all R users,
I have a small doubt about panel data analysis. My basic understanding on Panel data is a type of data that is collected over time and subjects. Vector Autoregressive Model (VAR) model used on this type of data. Therefore can I say that, one of statistical tools used for analysis of panel data is VAR model? If you clarify my doubt I will be very grateful.
Thanks and regards,
2006 Oct 24
4
How to start R with a file loaded?
Hi!
I've made great progress in my R programming, but I am again stuck on a
beginner's problem.
I would like to start R with a command line that loads a file, and if
possible, executes a function.
Can anyone give me an example of how to do this?
For example, in lisp, I would say:
$ lisp -load toto.lisp -eval '(do-something $PORT)'
to load the file "toto.lisp", then
2006 Oct 24
4
avoiding a loop
I think I asked a similar question 3 years ago to the Splus list and I
think the answer was no or noone answered so noone should spend more
than 5 minutes on this
because it could definitely be a waste of time.
My question is whether the function below can be rewritten without a for
loop. apply is fine if it can be done that way but i doubt it. I call it
a lot and would
prefer to not loop.
2007 Aug 31
3
Choosing the optimum lag order of ARIMA model
Dear all R users,
I am really struggling to determine the most appropriate lag order of ARIMA model. My understanding is that, as for MA [q] model the auto correlation coeff vanishes after q lag, it says the MA order of a ARIMA model, and for a AR[p] model partial autocorrelation vanishes after p lags it helps to determine the AR lag. And most appropriate model choosed by this argument gives
2006 Nov 25
3
Multiple Conditional Tranformations
Greetings,
I'm learning R and I'm stuck on a basic concept: how to specify a
logical condition once and then perform multiple transformations under
that condition. The program below is simplified to demonstrate the goal.
Its results are exactly what I want, but I would like to check the
logical state of gender only once and create both (or any number of)
scores at once.
2007 May 08
2
Looking for a cleaner way to implement a setting certain indices of a matrix to 1 function
I wrote an ugly algorithm to set certain elements of a matrix to 1
without looping and below works and you can see what
The output is below the code.
K<-6
lagnum<-2
restrictmat<-matrix(0,nrow=K,ncol=K*3)
restrictmat[((col(restrictmat) - row(restrictmat) >= 0 ) &
(col(restrictmat)-row(restrictmat)) %% K == 0)]<-1
restrictmat[,(lagnum*K+1):ncol(restrictmat)]<-0
restrictmat
2006 Oct 17
3
barplot question
i'm doing a bar plot and there are 16 column variables. is there a way
to make the variable names go down instead of across when you do the
barplot ?
because the names are so long, the barplot just shows 3 names and leaves
the rest out. if i could rotate the names 90 degrees, it would probably
fit a lot more.
or maybe i can use space to make the horizontal width longer ? I looed
up ?barlot but
2007 Sep 04
2
Confusion using "functions to access the function call stack" example section
I was going through the example below which is taken from the example
section in the R documentation for accessing the function call stack.
I am confused and I have 3 questions that I was hoping someone could
answer.
1) why is y equal to zero even though the call was done with gg(3)
2) what does parents are 0,1,2,0,4,5,6,7 mean ? I understand what a
parent frame is but how do the #'s relate
2006 Dec 08
2
any way to make the code more efficient ?
The code bekow works so this is why I didn't include the data to
reproduce it. The loops about 500
times and each time, a zoo object with 1400 rows and 4 columns gets
created. ( the rows represent minutes so each file is one day
worth of data). Inside the loop, I keep rbinding the newly created zoo
object to the current zoo object so that it gets bigger and
bigger over time.
Eventually,