Displaying 20 results from an estimated 8000 matches similar to: "calculation problem when export and import data"
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.
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
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
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
2006 May 19
1
trouble with plotrix package
Hello list,
I wrote a simple program to plot data on polar axes, taking advantage of
the plotrix package and its function radial.plot. The basic plot works
fine, but I am having difficulties with the formatting. There are three
problems, but I thought I would attack them one at a time. Here is the
first:
If my data set contains values with all vector lengths between 0 and 100
(and various
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
2009 Oct 03
1
if else statement error
Hello,
I am doing a if else statement in R. But it always comes out error such as
'unexpected symbol'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=3; all other situations, a=6. I don't know where it is wrong.
Here is my code
ini=3
b=4
if (ini==1) {
a=3
}
else if (ini>1 and b>2 ) {
a=3
}
else {a=6}
Thanks a
2009 Dec 04
1
how to calculate covariance matrix in R? why cov doesn't work
Hello,
Sorry. It may be a stupid question.
I have two vectors
a<-c(9,3,5)
b<-c(3,4,1)
How can I get the variance-covariance matrix of these two vectors?
I tried cov(a,b), I got a number not a matrix.
I tried to transpose vector a and b as t(a) and t(b), it still cannot work.
Any suggestions? Thank a lot!
--
View this message in context:
2009 Oct 09
1
[PATCH node] validify ipv4/ipv6 static/dhcp choice else loop
If you select an option that's not listed during ipv4/ipv6 setup it will accept it without verification. This corrects that behavior and forces a valid option to be picked.
---
scripts/ovirt-config-networking | 106 +++++++++++++++++++++------------------
1 files changed, 58 insertions(+), 48 deletions(-)
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index
2009 Jul 13
1
[PATCH node] Adds vlan support to auto-installations for the node. bz#511056
If the vlan kernel argument is provided, then it is used during
networking auto-configuration.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-config-networking | 56 ++++++++++++++++++++++++++++++++------
scripts/ovirt-early | 7 ++++-
2 files changed, 53 insertions(+), 10 deletions(-)
diff --git a/scripts/ovirt-config-networking
2008 Sep 01
1
linebreak in mathematical anotation?
Hi
I am using mathematical anotation to make the labels in a barplot in
italics. as an example (adapted from
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/129808.html):
tt <- c("italic(First~~set)", "italic(Second~~set)", "italic(third~~set")
barplot(1:3, names.arg=parse(text=tt))
But I would like to have it with "set" in a second column, like
tt
2000 Aug 10
2
help with matrix creation
hi R-help!
I would like to know a simple and easy way (if posible) to do the following
data manipulation. I have a matrix of experimental data (with replicae in time)
>experiment<-data.frame(times=c(0,0,10,10,20,20,30,30),expval=c(1,1,2,2,3,3,4,4))
> experiment
times expval
1 0 1
2 0 1
3 10 2
4 10 2
5 20 3
6 20 3
7 30 4
8
2010 Jul 19
0
Calculation optimization advice needed
Dear all,
I produced a part of code which does what needed but by estimations I would
need to wait for that for 300 hours!!!
Maybe someone can give a me a glance advice or something.
Thanks a lot!
I need to define maximum adjusted R-squares from regression model: returns
as dependent variable( here simulated to be normal) and 3 factors out of say
14 independent (simulated here). I need to run lm
2012 Mar 05
1
Trouble with a loop
I am trying to run this loop but it keeps coming up with the following error:
'Error: no function to return from, jumping to top level'
n.simul <- 1000
A <- {for(i in 1:12){{
nT <- rpois(n.simul, T[i])
nP <- rpois(n.simul, P[i])
nD <- rpois(n.simul, D[i])
nC <- rbinom(n.simul, nT, C[i])
Score <- (5*nT + 2*nC + 3*nP + 3*nD)
}
return(Score)}}
My aim is to calculate
2010 Sep 17
1
How to denote a line on the graph
Please give me some help, many thanks.
I graphed a expected CDF line of a binomial distribution on a graph,
And I have some observed points (observed CDF) from 4 groups fall on the
smooth CDF line.
I cannot really get the legend I want
legend ('topleft', c('a, 'b', 'c', 'd', 'expected CDF'), col=c(1,2,3,4),
pch=c(0,1,2, 3, '' ),
2004 Apr 29
0
randomization test
Hello all,
I am conducting a randomization test on a given dataset. One of the
covariates, gender, is randomly assigned 1000 times to create a
randomization dataset (rand.data). To these 1000 datasets, I fit a full
model (see below) and the aim is to generate a distribution of LRT statistic
under the null. Here are some of the questions I have:
1. I am using for() loop to fit the dataset
2009 Jun 25
1
[PATCH node] Rerunning network config resets all network config. bz#507393
When the user runs o-c-networking then it ensures that all features of
networking that we configure are reset and only those settings touched
are applied.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-config-networking | 46 +++++++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/scripts/ovirt-config-networking
2009 Oct 04
2
is that possible to graph 4 dimention plot
Suppose there are 4 variables
d is a function of a , b and c
I want to know how a, b and c change will make d change
It will be straightforward to see it if we can graph the d surface
if d is only a function of a and b, I can use 'persp' to see the surface of
d. I can easily see at what values of a and b, d will get the maxium or
minium or multiple modes, etc
But for 4 dimention graph,
2007 Nov 01
1
A question about lme object
I have a question about the lme function in R. My question is: After I got
the object from function lme, why the numIter value of the object is always
NULL? Following is my code:
jjww<-lme(y~x*zz,data=simul,random=~x|group,
control=lmeControl(returnObject=TRUE))
attributes(jjww)
jjww$numIter
the first 20 observation of data simul are:
> simul
y
2009 Nov 22
1
how to generate balanced sample from two normal distribution
Good afternoon,
I have a question on generating simple randomization data. Thanks for any
suggestions.
Two normal distribution N(0,1) and N(1,1)
A: I want to generate 20 data, 10 from N(0,1) and 10 from (1,1). each
observation's indicator (either is from N(0,1) or N(1,1) ) is randomized. I
need use the frist 10 data from the generated 20 dataset. (it is not
necessary 5 from N(0,1) and 5