Displaying 20 results from an estimated 100 matches similar to: "Associating the day of week to a daily xts object"
2011 Aug 20
1
Raw epoch time from XTS
Hi,
I have a very large data set stored as an xts object.
xts is very nice about showing row labels as "human readable" dates and times.
I want the actual epoch values that are stored internally. The only way I can find to access them is one-at-a-time using the internal function: xcoredata()
Calling this in an entire column, the "R" way doesn't work. It will only
2006 Jan 14
1
Different length of objects
Hello,
i got an warning message in the following code:
f<-1:100
t<-1:100
b<-100
ll2 <- function(b,f,t) {
t<-cumsum(t)
tn<-t[length(t)]
i<-seq(along=f)
s1<-(tn*exp(-b*tn)*sum(f[i]))/(1-exp(-b*tn))
s2<-sum((f[i]*(t[i]*exp(-b*t[i])-t[i-1]*exp(b*t[i-1])))/(exp(-b*t[i-1])-exp(-b*t[i])))
s1-s2
}
ll2(b,f,t)
i think, the problem here is, that t[0] doesn't
2010 Sep 14
3
rnorm using vector of means and SDs
Hi,
I want to sample from a distribution (say a normal distribution, for example) using vectors of the different parameters (i.e. the mean and standard deviation). That is, I have a list/vector of say 100 means and another of the corresponding 100 SD's, and I want a matrix of 100 rows (one for each mean and SD pair) each having 1000 random samples.
Something like:
sample_matrix =
1998 Jan 20
1
R-beta: questions and comments
Let me first tell you that you and your cohorts are
doing a great service to the statistical community
with R. I have been working with Rseptbeta under
Win95 and I am very impressed with its capabilities.
I thought I give you some feedback gained from
my limited playing with R.
Fritz Scholz
fritz.scholz at boeing.com
=============================================================
When
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
Dear List,
I need to print out each of 'k' levels of a factor 'n' times each, where
'n' is the number of elements belonging to each factor.
I know that this can normally be done using the gl() command,
but in my case, each level 'k' has an unequal number of elements.
Example with code is as below:
vc<-read.table("P:\\Transit\\CORRECT
2010 Aug 10
3
sapply/lapply instead of loop
Using the input below, can I do something more elegant (and more efficient)
than the loop also listed below to pad strings to a width of 5? The true
matrix is about 300K rows and 31 columns.
#######################
#INPUT
#######################
> temp
DX1 DX2 DX3
1 13761 8125 49178
2 63371 v75 22237
3 51745 77703 93500
4 64081 32826 v72
5 78477 43828 87645
>
2009 May 27
1
Deviance explined in GAMM, library mgcv
Dear R-users,
To obtain the percentage of deviance explained when fitting a gam model using the mgcv library is straightforward:
summary(object.gam) $dev.expl
or alternatively, using the deviance (deviance(object.gam)) of the null and the fitted models, and then using 1 minus the quotient of deviances.
However, when a gamm (generalizad aditive mixed model) is fitted, the
2012 May 31
1
Question on meaning of '%+%', '%?%' (? = various single letter) in code
Hello. I?ve seen several uses of '%?%' in R code (with ? = a single
letter or other characters used as the middle character in a 3
character string with '%' as the 1st and 3rd characters).
I?ve also recently seen ?%+%? usage at:
http://vita.had.co.nz/papers/ggplot2-wires.pdf
on p. 7 of the document the following code appears:
(Note the '%+%' string at end of 1st line.)
2007 Feb 19
1
memory management uestion
Hi All,
I would like to ask the following.
I have an array of data in an objetct, let's say X.
I need to use a for loop on the elements of one or more columns of X and I am
having a debate with a colleague about the best memory management.
I believe that if I do:
col1 = X[,1]
col2 = X[,2]
...
colx = X[,x]
and then
for(i in whatever){
do something using col1[i], col2[i] ... colx[i]
}
2007 Apr 20
0
rv package
Hi,
Does anybody knows how to coerce an mcmc objetct to a rv object without
loose the information about what parameters. was simulated I tried do it but
it looks that this informatio was lost.
Thank you very much for any information.
Gilberto Matos.
2011 Dec 24
1
Nested model - "singularities not defined"
I am using a nested model in R and the lm output shows 47 not defined
because of singularities and I have no idea why. Any help on why this is
happening or how to fix this problem would be very much appreciated. Below
is the output I received from R.
Thanks and happy holidays!
Call:
lm(formula = Dist ~ Treatment/SiteL/Territory)
Residuals:
Min 1Q Median 3Q Max
-6.646 -1.443
2013 May 11
1
clean wheezy, R intrigue, squeeze-cran3 requires liblzma2?
Hi.
On the release version of Debian Wheezy, I am missing symbols for left and
right brackets in plotmath. Anybody see similar trouble while reviewing
demo(plotmath)?
This is a completely clean, fresh install. I've not installed any peculiar
libraries or packages, except R, the installation of which still puzzles
me.
I configured a CRAN mirror for packages using squeeze-cran3 folder, and
2006 Jun 16
2
Yahoo data download problem
Hi all R-Experts,
I'm facing one problem in yahoo data downloading. I'm suing Windows XP, R 2.2.0, and i'm using yahoo.get.hist.quote function to download data. I need 500 companies of S&P index daily 'closing price' data for last ten years. My questions are:
1) I have all the ticker names of S&P 500 companies in a .csv format. I'm reading those names in R and
2006 May 08
2
Associating with different classes
Dear Railers,
I am toying with a new project and have a schema design question.
I have a tree-like node structure. Each of the nodes will be
associated with a single object. This associated object can be of a
variety of types.
I represent the tree through a Node class which acts_as_tree. Now
imagine three other classes--Animals, Fruits and Vegetables. Each
node will have an association
2006 Feb 14
1
Associating a query with a active record class
Is there a way by which i can associate a complex query with a Model
class without using a VIEW, so that i can access all the names of the
columns returned by the query.
2010 Jan 05
0
Problem with associating comments with blog posts on same page
Hi,
I will admit I am very new to ruby and I am trying to do something
that is not in any tutorials I have found. If you see a more
conventional way to do some of the things I am trying to do, please
let me know.
What I am trying to accomplish. People can edit the comments on the
same page as the listing of posts. The problem is that when I go to
create the comment, it is not getting associated
2013 Nov 04
1
Access denied when associating a driver with a printer
Hi,
I'm trying to get point & print working against a 4.0.10 Samba server (using the sernet packages if that's relevant).
I have the printer itself setup and I've uploaded the driver, but associating the uploaded driver with the printer causes Windows to give an error: "Printer settings could not be saved. Access is denied".
I'm seeing the same symptoms on XP and
2002 Jul 05
0
Associating fonts with a program?
I have followed the documents on the net regarding installing fonts in Wine.
I currently have a T_FON.FON font and when I follow the directions about
installing fonts I end up with a filename of Bedrock.pcf. How do I go about
getting Wine to know to use this font when the program is looking for
T_FON.FON
2010 Oct 06
0
[LLVMdev] Associating types directly with debug metadata?
Pekka Nikander wrote:
>>>> I thought about that more, and I think the "right" way would be to have a syntax like
>>>>
>>>> !21 = metadata !{ typeval %struct.T, metadata !11 }
>>>>
>>>> to avoid the problem with the keyword 'type'.
>>>>
>>
>> Anyway, I already implemented an early patch for making
2011 Aug 13
2
[LLVMdev] associating id with opcodes
Hi
Is there a way to associate additional info with every opcode
like an id either through the td files or when building an instruction
?
thanks
shrey