Displaying 20 results from an estimated 82 matches for "zhiji".
Did you mean:
hiji
2009 Oct 09
2
Creating a Clustered-Stacked Column Chart
Hi all,
In R, is there some functions or ways to create a Clustered-Stacked
Column Chart as the example in the following page
http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html?
I have browsed the R Graph Gallery (http://addictedtor.free.fr/graphiques/)
and searched the R site, and didnot find an appropriate method to do it.
Anybody has met this problem before?
Thanks a lot.
2009 Jan 17
4
Where to find the source codes for the internal function in stats package
Dear all,
I want to see the source codes for "dchisq(x, df, ncp=0, log = FALSE)",
but cannot find it.
I input "dchisq" in the R interface, and then enter, the following message
return:
> dchisq
/*****************************************************/
function (x, df, ncp = 0, log = FALSE)
{
if (missing(ncp))
.Internal(dchisq(x, df, log))
else
2007 Aug 17
3
Is there any good tools to facilitate us to create R functions?
Dear R users,
We have some programs for the specific task in our research, but they were
very commonly used. We want to make some functions for them, anybody can
recommend any good tools to facilitate us to create R functions even without
going deep into the theories of R functions ?
Any suggestions or help are greatly appreciated.
--
With Kind Regards,
oooO:::::::::
(..):::::::::
2006 Apr 13
2
a question on subset a dataset
Dear R-users,
I generate a dataset "d", and want to get a subset from it.
**
*z<-rnorm(9)
coords<-cbind(x=c(1,1,1,2,2,2,3,3,3),y=c(1,2,3,1,2,3,1,2,3))
d<-SpatialPointsDataFrame(coords, data.frame (z=z[1:9]))*
The result*/dataset* is
coordinates z
1 (1, 1) 1.41173570
2 (1, 2) 0.18546503
3 (1, 3) -0.04369144
4 (2, 1) -0.21591338
5 (2, 2)
2009 Jul 29
2
cannot allocate a vector with 1920165909 length
Dear Rusers,
The error for the following was that it cannot allocate the vector of
length 1920165909.
a <- expand.grid(se1=0:100/100, sp1=0:100/100, se2=0:100/100, sp2=0:100/100,
DR=0:100/100)
How to solve it? Maybe setwd(dir) can, i am not very sure about it.
Any ideas about it?
[[alternative HTML version deleted]]
2006 Nov 07
1
plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
...alues expected
*> contour(x1,x2,y)*
error in contour.default(x1, x2, y) : increasing 'x' and 'y' values expected
What's the problem? And could u recommend a book for me?
Thanks again.
On 11/7/06, Uwe Ligges <ligges@statistik.uni-dortmund.de> wrote:
>
>
>
> zhijie zhang wrote:
> > Dear Rusers,
> > I want to know which function in R can perform the following tasks:
> > 1.surface-data grid(x,y,z) #which could be done in splus, the name was
> from
> > splus's options of graph
> > 2. contourplot(x,y,z) #which could be...
2007 Oct 02
2
How to add legend for image()?
Dear friends,
The following is an example to explain my question. I want to get a
legend which will show the z-values according to different colors in image()
function.
x<-sort(runif(10)) #x-coordinates
y<-sort(runif(10)) #y-coordinates
z<-matrix(runif(100),nrow=10) #attributes values
image(x,y,z,col=gray((6:3)/6))
# legend(x,y,legend=z,col=gray((6:3)/6)) #error. the colors should
2008 Dec 06
1
Questions on the results from glmmPQL(MASS)
...9.35E-7
sigma 1.5301 0.9632 49 1.59 0.1186 0.05
-0.4054 3.4656 -2.42E-6
--
With Kind Regards,
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[***********************************************************************]
ZhiJie Zhang ,PhD
Dept.of Epidemiology, School of Public Health,Fudan University
Office:Room 443, Building 8
Office Tel./Fax.:+86-21-54237410
Address:No. 138 Yi Xue Yuan Road,Shanghai,China
Postcode:200032
Email:epistat@gmail.com <Email%3Aepistat@gmail.com>
Website: www.statABC.com <http://www.s...
2008 Sep 23
3
Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
Dear R users,
I hope to explain the concepts of skewness and kurtosis by generating
series of distributions with same skewness and different kurtosis or with
same kurtosis and different skewness, but it seems that i cannot find the
right functions.
I have searched the mailing list, but no answers were found.
Is it possible to do that in R? Which function could be used?
Thanks a lot.
--
2009 Jul 27
2
How should i change the SAS Codes into R Codes?
Dear R users,
I have a SAS codes with several loops in it, and i hope to use R to do the
same task. The SAS codes are as follows,
/*to generate the dataset*/
DATA Single_Simulation;
DO se=0 to 1 by 0.01;
DO sp=0 to 1 by 0.01;
DO DR=0 to 1 by 0.01;
TR=(DR+sp-1)/(se+sp-1+1.0e-12);
Adjust_Factor=TR/(DR+1.0e-12);
OUTPUT;
END;
END;
END;
RUN;
/*to select some data*/
DATA
2008 Jan 01
3
Specify a correct formula in R for Piecewise Linear Functions?
Dear all,
I have two variables, y and x. It seems that the relationship between them
is Piecewise Linear Functions. The cutpoint is 20. That is, when x<20, there
is a linear relationship between y and x; while x>=20, there is another
different linear relationship between them.
How can i specify their relationships in R correctly?
# glm(y~I(x<20)+I(x>=20),family = binomial, data =
2007 Oct 12
3
Anybody has ever met the problem to add a legend to a figure generated by image()?
Dear friends,
Anybody has ever met the problem to add a legend to a figure generated by
image()? I have three variables,x,y and z.
x and y are the coordinates, and z is the third values. we can use image(x,
y, z,...) to generate a figure according to the z-values, but the problem is
the figure legend. How can the legend be added to a figure generated
by image()? Note that filled.contour() can
2006 Apr 12
2
subset a matrix
Dear friends,
I have a (20*30) matrix,and want to get a subset of it like the following:
The original matrix: rows:1,2,3,....20; columns:1,2,3,....30
I want to get my subset of The original matrix and delete others:
rows:1,3,5,7,...19; columns:1,3,5.....29
--
Kind Regards,Zhi Jie,Zhang ,PHDDepartment of EpidemiologySchool of Public
HealthFudan UniversityTel:86-21-54237149
2006 Aug 23
1
how to complete this task on data management
Dear friends,
When i clean my dataset , i met a difficulty
suppose my data set is :
*> data<-data.frame(x=c(1:5,1,2,3))
> data
x
1 1
2 2
3 3
4 4
5 5*
6 1
7 2
8 3
Now i need to add the data which are less than 3.5 at the bottom, not
including the top data, so the results should be :
x
1 1
2 2
3 3
4 4
5 5
*6 6*
I tried to use " data[data$x>3.5,]" to do it , but it also
2006 Nov 19
2
questions on adding reference line?
Dear Ruser,
I use abline() function to add the reference line successfully, but i
can't display the values corresponding to the reference line on the x/y
axis, anybody knows how to display it?
*My simulated programs:*
y<-rnorm(50)
plot(x,y)
abline(v=0.5) *#my question is how to display x=0.5 in the x axis?*
Thanks in advance.
--
With Kind Regards,
oooO:::::::::
(..):::::::::
2006 Jul 06
2
questions on data management
Dear friends,
suppose i have two datasets: A and B
A:
id<-1:6
x<-c(1,2,3,4,5,6)
y<-c(2,4,6,8,3,2)
xy<-data.frame(id,x,y)
B
m<-c(1,1,3,3,5,5)
n<-c(2,2,6,6,3,3)
mn<-data.frame(m,n)
Now, i want to perfomr two tasks:
1. get a subset of B,no duplicate values,:
C:
m n
1 2
3 6
5 3
2.Extract the values in A on the conditions that x=m and y=n
the results should be:
id x y
1 1 2
3
2006 Jul 02
2
replace values?
Dear friends,
i have a dataset like this:
x y z
1 2 3
2 3 1
3 2 1
1 1 3
2 1 2
3 2 3
2 1 1
I want to replace x with the following values:1<-a,2<-b,3<-c,4<-d;
replace y with the following values:1<-b,2<-a,3<-c,4<-d;
replace z with the following values:1<-d,2<-c,3<-b,4<-a;
Finally,select two subsets:
1. if x='a';
2.x='a'
2006 Jul 13
3
set the bahavior that R deal with missing values?
Dear Rusers,
The default behavior in R when performing a regression model with missing
values is to exclude any case that contains a
missing value? How could i set the bahavior that R deal with missing values?
e.g.:
exclude cases listwise
exclude cases pairwise
replace with mean
Thanks very much!
--
Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
School of Public Health
Fudan
2006 Aug 31
3
what's wrong with my simulation programs on logistic regression
Dear friends,
I'm doing a simulation on logistic regression model, but the programs can't
work well,please help me to correct it and give some suggestions.
My programs:
data<-matrix(rnorm(400),ncol=8) #sample size is 50
data<-data.frame(data)
names(data)<-c(paste("x",1:8,sep="")) #8 independent variables,x1-x8;
#logistic regression model is
2006 Jul 04
2
random sampling problems?
Dear friends,
suppose my dataset is the following data:
id<-1:9
x<-c(1,2,3,1,2,3,1,2,3)
y<-c(1,1,1,2,2,2,3,3,3)
data<-data.frame(id,x,y)
id x y
1 1 1 1
2 2 2 1
3 3 3 1
4 4 1 2
5 5 2 2
6 6 3 2
7 7 1 3
8 8 2 3
9 9 3 3
i want to do sampling like this:say the sample size is 3.
First: random sampling from x;
Next ,random sampling from