search for: rnorms

Displaying 20 results from an estimated 7043 matches for "rnorms".

Did you mean: rnorm
2009 Aug 24
1
how to add 95% confidential interval as vertical lines to x axe in density plot
Dear R-help listers, I want to add 95% confidential interval as vertical lines to x axe in density plot. I have found the library(hdrcde) can do this work, but I do not know how to handle functions of this library when I used ggplot2 to draw the graph. Thank you in advance. The data and codes followed: # dummy data factor<-rep(c("Alice","Jone","Mike"),each=100)
2009 Aug 21
0
how to plot 95% confidential interval as vertical lines to x axe in density plot
Dear R-help listers, Under the helps from the ggplot2 list, I have set up method of drawing a graph with multiple density plots arranged one by one in one page. Now, I want to add 95% confidential interval as vertical lines to x axe in density plot. I have found the library(hdrcde) can do this work, but I do not know how to handle functions of this library when I used ggplot2 to draw the graph.
2004 Feb 26
2
limit to complex plots?
Hello all. I am trying to create one figure, divided into 6 graphs/plots each with an inset sub-figure. I can use to layout command to generate one figure with one inset sub-figure, but cannot seem to do it for multiple figures on one page. I've tried a test with the following code: layout(matrix(c(1,2,3,4), nrow=2, byrow=TRUE)) plot(rnorm(10), rnorm(10)) plot(rnorm(10), rnorm(10))
2011 Mar 31
2
Graph many points without hiding some
I have a very large dataset with three variables that I need to graph using a scatterplot. However I find that the first variable gets masked by the other two, so the graph looks entirely different depending on the order of variables. Does anyone have any suggestions how to manage this? This code is an illustration of what I am dealing with: x <- 10000
2011 Dec 19
2
Summing x1 to x6
Suppose I have the following: x1<-as.vector(rnorm(10)) x2<-as.vector(rnorm(10)) x3<-as.vector(rnorm(10)) x4<-as.vector(rnorm(10)) x5<-as.vector(rnorm(10)) x6<-as.vector(rnorm(10)) x7<-as.vector(rnorm(10)) x8<-as.vector(rnorm(10)) x9<-as.vector(rnorm(10)) x10<-as.vector(rnorm(10)) I would like the mean of x1 to x6 for each vector position. I would do something else
2001 Jun 06
1
lattice (!under development!) font curiosity
Perhaps this might be a font problem, it might be that my font dirs are broken (but I don't think so, it is a standard potato inst.): > xyplot(rnorm(10) ~ rnorm(10) ,main=list("???dsa",cex=2)) ...displays German special characters false (as greek letters). Curiously these work o.k.: > xyplot(rnorm(10) ~ rnorm(10) ,main="?dsa") > xyplot(rnorm(10) ~ rnorm(10)
2001 Jun 06
1
lattice (!under development!) font curiosity
Perhaps this might be a font problem, it might be that my font dirs are broken (but I don't think so, it is a standard potato inst.): > xyplot(rnorm(10) ~ rnorm(10) ,main=list("???dsa",cex=2)) ...displays German special characters false (as greek letters). Curiously these work o.k.: > xyplot(rnorm(10) ~ rnorm(10) ,main="?dsa") > xyplot(rnorm(10) ~ rnorm(10)
2008 May 20
2
hist clarification
Can someone help me with a misunderstanding I'm having with hist? I expected, from the example below, that the number of bins would always be 10 and the length of the counts array the same. According to the help section 'breaks' can be a integer indicating the number of bins. From the example below, the number of bins (length of the counts array) varies. Am I wrong in expecting the
2010 Jun 26
2
several common sub-axes within multiple plot area
Dear List, I'd really appreciate tip's or code demonstrating how i can achieve some common axis labels integrated into a multiple plot. In my example (below), i'm trying to achieve: -a single "Results 1 (Int)" centered & btwn row 1 and row 2; -a single "Results 2 (Int)" centered & btwn row 2 and row 3; and, -a single "Results 3 (Int)" centered
2005 Mar 04
11
R: simulation
hi all a simple question i want to run simulations in r. i however want the experiments to be repeated at a later time with exactly the same numbers by other users. can i set the random number seed for rnorm in some way? e.g. is there some arguement that goes with rnorm? please supply an example regards Allan
2017 Sep 28
3
building random matrices from vectors of random parameters
Suppose I have interest in a matrix with the following symbolic structure (specified by 3 parameters: sa, so, m): matrix(c(0,sa*m,so,sa),2,2,byrow=T) What I can't figure out is how to construct a series of matrices, where the elements/parameters are rnorm values. I'd like to construct separate matrices, with each matrix in the series using the 'next random parameter value'.
2007 Aug 30
2
Assigning line colors in xyplot
Hi, I have a dataframe containing data from individuals 1, ..., 12 (grouping variable "g" in the data frame below), which belong either to "A" or "B" (grouping variable "f"): set.seed(1) tmp <- data.frame(
2011 Jul 28
2
Animated gif or something similar in R?
I'm have a (minor) problem and a question. Problem: The following code creates 5 clusters of dots of different colors. However, I need the second call outside the data.frame call to get the colors to change for some reason. I assume there's an error in the data.frame() call, but I don't know what. Question: Is there is a way to cause the resulting graphic to rotate on it's
2012 Mar 16
2
how to speed up the inefficient code
hi, i'm really in trouble to simulate some experiment. that is, it takes too much time to process the following code. following is short example, ------------------------------------------------------------------------------------------------------- p<-data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10),d=rnorm(10)) test<-data.frame(a=rnorm(1),b=rnorm(1),c=rnorm(1),d=rnorm(1))
2018 Aug 13
1
substitute() on arguments in ellipsis ("dot dot dot")?
Since you're already using bang-bang ;) library(rlang) dots1 <- function(...) as.list(substitute(list(...)))[-1L] dots2 <- function(...) as.list(substitute(...())) dots3 <- function(...) match.call(expand.dots = FALSE)[["..."]] dots4 <- function(...) exprs(...) bench::mark( dots1(1+2, "a", rnorm(3), stop("bang!")), dots2(1+2, "a",
1999 May 05
1
RNG R/Splus compatibility
Starting with example Wichmann-Hill code from Brian Ripley I have been playing with a set of programs for getting the same random sequences from R and Splus. A copy is included below along with a test (which works in Solaris with R and Splus 3.3). The approach is somewhat different from the usual problems on this list as I am trying to get the same results from Splus as I get from R. However,
2009 Aug 12
2
10x slower merge in mac 2.9.1 vs. 2.9.0 (PR#13890)
Full_Name: Rick Stahlhut Version: 2.9.1 OS: os x 10.5.7 Submission from: (NULL) (128.151.71.23) I upgraded to 2.9.1 today from 2.9.0. I work with large CDC (center for disease control) datasets and start, frequently, with a series of 23 large-ish merges to create the final dataset I work on. I do this each time because (a) R is fast. why not? and b) the datasets occasionally get updated by
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
2009 Sep 09
2
Matrix multiplication and random numbers
Dear All I new to using R and am struggling with some matrix multiplication. I have two matrices, one containing random numbers, these are multiplied together to get another matrix which is different each time. When I put in another for loop to repeat this process a multiple times the matrices are all the same. I?m sure there is a way to keep the randomness of the different matrices but I think
2008 May 14
2
mfrow
Dear members, I want to create 8 graphs and write it into one page using mfrow=c(4,2). How to make all graphs (including the titles, legends, line types) to be scale down (resized proportionally). As an illustration, below is the code: pdf("testmfrow.pdf") par(mfrow=c(4,2)) x<-seq(1:10) y1<-rnorm(10) y2<-rnorm(10,mean=2,sd=1) y3<-rnorm(10,mean=3,sd=1)