Displaying 20 results from an estimated 3000 matches similar to: "How to denote a line on the graph"
2010 Feb 18
3
Can R make an usual dotplot
Dear R experts,
Can R make an usual dotplot just like Minitab and other softwares?
I have the following data, and can use dotchart to graph a dotplot:
y=c(2.873438152e-01, -8.732895642e-01,
4.579001889e-01, 1.047395204e+00,
8.491182299e-02 , -1.938007105e+00,
-1.273708343e+00, 9.848010588e-05,
7.238490734e-01, -1.490552717e+00)
dotchart(y, xlab="10 observations from
2010 Jul 23
4
how to calculate the product of every two elements in two vectors
Thanks in advance!
A=c(1, 2,3)
B=c (9, 10, 11, 12)
I want to get C=c(1*9, 1*10, 1*11, 1*12, ....., 3*9, 3*10, 3*11, 3*12)?
C is still a vector with 12 elements
Is there a way to do that?
--
View this message in context: http://r.789695.n4.nabble.com/how-to-calculate-the-product-of-every-two-elements-in-two-vectors-tp2300299p2300299.html
Sent from the R help mailing list archive at Nabble.com.
2009 Dec 04
2
how to seperate a matrix
Hello,
I am working on seperate the matrix to two matrices but got trouble on doing
it. Please give me some suggestions on doing this. Thanks a looooooooooooot!
My original matrix m is as follows for example,
[,1] [,2] [,3]
[1,] 6 8 1
[2,] 5 9 2
[3,] 20 10 3
[4,] 7 11 4
[5,] 8 12 5
[6,] 25 13 6
[7,] 14 14 7
I want to generate two
2009 Nov 20
3
symbol in the plot
a graph question. Thanks a lot in advance.
I made two scatterplots on one graph (sigma vs. delta1, sigma vs. delta2)
(20 observations of delta1, delta2 and corresponding sigma) the x-axis is
sigma, the y-axis is either delta1 or delta2. I connected both scatterplots.
To seperate them, one curves is a line with circles, the other curve is a
line with squares on it.
I want to make a notation
2010 Jan 04
3
how to draw abline correctly?
Hello, I am frastruated with this graph, just cannot get what I need. Thank
you for any suggestions or help. I really appreciate it. I wrote the
following code, but there are 3 problems
1, the red line is added on the graph but without any marker on the y-axis.
I want to display the number '.1361' on the y-axis. So people can easily
tell 'method 2' gets a constant estimate, which
2007 Jul 10
3
ECDF, distribution of Pareto, distribution of Normal
Hello all,
I would like to plot the emperical CDF, normal CDF and pareto CDF in the
same graph and I amusing the following codes. "z" is a vector and I just
need the part when z between 1.6 and 3.
plot(ecdf(z), do.points=FALSE, verticals=TRUE,
xlim=c(1.6,3),ylim=c(1-sum(z>1.6)/length(z), 1))
x <- seq(1.6, 3, 0.1)
lines(x,pgpd(x, 1.544,0.4373,-0.2398), col="red")
y
2010 Feb 09
1
how to adjust the output
Hi R-users,
I have this code below and I understand the error message but do not know how to correct it. My question is how do I get rid of “with absolute error < 7.5e-06” attach to value of cdf so that I can carry out the calculation.
integrand <- function(z)
{ alp <- 2.0165
rho <- 0.868
# simplified expressions
a <- alp-0.5
c1 <-
2007 Sep 12
1
Integrate() error message, I am at a loss
Hello!
I have a problem with integrate() in my function nctspa(). Integrate
produces an error message "evaluation of function gave a result of
wrong length". I don't know what that means. Could anyone suggest me
what is wrong with my function?
These are the examples of function calls that work OK:
nctspa(a=1:10,n=5)
nctspa(a=1:10, n=5, mu=2, theta=3, renorm=0)
This does not work:
2009 Dec 28
2
[BioC] make.cdf.package: Error: cannot allocate vector of size 1 Kb
My machine has 8GB memory. I had quit all other programs that might
take a lot of memory when I try the script (before I post the first
message in this thread). The cdf file is of only 741 MB. It is strange
to me to see the error.
On Mon, Dec 28, 2009 at 2:38 AM, Wolfgang Huber <whuber at embl.de> wrote:
> Dear Peng Yu
>
> how big is the RAM of your computer? You could try with
2006 Sep 23
1
Fitdistr() versus nls()
Hello R-Users,
I'm new to R so I apologize in advance for any big mistake I might
be doing. I'm trying to fit a set of samples with some probabilistic
curve, and I have an important question to ask; in particular I have
some data, from which I calculate manually the CDF, and then I import
them into R and try to fit: I have the x values (my original samples)
and the y values
2009 Jan 14
4
How to get legend outside of plot?
I am creating a CDF plot function more user-friendly than any default r
function. Depending upon the bimodality of the data (it is often bimodal),
or any other strange data trends, the points can end up gathering in just
about any corner of the plot. So, when I add a legend, whether I choose to
add it in the bottom right, top left, or wherever, it will sometimes end up
putting the legend right
2017 Oct 07
1
beta binomial distribution
Hi,
I need to write two inequalities depend on cumulative distribution (CDF) of
beta binomial distribution where alpha and beta are unknown and need to
find them.
CDF of betabinomial(2,10,alpha,beta) <0.3<=CDF of
betabinomial(3,10,alpha,beta)
and
CDF of betabinomial(5,10,alpha,beta) <0.8<=CDF of
betabinomial(6,10,alpha,beta)
How I can do that using r studio package?
I tried to do
2010 Nov 09
1
agrep pmatch recursive???
Hello R Helpers,
Business - 64 bit windows 7, R 2.11.1
I am trying to match the character contents of one list, called 'exclude', to those of a second list, called 'dataset'
dataset is a list of file names with folder locations, and looks like this when called:
> dataset
[1] "A/10-10-29a-13.cdf" "A/10-10-29a-14.cdf" "A/10-10-29a-15.cdf"
2010 Feb 15
1
error message error
Hi r-users,
I hope somebody can help me to understand the error message. Here is my code;
## Newton iteration
newton_gam <- function(z)
{ n <- length(z)
r <- runif(n)
tol <- 1E-6
cdf <- vector(length=n, mode="numeric")
fprime <- vector(length=n, mode="numeric")
f <- vector(length=n, mode="numeric")
for (i in 1:1000)
{
2010 Feb 10
1
looping problem
Hi R-users,
I have this code here:
library(numDeriv)
fprime <- function(z)
{ alp <- 2.0165;
rho <- 0.868;
# simplified expressions
a <- alp-0.5
c1 <- sqrt(pi)/(gamma(alp)*(1-rho)^alp)
c2 <- sqrt(rho)/(1-rho)
t1 <- exp(-z/(1-rho))
t2 <- (z/(2*c2))^a
bes1 <- besselI(z*c2,a)
t1bes1 <- t1*bes1
c1*t1bes1*t2
}
## Newton
2006 Mar 15
1
(newbie) Weighted qqplot?
Folks,
Normally, in a data frame, one observation counts as one observation
of the distribution. Thus one can easily produce a CDF and (in Splus
atleast) use cdf.compare to compare the CDF (BTW: what is the R
equivalent of the SPlus cdf.compare() function, if any?)
However, if each point should not count equally, how can I weight the
points before comparing the distributions? I was thinking of
1998 Sep 22
1
R-beta: port of bicreg package to R?
R version: 0.62.1 (June 15, 1998)
I just very naively attempted to grab the 'bicreg' package for
Bayesian model selection from the StatLib library, and get it running
under R.
I've hit a brick wall very quickly, and as an R novice I'm not sure
where to go next.
Here's what happened:
> bicreg(as.matrix(hiv[,c(-17,-18)]),as.matrix(hiv[,18]))
Error: invalid formula
>
2009 Dec 02
2
calculation problem when export and import data
Hello,
I have a question on export and import data. Thank you for any suggestions.
data 'simul' is generated as follows:
N <- 20
n <- N/2
nsets <- 10
simul <- matrix(0,nsets,N)
th <- c(0,1, 1)
for(i in 1:nsets){
simul[i,] <- rnorm(N,mean= rep(th[1:2],N/2),sd=th[3])
}
I exported data as follows:
write.table(simul,
2005 Jul 07
1
CDF plot
Dear all,
I have define a discrete distribution P(y_i=x_i)=p_i, which I want to
plot a CDF plot. However, I can not find a function in R to draw it
for me after searching R and R-archive. I only find the one for the
sample CDF instead my theoretical one.
I find stepfun can do it for me, however, I want to plot some
different CDF with same support x in one plot. I can not manage how to
do it with
2007 Feb 27
1
Additional args to fun in integrate() not found?
Hello, fellow Rdicts,
I have the code for the program below. I need to integrate a function
of "x" and "p". I use integrate to integrate over "x" and pass "p" as
an additional argument. "p" is specified and given default value in
the argument list. Still, integrate() cannot read "p", unless I
explicitly insert a numeric value in the