Displaying 20 results from an estimated 10000 matches similar to: "extract certain values from a ts"
2006 Oct 13
4
a correlation matrix subset where the subset avg is a maximum
Hello R group,
Given a correlation matrix, I would like to obtain the best subset of
pairs in the matrix of some size > n such that the mean of r for that
subset is a maximum compared to any other possible subset of size > n.
I've been looking at the deal and subselect packages but they don't seem
to do what I need. Does anyone have any suggestions?
Thanks in advance,
Ryan
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.
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.
2006 Oct 31
3
plotting question
i have the following code below and at the end there are some plotting
statements.
it actualy looks quite nice when you run it but there is just one
strange thing happening that
don't know how to fix.
the three things being plotted are
aggfxdata[,logbidask] which has its own set of times ( it's a zoo object
).
rollmeanlogbidask which has a subset of the times that aggfxdata has.
2006 Oct 18
2
not understanding a do.call
I did a ?do.call but i don't think i understand it.
if a, b,c,d are numeric vectors then could someone explain the
difference between
do.call("cbind",list(a,b,c,d))
and cbind(a,b,c,d).
or point to an archive on it.
the return value of cbind is a matrix or dataframe depending on what is
sent in but i don't
understand wheen it would be useful to use do.call. i realize it
2006 Oct 19
2
hit return key before next gaph appears
i am looping and creating plots which are coming to the screen. i am in
linux and remember ( in a previopus life ) i used to use a command so
that the next graph n + 1 didn't appear on the screen until
i hit the return key after graph n appeared. i thought i remeber using
the command unix but when i type unix at the r prompt, it gices me
system. it's probably a deprecated
command then but
2006 Oct 09
1
read.zoo question
I have comma delimited asci data with each row being in the format :
2006-01-24 02:41:24.00011,1.22930000,5,1.22950000,7
.
.
.
.
and i'm trying to use read.zoo ( which is similar to read.table ) to
read in the data. the data goes all the way out to milliseconds and i
can't figure out what to put for the format field. if i put nothing,
then read.zoo gets rid of the the whole time and
2007 May 02
1
Percentage area of a distribution
It seems like this should be pretty straight forward, but for some
reason the answer escapes me.
I have a normal distribution S made up of two normal distributions C
and C-bar. I need to find the percentage of the area of S that both C
and C-bar occupy.
Any suggestions?
Thanks in advance,
Alan Gibson
2006 Oct 17
1
looking for a cleaner way to do something
I have two numeric vectors each of length 17 and each is named the exact
same way.
so
obsnum ppppp ppppm pppmp . dot dot dot......
temp1 is 1417 52 63 85
obsnum ppppp ppppm pppmp . dot dot dot......
temp2 is 1213 41 50 97
what i want to have is a resultant matrix with 2 rows and 16 columns
where the 16
2007 Mar 02
1
RE-Row-wise two sample T-test on subsets of a matrix
hello all
thanks a lot for the info, I just actually needed to remove
that comma in my command line
what i had typed in was
t.test(temp.matrix[,1:11],temp.matrix[,12:22],paired=TRUE)
what i needed to do was
t.test(temp.matrix[1:11],temp.matrix[12:22],paired=TRUE)
thanks Petr, saw your comment later.
nameeta
2006 Oct 28
1
update on my weird problem
as jim pointed out ( i think we were figuring this out simultaneously.
thanks a lot jim ), it looks it does have something to do with the
fact that it's a zoo object because below i consider two cases.
in the first case, fxdatab is a zoo object and i get the length of temp
to be 1.
in the second case, fxdatac is a matrix and the results in temp are
correct.
gabor : i really hate to bother
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
2006 Nov 01
1
did my searching but still couldn't find anything for bayesian dlm
I familarized myelf with kalmanlike and structts which are approaches
for building and estimating ( and forecasting ) state space models ( or
the equivalent arima models ).
back in 2003, gavin simpson wrote an email describing the west and
harrison apprach to estimate state space models and asked if anything
was out there for
using that approach. the goals of this approach are the same as kalman
2006 Oct 10
3
2 "linux/R environment" questions
I was working on windows xp for a while and now i am back to linux ( not
sure which kind but I can find out if that helps ) and i just have two
questions that are
really environment R questions rather than R code questions.
1) i use emacs ( or xemacs if need be ) and i vaguely being able to cut
a line or a region in an emacs window and then paste it at my R prompt
so that it ran. Could I be
2006 Oct 18
1
trying to rotate barplot labels
hi everyone : i'm trying to rotate the x axis labels in my barlot ( yes,
since yesterday ) and my prob12matrix is 2 rows and 16 columns and i
followed the instructions in the
archive "rotate barplot labels". i was really looking forward to seeing
my labels turned but the plot just came back with no labels ? can anyone
see what might be going on ?
it worked when i followed the
2006 Oct 28
1
labelling of horizontal axis in acf function
this one is not a false alarm like my previous message.
i have cut and paste the code below so if anyone could run it would be
appreciated. basically,
my question is why the horizontal axis of the acf plot is labelled with
such huge numbers when
the labels should be 1 through 10 since may lag.max = 10 ?
i looked at the cdoe of acf but it was pretty much beyond me. i think it
has something to
2006 Oct 30
1
as.zoo question
this is probably a question for gabor or achim but maybe someone else
can answer it in case they are not around ?
Ifr you paste the code below ( again you would need the zoo and chron
libraries to be installed ),
you should get the error
"Error in Ops.POSIXt(frequency, freq) : %% not defined for "POSIXt"
objects".
What I want to do is take the numeric vector, lt, and
2004 Nov 01
1
case-insensitive ZIP
A development note:
In the function "install.packages", it would be helpful to those of us
who have atypical installations and install manually from ZIP files to
have
pkgnames <- sub("\\.zip$", "", pkgnames)
replaced with
pkgnames <- sub("\\.zip$", "", pkgnames, ignore.case = TRUE)
because the contributed zipfiles are ZIPfiles. The
2004 Nov 01
1
case-insensitive ZIP
A development note:
In the function "install.packages", it would be helpful to those of us
who have atypical installations and install manually from ZIP files to
have
pkgnames <- sub("\\.zip$", "", pkgnames)
replaced with
pkgnames <- sub("\\.zip$", "", pkgnames, ignore.case = TRUE)
because the contributed zipfiles are ZIPfiles. The