Displaying 20 results from an estimated 10000 matches similar to: "graphs"
2010 Oct 29
2
plot pdf
I want to plot the unstadardized version of a normal plot.  Can you explain why that is not working? 
Dev.set(1) 
xcrit=-1.645 
cord.x <- c(-3,seq(-3,xcrit,0.01),xcrit) 
cord.y <- c(0,dnorm(seq(-3,xcrit,0.01)),0)            # what does final 0 do here? 
curve(dnorm(x,0,1),xlim=c(-3,3),main='Normal PDF') 
polygon(cord.x,cord.y,col='orange') 
2010 Nov 01
1
combining plots (curve + Plot functions)
Hello, 
? 
What I really want to do is to add a rejection region in the 
form of a long rectangle to a density plot I have drawn.?
I am getting? 2 plots.? 
How can I add rectangle to first plot?? see code below. 
First section works fine.? It just is not quite what I want. 
# NORMAL DISTRIBUTION PLOT OF RAW DATA WITH UPPER CRITICAL LEVEL - ok 
xcrit=144.1 
# *** single-sample Upper one-tailed
2010 Nov 20
1
extraction of element
Hello, 
I want only the value of Beta so the statement? Power<-1-Beta[1] works right. 
How to do?? See code below 
Beta <- integrate(dnorm,mean=0,sd=1, 2.3552,Inf) 
Power<- 1-Beta[1] 
Sincerely, 
Mary A. Marion
2009 Jul 28
2
formatting in r
Hello,
I have output that I want to print out.  I am having a few issues.
1] output u to power is really nothing more than a 2 x 11 set of values 
formed using cbind function
    and printed out as a data frame
    How can I get it to output over several lines such as seen here?
2] Critical Z etc. were added by hand.  I need an example of how I can 
mix alphanumeric
    and numeric data on
2009 Jul 09
2
naming of columns in R dataframe consisting of mixed data (alphanumeric and numeric)
Hello,
I have an r function that creates the following dataframe tresults2.
Notice that column 1 does not have a column heading.
Tresults2:
                 [,1]
