Displaying 17 results from an estimated 17 matches similar to: "taking daily means from hourly data"
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment
lines before data for each time interval. For each time interval there are
500 data points. I want to change the dataset such that I have the following
format:
t1 t2 t3 ................
0.00208 0.00417 0.00625 .................
a1 a2 a3 ...................
2003 Feb 14
1
eigen() error: R Version 1.6.1 on Mac OS X (PR#2550)
Consider this matrix:
> sg
X1 X2 X3 X4 X5
1 3.240 2.592 2.592 2.592 2.592
2 2.592 3.240 2.592 2.592 2.592
3 2.592 2.592 3.240 2.592 2.592
4 2.592 2.592 2.592 3.240 2.592
5 2.592 2.592 2.592 2.592 3.240
If I compute the eigenvalues of the 'sg' matrix using R Version 1.5.0
(2002-04-29) under Linux (or using Version 1.4.0 (2001-12-19) under
Solaris), I obtain:
>
2012 Jun 13
2
asign variables in a "for" loop
Dear R-helpers,
I'm stuck with a little problem that surely has an easy solution but I
can't think of a way to solve it. I'd really appreciate any help you can
offer me!
I'll provide a small example. Given a dataframe data.txt that looks like
this:
ID freq Var Var_mean Ratio_mean Var_median
Ratio_median Var_sum Ratio_min Var_max Ratio_max Var_min
2008 Jun 16
1
回复: cch() and coxph() for case-cohort
I tried to compare if cch() and coxph() can generate same result for
same case cohort data
Use the standard data in cch(): nwtco
Since in cch contains the cohort size=4028, while ccoh.data size =1154
after selection, but coxph does not contain info of cohort size=4028.
The rough estimate between coxph() and cch() is same, but the lower
and upper CI and P-value are a little different. Can we
2008 Nov 11
2
strsplit (regex)
#how do I break these up into first two letters (RM), number, and then
the last part
#is there an easily accessible regex tutorial on the internet?
v = (structure(1:122, .Label = c("RM215Temp", "RM215SpCond", "RM215DO.Conc",
"RM215Depth", "RM215pH", "RM215ORP", "RM215Turbidity.", "RM215Battery",
"RM215DO.",
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964).
month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009
1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920
2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2005 Jun 23
0
Error in stepAIC function using a survival model
I keep getting the same error in my survival analysis. I have access to a
very large database but am just using small subsets to get some results. In
this particular subset there is 50 explanatory variables(both factors of
many levels and covariates) and 117 data pieces with some of the data being
censored. I am using the stepAIC command to find my model. My initial
model is built from all
2012 Apr 30
0
New package for morphology and smoothing in any number of dimensions: mmand
Dear all,
I'm pleased to announce the release on CRAN of the "mmand" package
(for Mathematical Morphology in Any Number of Dimensions). It provides
functions for performing mathematical morphology (erode, dilate,
etc.), smoothing, and other kernel-based operations on array-like
objects of any dimensionality. The package is centred around a
flexible function called morph(), which can
2012 Apr 30
0
New package for morphology and smoothing in any number of dimensions: mmand
Dear all,
I'm pleased to announce the release on CRAN of the "mmand" package
(for Mathematical Morphology in Any Number of Dimensions). It provides
functions for performing mathematical morphology (erode, dilate,
etc.), smoothing, and other kernel-based operations on array-like
objects of any dimensionality. The package is centred around a
flexible function called morph(), which can
2007 Dec 18
0
R command "leap"
After applying the "step" command to a long list of predictors I came up
with the following showing there still are some non significant
coefficients.
I'd like to try the command "leap". However, I don't quite understand how it
returns the spared predicting variables.
Can please, someone help ?
Tank you in advance.
Mara EM
> summary(stepmod)
Call:
lm(formula =
2005 Apr 27
1
making table() work
I am trying to do some verification across a large dataset, cuData, that
has 23 columns.
Column 23 (similarity) is the outcome 0 or 1 and the other columns are
the features.
I do this:
verificationglm.model <- glm(formula = similarity ~ ., family=binomial,
data=cuData[1:1000,])
and produce the model:
> summary(verificationglm.model)
Call:
glm(formula = similarity ~ ., family =
2008 Apr 30
8
Why R is 200 times slower than Matlab ?
I am switching from Matlab to R, but I found that R is 200 times slower than
matlab.
Since I am newbie to R, I must be missing some important programming tips.
Please help me out on this.
Here is the function:
## make the full pair-wise permutation of a vector
## input_fc=c(1,2,3);
## output_fc=(
1 1 1 2 2 2 3 3 3
1 2 3 1 2 3 1 2 3
);
grw_permute = function(input_fc){
fc_vector = input_fc
2010 Sep 04
3
How can I fixe convergence=1 in optim
Hi R users,
I am using the optim funciton to maximize a log likelihood function. My
code is as follows:
p<-optim(c(-0.2392925,0.4653128,-0.8332286, 0.0657, -0.0031, -0.00245,
3.366, 0.5885, -0.00008,
0.0786,-0.00292,-0.00081, 3.266, -0.3632, -0.000049, 0.1856,
0.00394, -0.00193, -0.889, 0.5379, -0.000063,
0.213, 0.00338, -0.00026, -0.8912, -0.3023, -0.000056), f,
2010 Mar 15
0
Partial Credit Models using eRm
Hello all,
I have just started using fitting the PCM (Partial Credit Model) using eRm and have 2 problems which I cannot solve, I have checked everywhere on the net, but no joy:
Firstly,
I have fit a PCM model to 10 variables with differing response categories (3 for the first 6 items, 4 for the following 2 and 2 for the last two items).
mat1 <- matrix(c(rasch_bart$bart_bowel,
2014 Sep 01
1
Correlation Matrix with a Covariate
R Help -
I'm trying to run a correlation matrix with a covariate of "age" and will
at some point will also want to covary other variables concurrently.
I'm using the "psych" package and have tried other methods such as writing
a loop to extract semi-partial correlations, but it does not seem to be
working. How can I accomplish this?
library(psych)
> set.cor(y =
2008 Jul 29
7
[Bug 1494] New: doesn't look on path for $SHELL
https://bugzilla.mindrot.org/show_bug.cgi?id=1494
Summary: doesn't look on path for $SHELL
Classification: Unclassified
Product: Portable OpenSSH
Version: 5.1p1
Platform: Other
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=49272
8
OS/Version: Linux
Status: NEW
Severity:
2007 Dec 08
0
help for segmented package
Hi,
I am trying to find m breakpoints of a linear regression model. I
used the segmented package. It works fine for small number of
predicators and breakpoints.(3 r.v. 3 points). However, my model has
14 variables it even would not work even for just one breakpoints!.
The error message is always estimated breakpoints are out of range.
Since my problem is time related problem. So I