Displaying 20 results from an estimated 7000 matches similar to: "Accessing named members of a list in an array"
2012 Mar 05
2
no partial matching of argument names after dots argument - why?
I noticed that the argument names after the dots argument are not partially matched.
foo <- function(one, two, ...){
one + two
}
> foo(o=1, t=2)
[1] 3
foo <- function(one, ..., two){
one + two
}
> foo(o=1, t=2)
Fehler in one + two : 'two' fehlt
Can someone explain me the reason for this behavior?
THX
Mark
????????????????????????????????????
Mark Heckmann
Blog:
2013 Jan 28
1
Setting inline hook to a function identical to default in knitr turns of exponential formatting
Hello List,
while dealing with a questin of 'xiaodao' (
http://r.789695.n4.nabble.com/Problem-with-large-small-numbers-in-knitr-tp4653986.html)
I noticed that copying the default inline hook function obtained by
knit_hooks$get("inline")
into a knit_hook$set(inline = <...>) call turns off exponential
fomatting in the resulting .tex file.
I used a stripped version of
2006 Mar 28
3
How to generate a list of lists recursively (for bayesm)
Dear all,
I need to generate a list of lists as required by the bayesm-package. This means in my application that I have to generate a list which consists of 2000 elements, which are lists themselves:
list(list(y1,X1),...,list(y2000,X2000)).
The y are vectors and the X are matrices of different dimensions. I tried to solve this problem iteratively by the following code, but received an error
2013 Feb 28
2
Fortune?
I think the rule is that you can do anything as long as you don't
complain. If you want to complain, you must follow the instructions.
-- Jari Oksanen in
Re: [Rd] Keeping up to date with R-devel
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @burnsstat @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of:
'Impatient R'
'The R
2011 Sep 12
3
Solve your R problems
R-help is all about solving R problems.
So here ya go:
http://www.portfolioprobe.com/2011/09/12/solve-your-r-problems/
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')
2012 Oct 22
1
Egarch (1,1) with Student t distribution using rugarch
Hi
I was trying to implement Egarch (1,1) with Student t distribution using rugarch. But I was not getting any value.
Following were the commands that I was using:
library(rugarch)
spec=ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)), mean.model=list(armaOrder=c(1,1), arfima=FALSE), distribution.model="std")
fit=ugarchfit(data=b,spec=spec)
sigma(fit)
May I
2007 Nov 19
2
Extracting only one part of an string
Hi
I wonder if there's a smarter way to do this procedure.
I have a vector of filenames wher I only am interested in the first part of
the filename.
I would use the following method of extracting the first part. But is there
a more simple way of doing this?
Names <-
2012 Jul 17
3
complexity of operations in R
Hello!
I am optimizing my code in R and for this I need to know a bit more about
the internals. It would help tremendously if someone could link me to a
page with O()-complexities of all the operations.
In this particular case, I need something like a linked list with O(1)
insertLast/First ability. I can't preallocate a vector since I do not know
the final size of the list ahead of time.
The
2011 Jul 06
7
Xen 4.0 - prerequisites for succesfull live migration?
Hi,
I have three Xen hosts running Xen 4.0.2 (OpenSuSE 11.4 based). I also
have one ''NFS'' server with an NFS export holding VM images and
configuration files.
Each host has a dedicated LAN link directly to the NFS server. I have
another separated NFS export for VM locking (but I had the same issues
before).
When I attempt to live migrate a VM, it *looks''*like
2011 Nov 20
1
alpha_1 + beta_1 >1 in GARCH(1,1)
Hi,
as i suppose to know in a stationary GARCH(1,1) model the sum of alpha and
beta has to be smaller than 1.
But if i use the garchfit() function from the package fGarch for my
timeseries the sum is bigger than 1.
The adf.test tells me a p-value smaller than 0.01 instead.
What does this mean for me?
Can i trust in the coefficients in this case?
mfg user84
--
View this message in context:
2014 Jan 03
1
wishlist: decreasing argument to is.unsorted
I've just realized that it could be handy
to have a 'decreasing' argument in 'is.unsorted'.
And I'm cheekily hoping someone else will
implement it.
It is easy enough to work around (with 'rev'),
but would be less hassle with an argument.
The case I have in mind uses 'is.unsorted' in
'stopifnot'.
Pat
--
Patrick Burns
pburns at pburns.seanet.com
2012 Feb 10
3
Schwefel Function Optimization
All,
I am looking for an optimization library that does well on something as chaotic as the Schwefel function:
schwefel <- function(x) sum(-x * sin(sqrt(abs(x))))
With these guys, not much luck:
> optim(c(1,1), schwefel)$value
[1] -7.890603
> optim(c(1,1), schwefel, method="SANN", control=list(maxit=10000))$value
[1] -28.02825
> optim(c(1,1), schwefel, lower=c(-500,-500),
2012 Feb 10
3
Schwefel Function Optimization
All,
I am looking for an optimization library that does well on something as chaotic as the Schwefel function:
schwefel <- function(x) sum(-x * sin(sqrt(abs(x))))
With these guys, not much luck:
> optim(c(1,1), schwefel)$value
[1] -7.890603
> optim(c(1,1), schwefel, method="SANN", control=list(maxit=10000))$value
[1] -28.02825
> optim(c(1,1), schwefel, lower=c(-500,-500),
2011 Jan 06
1
Calcuting returns
Dear R forum helpers,I have following datatrans <- data.frame(currency_transacted = c("EURO", "USD", "USD", "GBP", "USD", "AUD"), position_amt = c(10000, 25000, 20000, 15000, 22000, 30000))date <- c("12/31/2010", "12/30/2010", "12/29/2010", "12/28/2010", "12/27/2010",
2012 Sep 05
1
run EGARCH package on REXCEl
Hi,
I have limited experience on R and recently started using REXcel. Although I have been able to run both simple functions (like mean etc) and some complex ones (like Principal Component analysis, PCA) using RExcel, I am facing some problems while running EGARCH model. For this I have downloaded the 'betategarch' package for R to run EGARCH with student t dist. Although the package has
2012 Nov 27
2
Books for fully understanding internal logics on some packages(quantmod, xts, zoo and chron)
Hello,
I'm very interested in using financial time series data, but I'm a beginner of R programming.
I'd like to fully understand internal logics on several time-series related packages such as quantmod, xts, zoo, chron, etc.
So, I read some books, 'R Cookbook' and 'Art of R Programming' and another simple tutorials.
But I still can't understand grammars of the
2011 Aug 16
2
merge(join) problem
I have two datasets:
A with columns Open and Name (and many others, irrelevant to the merge)
B with columns Time and Name (and many others, irrelevant to the merge)
I want the dataset AB with all these columns
Open from A - a difftime (time of day)
Time from B - a difftime (time of day)
Name (same in A & B) - a factor, does NOT index rows, i.e., there are
_many_ rows in both A & B with
2011 Dec 23
3
if statement problem
Hello,
I want to do fisher test for the rows in data file which has value less than
5 otherwise chi square test .The p values from both test should be stored in
one resulted file. but there is some problem with bold if statement. I don't
know how
implement this line properly.
x = cbind(obs1,obs2,exp1,exp2)
a = matrix(c(0,0,0,0), ncol=2, byrow =TRUE) #matrix with initialized
values
2013 Mar 11
2
how to convert a data.frame to tree structure object such as dendrogram
I have a data.frame object like:
> data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd'))
x y
1 A Ab
2 A Ac
3 B Ba
4 B Bd
how could I create a tree structure object like this:
|---Ab
A---|
_| |---Ac
|
| |---Ba
B---|
|---Bb
Thanks,
Zech
[[alternative HTML version deleted]]
2011 Mar 21
2
Correlation for no of variables
Dear R helpers,
Suppose I have stock returns data of say 1500 companies each for say last 4 years. Thus I have a matrix of dimension say 1000 * 1500 i.e. 1500 columns representing companies and 1000 rows of their returns.
I need to find the correlation matrix of these 1500 companies.
So I can find out the correlation as
cor(returns) and expect to get 1500 * 1500 matrix. However, the process