estparam     18.00000
nullval      20.00000
. . .
ciWidth       2.04622
HalfInterval  1.02311
pertinent code:
results<-cbind( estparam, nullval, t, pv_left, pv_right, pv_two_t, 
estse, df,  cc, tbox, llim, ulim, ciWidth,
2009 Jul 23
2
mathematical notation in R
Does this approach what you're looking for?
See 
?is.finite
for more info
> LBAuo<- -9999
> LBAuo
[1] -9999
> if (LBAuo <= -9999) LBAuo <- -Inf
> LBAuo
[1] -Inf
>
HTH
Steven McKinney
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Mary A. Marion
> Sent: Wednesday, July 22, 2009
2009 Mar 20
2
print of objects in R
Hello,
I have been watching my output as I create functions and do other things 
in r.
One thing I don't like is the [1,] type notation at the beginning of a 
line.  I have been
able to change that to a number such as 1 2 etc.   using 
as.data.frame(object).
How can I stop the printing of a line number and column heading if I 
want to?
I am thinking about publishing and writing of papers. 
2012 Jul 03
3
design matrix creation in R
Hello, 
I want to create a design matrix using R. Can you explain the code which creates the following please? I understand the first part. 
b=g1(?) does what? 
dd <- data.frame(a = gl(3,4), b = gl(4,1,12)) # balanced 2-way 
dd 
a b 
1 1 1 
2 1 2 
3 1 3 
4 1 4 
5 2 1 
6 2 2 
7 2 3 
8 2 4 
9 3 1 
10 3 2 
11 3 3 
12 3 4 
I am using the tree dataset in R. I want to form a reparameterized design
2009 Jul 10
2
IF STATEMENTS
Hello,
I am working on using if statements.  What  is the error message telling 
me here and how do I correct for it?
I have tried various combinations of quotes.
Thank you.
Sincerely,
Mary A. Marion
#Find critical values
crit<-function(n,alpha,type)
{
if (type==twoSided)
{
alpha2=alpha/2
tL<-qt(alpha2,n-1)
tU<-qt(1-alpha2,n-1)
}
if (type==Lower)
{
 tL<- -9999
2011 Nov 01
2
drawing ellipses in R
Hello, 
I have been following the thread dated Monday, October 9, 2006 when Kamila Naxerova asked a question about plotting elliptical shapes. Can you explain the equations for X and Y. I believe they used the parametric form of x and y (x=r cos(theta), y=r sin(theta). I don't know what r is here ? Can you explain 1)the origin of these equations and 2) what is r? 
Sincerely, 
Mary A. Marion 
2004 Sep 16
3
Estimating parameters for a bimodal distribution
For several years, I have been using Splus to analyze an ongoing series of
datasets that have a bimodal distribution. I have used the following
functions, in particular the ms() function, to estimate the parameters: two
means, two standard deviations, and one proportion. Here is the code I've
been using in S:
    btmp.bi <- function(vec, p, m1, m2, sd1, sd2)
    {
       
2008 Aug 20
3
Confidence Interval
Hi!
With the following script, I'm trying to make a demonstration of a
Confidence Interval, but I'm observing some differences on tails.
# Teste de média entre uma amostra e uma população normal
# Autor: Raphael de Freitas Saldanha
# Agosto de 2008
n    <- 200    # Sample size
xbar <- 100    # Sample mean
s    <- 2      # Sample SD
nc   <- 0.95   # Confidence level (95%
2011 Nov 05
1
3-D ellipsoid equations
+ 
Hello, 
The parametric equations of an ellipsoid can be written in terms of spherical coordinates. The three spherical coordinates are converted to Cartesian coordinates by 
X=a cos (α) sin(θ) 
Y=b sin(α) sin(θ) 
Z=c cos(θ) 
for α and θ 
The parameter α varies from 0 to 2 π and θ varies from 0 to π . Here ( X o , Y o ,Z o ) is the center of the ellipsoid, and θ is the angle
2009 Mar 28
7
unicode only works with a second one
I'd like to paste a zodiac sign on a graph, but it only prints it when
I add another unicode ( \u3030) to the desired \u2648 - why?
See the examplecode (compare the orange with the skyblue):
plot(c(-1,1),c(-4,-2),type="n")
text(x=0,y=-3.0,labels="\u2648 \u3030",cex=2.3,col="skyblue")
text(x=0,y=-3.2,labels="\u2648",cex=2.3,col="orange")
2011 Jun 26
3
Overlapping areas under normal distributions
Hi everyone. 
My problem: I've 4 distributions: A, B, C and D: 
#A 
mA=16.6 
sA=3.0 
#B 
mB=18.9 
sB=3.2 
#C 
mC=20.3 
sC=2.1 
#D 
mD=24 
sD=0.8 
###Graphiques ensembles 
plot(function(x) dnorm(x,mA,sA),0,40,col="orange",ylim=c(0,0.5)) 
plot(function(x) dnorm(x,mB,sB),0,40,add=T,col="green") 
plot(function(x) dnorm(x,mC,sC),0,40,add=T,col="blue") 
2007 Oct 13
2
How to identify the two largest peaks in a trimodal distribution
Hello all
I'm trying to do a simulation that involves identifying the minimum  
point between two peaks of a (usually) bimodal distribution. I can do  
this easily if there are only two peaks:
CnBdens<-density(Ys/Xs)	#probability density function for ratio of Ys  
to Xs
	
	for(p in 1:512) ifelse(CnBdens$y[p]>CnBdens$y[p-1],peak1<-p,break)  
#identifies first peak in probability
2013 Jan 08
4
error in a abline loop
Hello
I have data of body length and body weight of people of different skin colors.
I tried to write a code to plot body length and body weight according
to the skin colors.
(Thanks for Petr's advice so far.)
A loop is used but an error shows up in the following code.
It says:
 unexpected '}' in
"   
2004 Nov 03
2
Suggested color schemes for points, not regions?
I have seen a couple of posts about color schemes like those at the
ColorBrewer site.  Most recently:
http://geography.uoregon.edu/datagraphics/color_scales.htm
These color schemes can work very well for regions (bars, polygons,
images, etc.) but are not very suitable for points and/or lines.
Is anyone aware of research/suggestions for a color scheme to use for
scatter plots?  I've looked at
2007 Apr 05
1
Plotting multiple curves with lattice graphs
Hi List,
I would like to plot multiple curves (parametric
density curves) in one plot.  
For example:
# parameters for three normal density curves
parms =
data.frame(ID=c(1,2,3),mu=c(50,55,60),sigma=c(10,12,15))
# I can easily draw three normal density curves using
curve():
curve(dnorm(x,mean=parms$mu[1],sd=parms$sigma[1]),from=0,
to=150, ylab="density", col="red")
2023 Oct 30
1
Dynamically create a (convenience) function in a package
Hi,
n a package, I have a data object with attributes, and I want to 
dynamically create a convenience function to access those attributes. 
This way, instead of using attr(x, "number"), I would like to use number(x).
Because I don't know in advance which attributes the data object may 
have, I've used the following algorithm:
x <- structure(pi, number=exp(1))
a <-