Displaying 20 results from an estimated 2000 matches similar to: "rnorm() converted to daily"
2008 Jun 26
1
How to turn Time Series daily values into weekly means (aggregate?)
#this is a daily series of precipitation data. I would like to condense it
into weekly means. How can I do this
#as a side note I would like to do this same thing to two years worth of
fifteen minute interval data and make it into
#a series of daily averages (there are 96 readings per day)
#is aggregate the right function? or...
y <- c(1.23, 0, 0, 0, 0, 0, 0, 0, 0, 0.27, 0, 0.29, 0, 0, 0,
2002 Dec 03
1
Any difference in cbind() b/w SPLus and R??
Dear Experts,
I have a data object named "data.char".
When I use cbind(data.char) in SPlus, I got the following results:
> cbind(data.char)
data.char
data matrix, 2700
excluded list, 3
cluster.var character, 2
strata list, 3
xlog CT
link logit
gpcorr 1
missing.row numeric, 0
zero.row numeric, 22
infile perc.csv
attr(,
2005 Feb 23
2
data.frame error message
Dear R users,
I am using v2.0.1 on Windows 2000. I have read a ".dat" file with several
vectors, including 2 factors (2 levels x 3 levels), and a vector of
responses, into R. There are no unique row names. When I try plot(x,y) or
lm(y~x) the following error is returned:
Error in model.frame(formula, rownames,...extranames: variable lengths differ
What am I doing wrong? I am a
2006 Feb 08
3
difference between rnorm(1000, 0, 1) and running rnorm(500, 0, 1) twice
Hi R users
This looks a simple question
Is there any difference between between rnorm(1000,0,1) and running
rnorm(500,0,1) twice in terms of outcome ?
TM
2000 Mar 07
2
lm(rnorm(1000)~rnorm(1000)) kills rw1000 (PR#476)
First:
R core: (Thank You!)^HUGE_VAL
Now, down to business:
In a loop or in repeated command lines:
system.time(lm(rnorm(1000)~rnorm(1000)))
( or lm(rnorm(1000)~rnorm(1000))$coef )
fails after several iterations with the Windows message 'This program
has performed an illegal operation and will be shut down. If the
problem persists, please contact the vendor'.
clicking on DETAILS
2000 Aug 24
0
distributional properties of rnorm
I've been trying to generate a series of random normal distributions using
the rnorm function. After I generated the first set:
set1<-rnorm(150, 505.5, 15.2)
I checked the mean and standard deviation of set1. I was surprised to find
the mean at 502.37 (rounded) and the standard deviation at 13.3 (again,
rounded). While I know that it is unrealistic to expect the distribution
of the
2000 Aug 24
0
rnorm
Thanks to all who replied to my query about the "normality" of rnorm. I am
using R 1.1.1 (the version released last week) under Windows 98. It has
been unusually hot here and I noticed that the CPU fan seemed to be running
at high speed for a long time. The CPU probe that I use to monitor the
temperature emitted a warning shortly after I sent off the email. After
shutting my
2014 Jun 07
2
Interval for rnorm command?
Hello everyone!
I want to create a data vector using the "rnorm" command. Let's say /x <-
rnorm(100, 1, 2)/. This gives me 100 values from the specific normal
distribution. However, I want to generate a variable that has a certain
range of values, e.g. values can't exceed the interval /[-3.7; 3.7]/. How
can I implement such an interval?
Thanks for your help and sorry if
2002 Jul 26
0
plotting density(rnorm(1000)) crashed once (PR#1837)
How can a random result be reproducible? You could have told us the seed
in use! I've tried this ten times without a crash, on two separate
machines, one XP and one 2000.
On Fri, 26 Jul 2002 Mike.Prager@noaa.gov wrote:
> I am experiencing a reproducible crash from the following statement:
>
> plot(density(rnorm(1000)))
>
> on R 1.5.1 on Windows 2000.
>
> This is a
2006 Feb 23
2
rnorm returning NA's (PR#8635)
Full_Name: Josh McNutt
Version: 2.2.1
OS: Win XP
Submission from: (NULL) (192.88.209.232)
> which(is.na(rnorm(20000000)))
[1] 15242377
> which(is.na(rnorm(10000000)))
[1] 3692029
> which(is.na(rnorm(40000000)))
[1] 5560337 5938719 33888822
> which(is.na(rnorm(50000000)))
[1] 25231754 42397181 45085564 45363557
2007 May 12
2
Problem with rnorm ?
Hi,
I couldn't get the rnorm() work right in C, for example, the following code produce strange results.
#include <stdio.h>
#include <Rmath.h>
int main(void){
double x[3];
for(int i=0;i<3;i++) x[i]=rnorm(0,1);
printf("%lf,%lf,%lf",x[0],x[1],x[2]);
return 0;
}
output : -8.773321,-8.773321,-8.773321
compiling script: gcc -std=gnu99 -Wall
2008 Mar 30
1
norm_rand() in R-extension vs rnorm in R ---which is better?
I need to generate good quality of random numbers from univariate
normal distribution for further transformation. I tried rnorm in R but
it was not good sometimes. Someone said C++ standard library or
Fortran's built-in functions for that are good. I found that there is
double norm_rand() in R-extension. Does this function, norm_rand()
use the same algorithm as rnorm in R or something similar
2018 Oct 05
0
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
On Fri, Oct 5, 2018 at 2:07 PM hmh <hugomh at gmx.fr> wrote:
>
> On 05/10/2018 10:28, Annaert Jan wrote:
> > you discard any time series structure;
> But that is PRECISELY what a call a bug:
> There should not be any "time series structure" in the output or rnorm,
> runif and so on but there is one.
>
> rnorm(N,0,1)
> should give on average the same
2018 Oct 05
0
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
> Nope.
> This IS a bug:
> The negative auto-correlation mostly disappear when I randomize small samples using the R function 'sample'.
> Please check thoroughly the code of the 1st mail I sent, there should be no difference between the two R functions I wrote to illustrate the bug.
> The two functions that should produce the same output if there would be no bug are
2005 Dec 15
1
precision of rnorm
How many distinct values can rnorm return?
I assume that rnorm manipulates runif in some way, runif uses the Mersenne
Twister, which has a period of 2^19937 - 1. Given that runif returns a 64
bit precision floating point number in [0,1], the actual period of the
Mersenne Twister in a finite precision world must be significantly less.
One of the arguments for Monte Carlo over the bootstrap is
2008 Nov 05
1
Applying a loop with rnorm() to eliminate duplicate coordinates in a dataframe object
Dear colleagues
I found duplicate coordinates trying to convert a dataframe object (see the
attached file) into a geodata one ('geoR' package is needed). My dataframe
object consists of 2 columns with UTM geographical coordinates and a 3rd
column with fish densities .
To overcome the handicap I must add a tiny value generated by rnorm() to
each geographical coordinate. And it must be in
2009 Jul 16
3
rnorm
Hi I want to simulate random numbers normal distributed with this size
(2000,10000).
I tried this but my computer exhaust there is a fast way to make it?
randz<-matrix(rnorm(2000000),2000,10000)
[[alternative HTML version deleted]]
2010 Dec 20
1
source file for rnorm
Dear Sir/Madam:
I am sorry if this is a simple question. I have downloaded the source code for R but could not find the source file that has the rnorm function definition. Could you please let me know which file has the function? Also, in general, how do I find the source file of a given function?
Thanks.
Yue Zhang, CFA
Cohen & Steers Capital Management, Inc.
280 Park Ave., 10th Floor
New
2011 Dec 04
1
rnorm command
Hello,
I use the command rnorm, and I feed these results into a lmer command.
Since I am using the rnorm command I expect to get different results for
each iteration, yet for each iteration I am getting the same answer. If
someone understands why I am getting the same answer every time with a
random number generator, I would appreciate help in understanding why this
is happening. Is the lmer
2003 Mar 25
1
BUG report : 'rnorm' (LINUX, R 1.6.2) (PR#2682)
Dear colleague,
unfortunately 'rnorm' does not create normal distributed numbers as
you can see with following histogramm:
> hist(rnorm(1000000),breaks=100)
and
> hist(pnorm(rnorm(1000000)),breaks=100)
I have done several chi^2-tests which have all failed:
> chi2unif<- function(x,N)
> {
> anz=length(x)
> f0<-rep(anz/N,times=N)
>