Hello R-Users,
I'm looking for a way to scale the rows of a sparse matrix M with about
57,000 rows, 14,000 columns, and 238,000 non-zero matrix elements; see
example code below.
Usually I'd use the base::scale() function (see sample code), but it
freezes my computer. The same happens when I try
Thank you,
May I know the reason for keeping frequency as 60, the package
says it expects frequency in hertz, how does it work if I input daily data?.
The correlation max shown by the plot is at around 55 -ve lag (0.36). which is
not the actual case, so there is some thing
A statistics, not an R question, and hence OT here.
However, look at the CRAN Time Series Task View and/or post on a
statistics site like stats.stackexchange.com
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus
Have a look at the midasr package available on CRAN.
It might provide what you need.
Berend
> On 12 Jan 2016, at 17:16, Lorenzo Isella wrote:
>
> Dear All,
> Suppose you have some time series, e.g. monthly data about
> profits in a company.
> I am trying to develop a
Hi maryam (firoozi),
Apart from the fact that you are overworking your sires (or the more
realistic scenario of differential mating success) you can achieve the
700:30 ratio in this simple way:
sires<-paste("Sire",1:30,sep="")
dams<-paste("Dam",1:700,sep="")
Hello,
I think that the package "seewave" may help you. See corenv() function.
https://cran.r-project.org/web/packages/seewave/seewave.pdf
library(seewave)
sst.ts <- ts(dc$sst, frequency=60)
t2m.ts <- ts(dc$t2m, frequency=60)
corenv(sst.ts, t2m.ts)
corenv.res <- corenv(sst.ts, t2m.ts,
> getwd()
[1] "/Users/johnbeyer"
> dir
function (path = ".", pattern = NULL, all.files = FALSE, full.names =
FALSE,
recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE,
Note what a difference the parentheses after the function name make. With
parentheses,
often with
> On Jan 12, 2016, at 1:22 PM, John Beyer wrote:
>
> This is what I get when i try to run dir or ls on my R Console:
>
>
> getwd()
> [1] "/Users/johnbeyer"
>> dir
> function (path = ".", pattern = NULL, all.files = FALSE, full.names = FALSE,
>recursive = FALSE,
I am trying to write a function which will allow me to analyze many variables
all of which have the same form, Base.stem and Disch.stem, where stem varies
from variable to variable, e.g. Base.rolling and Disch.rolling, Base.standing,
Disch.standing.
I want to pass a dataframe and the stem of
This is what I get when i try to run dir or ls on my R Console:
getwd()
[1] "/Users/johnbeyer"
> dir
function (path = ".", pattern = NULL, all.files = FALSE, full.names = FALSE,
recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE,
no.. = FALSE)
.Internal(list.files(path,
I wonder if something like:
format.list <- function(x, ...) {
rep(class(x[[1]]), length(x))
}
would be sufficient? (prbly needs more 'if's though)
On Tue, Jan 12, 2016 at 12:15 PM, Jenny Bryan wrote:
> Is there a general problem with printing a data.frame when it has a
>
Is the following function, myFormula(), what you are looking for?
myFormula <- function(stem, env = parent.frame()) {
eval(bquote(.(as.name(paste0("Disch.",stem))) ~
.(as.name(paste0("Base.",stem))),
list(stem=as.name("rolling"))), envir=env)
}
str(myFormula("myStem"))
#Class "formula"
I think you're looking for ?bquote .
Something like this should give you the idea:
nm <- "yvar"
bquote( .(y)~x, list(y = as.symbol(nm )))
The key is distinguishing between the character string "yvar" and the
(language) object, as.symbol("yvar").
Cheers,
Bert
Bert Gunter
"The trouble with
Dear Maryam
Please keep the list cc'ed in as others will have better answers than me.
If dam has 700 members then sample (dam) gives you a random permutation
of dams, each once.
I did not understand the second part as i do not think you can have 30
sires each occurring 20 times. Did you
Dear mr/madam
I want to mak a matrix with 10 row and 3 column . this matrix is pedigree. my
input
sire<- c(1,2,3,4,5)
count<- 0
sire<- cbind(sire,count)
dam<- c(1,2,3,4,5,6,7,8,9,10)
ped<-mstrix(NA,nrow=10,ncol=3)
for(i in 1:10){
Sire<- sample(sire[,1],1)
a<- which(sire[,1]==Sire)
Dear All,
Suppose you have some time series, e.g. monthly data about
profits in a company.
I am trying to develop a model to predict what the profit will be the
next month or two.
Other useful data is for sure the number of employes in the company,
the volume of product purchases etc...but they
Dear Maryam
sample(dam) would give you a random permutation of dams
sample(c(sire, sire)) would give you a random permutation of sires, each
twice.
Does that help?
On 12/01/2016 05:53, maryam firoozi via R-help wrote:
Dear mr/madam
I want to mak a matrix with 10 row and 3 column . this
Is there a general problem with printing a data.frame when it has a
list-column of S4 objects? Or am I just unlucky in my life choices?
I ran across this with objects from the git2r package but maintainer
Stefan Widgren points out this example below from Matrix as well. I note
that the offending
18 matches
Mail list logo