Re: [R] gamma distribution in rugarch package

2012-07-26 Thread MK
I don't think it is provided and gamma is neither a special case of ghyp nor ged. Is there a reason for you to use the gamma distribution? The gamma distribution only has support for positive number and thus impossible for stock return. Cheers, M On 26/07/12 09:52, saraberta wrote: Hi

Re: [R] Remove rows that have repeated items in a particular column

2012-07-25 Thread MK
Very simple mat[!duplicated(mat[, 1]), ] M On 26/07/12 06:50, Zhongyi Yuan wrote: Dear R Users, I apology for not being able to provide an adequately informative subject. Let me describe my problem with an example. For a matrix *(mat - matrix(c(1,1,2,2,2,3,3, 5,9,1,3,7,4,8), ncol = 2))*

[R] subsetting without losing the attributes

2012-07-17 Thread MK
Hi, How do I use the subset function without losing the attributes? For example, test.df - data.frame(a = rnorm(100), b = runif(100), c = rexp(100)) attr(test.df[, 1], units) - c(cm) attr(test.df[, 2], units) - c(kg) attr(test.df[, 3], units) - c(ha) ## We want this behavior str(test.df[, a,

Re: [R] Data generation

2012-01-30 Thread MK
Assuming you want the whole data matrix coming from a single distribution. matrix(rnorm(20 *30, 3, 1), 20, 30) On 30/01/12 06:33, Partha Sinha wrote: I want to generate a data matrix (20*30) having mean 3 and std deviation 1 (normal dist). pl help Partha

Re: [R] The Future of R | API to Public Databases

2012-01-13 Thread MK
The WDI package on CRAN already provide access to the World Bank data through their API, we also have an inhouse package for FAOSTAT here at FAO but it is not mature enough to be released on CRAN yet. Not sure about other international organisations but I do agree that it would be nice if

Re: [R] R report generator (for Word)?

2012-01-01 Thread MK
Have you seen r2wd? http://www.r-bloggers.com/exporting-r-output-to-ms-word-with-r2wd-an-example-session/ On Jan 1, 2012, at 10:50 AM, Michael comtech@gmail.com wrote: Happy New Year all! I am looking for a good solution for keeping record of my experiments - could you please help

Re: [R] Strplit code

2011-09-20 Thread MK
Pardon my ignorance, but why is the do.call necessary? why not just execute the rbind function? What's the advantage in putting it in a do.call wrapper? On Sep 20, 2011, at 2:44 PM, William Dunlap wdun...@tibco.com wrote: In S+ do.call's first argument must be a character string that

[R] Error: package 'lsei' is not installed for 'arch=i386'

2011-08-27 Thread MK
suggested and remove the copy in the first directory but that was the only copy that I have on the machine. Can someone give me a direction on how I can solve this problem? Thanks in advance. MK R version 2.13.1 (2011-07-08) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3