search for: sample_matrix

Displaying 4 results from an estimated 4 matches for "sample_matrix".

2011 Mar 07
1
Associating the day of week to a daily xts object
I have the following xts objetct "temp" > str(temp) An ?xts? object from 2010-12-26 to 2011-03-05 containing: Data: num [1:70, 1] 2.95 0.852 -0.139 1.347 2.485 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr "t_n" Indexed by objects of class: [POSIXct,POSIXt] TZ: GMT xts Attributes: NULL > temp t_n 2010-12-26
2010 Sep 14
3
rnorm using vector of means and SDs
...xample) 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 = rnorm(n=1000, mean=vector_of_100_means, sd=vector_of_100_corresponding_SDs) Is this possible? Thanks for any help in advance.
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
2012 May 31
1
Question on meaning of '%+%', '%?%' (? = various single letter) in code
...age 16.? Page 16 doesn?t specifically address ?%?%?, at least in a way I can understand. xxxxxxxxxxx I tried an experiment with %+%, and it failed to work! I loaded xts package (must have xts and zoo installed b/c xts has a dependency on zoo.) Entered the following: > library(xts) > data(sample_matrix) > x1 <- sample_matrix > x1 > x3 <- x1 %/% x1 > x3 > x4 <- x1 %+% x1 MH (Mike Hilt comment): After entering ?x3?, the data was listed with all values = 1, which is what should happen when binary division is done ? CHECK! MH: After entering ?x4 <- x1 %+% x1 R returns: ?...