[R] How to remove the quote in the data frame?

2007-07-14 Thread Zhang Jian
If I do not add ress into the data frame res, there is no quote in the data frame. However, I add ress, all column were found the quote. How to remove it? If you can delete the quote in the file ress, that is better. Thanks. ress[1:10] [1] ABHO.ABNE ABHO.ACBA ABHO.ACGI ABHO.ACKO ABHO.ACMA

[R] How to read many files at one time?

2007-07-14 Thread Zhang Jian
I want to load many files in the R. The names of the files are Sim1.txt, Sim2.txt, Sim3.txt, Sim4.txt, Sim5.txt and so on. Can I read them at one time? What should I do? I can give the same names in R. Thanks. For example: tst=paste(Sim,1:20,.txt,sep=) # the file names tst [1] Sim1.txt

Re: [R] random sampling with some limitive conditions?

2007-07-08 Thread Zhang Jian
. On 7/7/07, Daniel Nordlund [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Zhang Jian Sent: Saturday, July 07, 2007 12:31 PM To: r-help Subject: [R] random sampling with some limitive conditions? I want to gain

Re: [R] random sampling with some limitive conditions?

2007-07-08 Thread Zhang Jian
Any methods or advices about the random sampling method? I have no idea. Thanks a lot. On 7/8/07, Zhang Jian [EMAIL PROTECTED] wrote: The method can get one new data. But I think that it is not random. I used the new random data to compute the index which I want to get. The same value

Re: [R] random sampling with some limitive conditions?

2007-07-08 Thread Zhang Jian
in the expressions to generate multiple sets in the same way. (Do you actually want the assignments or just the tables?) Of course there are many other possible solutions since you have not fully specified the distribution you want. Alan Zaslavsky Harvard U From: Zhang Jian [EMAIL

[R] random sampling with some limitive conditions?

2007-07-07 Thread Zhang Jian
I want to gain thousands of random sampling data by randomizing the presence-absence data. Meantime, one important limition is that the row and column sums must be fixed. For example, the data tst is following: site1 site2 site3 site4 site5 site6 site7 site8 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0

[R] How to calculate the index the number of species combinations?

2007-07-07 Thread Zhang Jian
I want to analyze the co-occurrence of some species. In some papers, the authors said that the indexthe number of species combinations (COMBO) is a good index. I try to calculate the index by R language. But I can not get the right value. I think that I do not understand the concept of the index

Re: [R] How to calculate the index the number of species combinations?

2007-07-07 Thread Zhang Jian
On 7/7/07, Zhang Jian [EMAIL PROTECTED] wrote: I want to analyze the co-occurrence of some species. In some papers, the authors said that the indexthe number of species combinations (COMBO) is a good index. I try to calculate the index by R language. But I can not get the right value. I

[R] one question about the loop

2007-07-07 Thread Zhang Jian
Hi. I want to get a series data just like this: sp1 sp2 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 I can get one part of the data every time, but I can get the data directly. I try to use the loop, but it can not work. How to get it ? Thanks.

[R] How to run mathematica or c programs in R?

2007-06-22 Thread Zhang Jian
I have some programs which were writen in mathematica or c language, but I donot know how to use these software. So I want to run them in R. Can I do it ? How to run mathematica or c programs in R? Jian Zhang [[alternative HTML version deleted]]

[R] tapply and data.frame?

2007-01-23 Thread Zhang Jian
I want to transform the data by tapply to one dataframe. But I can not get it. For example: tst=tapply(point,pp,length) tst[1:10] p1 p10 p100 p1000 p1001 p1002 p1003 p1004 p1005 p1006 1 5 1 8 6 5 8 7 4 4 res=as.data.frame(tst) # I try to transform it res[1:10,] p1

[R] how to change the date (Year, Month, Day) to Julian date in R language?

2006-12-20 Thread Zhang Jian
How to do the change? And how to change Julian date to the date (Year,Month,Day)? Thanks [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] how to replace some objects?

2006-12-19 Thread Zhang Jian
I want to replace some objects in one row or column.For example, One colume: a,b,a,c,b,b,a,a,c. I want to replace a with 1, b with 2, and c with 3. Like this: 1,2,1,3,2,2,1,1,3. How to do it? I donot know how to do it. Thanks. [[alternative HTML version deleted]]

Re: [R] how to replace some objects?

2006-12-19 Thread Zhang Jian
--- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31 http://www-good.ibl.fr --- Zhang Jian

[R] how to replace one row with other row?

2006-08-23 Thread Zhang Jian
I want to replace one row with other information in the dataframe. For example: cb04.full[1:5,] tag sp gx gy dbh codes status branch species lifestyle *family*genera 1 10101 COMA 1.64 1.54 1.2 10111 alive 0$BLS?:(B COMA *COMA* COMA 2 10102 COMA 2.05 2.45 1.5 10111

[R] Error in plot.new() : plot region too large ?

2006-06-08 Thread zhang jian
Hello. I want to draw the contour map by package CTFs. But: Error in plot.new() : plot region too large # the plot area is 1000 * 500. How to solve this trouble? Thanks! Jian zhang [[alternative HTML version deleted]]

[R] a question about a simply figure

2006-06-02 Thread zhang jian
I think there is a question in R. I donot know the reason. This is my data about comulative percentage figure. The result is not right. The first point (no=1,leiji=26.94350) in the plot figure was showen in a lower location. Why? Thanks ! fre no leiji 1 1 26.94350 2 2 46.86401 3

[R] I cannot load the package Rcmdr

2006-05-26 Thread zhang jian
I can load the package in other R file, but I can not do it in the file. How to solve the question? local({pkg - select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg)) library(pkg, character.only=TRUE)}) Loading required package: tcltk Loading required package: car Error in

Re: [R] how to get a series of results by loop

2006-05-26 Thread zhang jian
I donot know how to do it remainly. Perhaps my question is not clear. For example, test=data.frame(sp=paste(c(sp),1:100,sep=),x=rnorm(100),y=rnorm(100)) # I want to get the data in the circle of radius = 1 in every point, and I want to add a sign (e.g. sp1,sp2) in order that I can

[R] how to get the data in a circle

2006-05-25 Thread zhang jian
I want to get the data in a circle from a large square plot. If the data includes only two columns or more columns which is number style, I can do it. But if the data includes other columns which is not number style (e.g. species name), I donot know how to do it. And I donot want to delete the

[R] how to get a series of results by loop

2006-05-25 Thread zhang jian
I want to get a series of results by loop. For example, when i = 1, get a data frame r1; when i = 2, get a data frame r2 .. And the result include all the data frames. But I donot know how to get a series of data frames. Thanks! [[alternative HTML version deleted]]

[R] how to choose some points randomly?

2006-05-01 Thread zhang jian
Hello! There are about 5000 trees in 200m*200m plot. I want to choose some trees randomly from 5000 trees. But I donot know how to choose it. Please give me some advices. Thanks! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] how to choose some points randomly?

2006-05-01 Thread zhang jian
On 5/1/06, zhang jian [EMAIL PROTECTED] wrote: Hello! There are about 5000 trees in 200m*200m plot. I want to choose some trees randomly from 5000 trees. But I donot know how to choose it. Please give me some advices. Thanks! [[alternative HTML version deleted

[R] what happen?

2006-04-18 Thread zhang jian
Hi! I want to choose part of the data. But it has a question. attach(PIKO) PIKO[1:5,] code species dbh x y tag status branch 92 10142PIKO 38.9 6.05 12.81 10165 alive 0 109 10213PIKO 41.0 6.71 26.21 10202 alive 0 135 10222PIKO 48.3 18.98 21.28 10214

[R] how to delete the bar in the right of filled.contour map

2006-04-04 Thread zhang jian
I did the contour map by filled contour and I want to add some points in this map. But It cannot be added truely because the bar is in the right. I want to know how to delete the bar in the right or add the points in the contour map. Thanks! [[alternative HTML version deleted]]

[R] how to change my data to point data set in package SPLANCE?

2006-02-27 Thread zhang jian
Hi! I want to use the package SPLANCE to do Ripley's K analysis I have a basic question about the package. I try to find how to do it, but I cannot. I hope you can help me. I donot know how to change my data form to point data set. my data form is: qumo[1:5,] code species dbh x y

[R] aboutRiply's K functionand envelope

2006-02-27 Thread zhang jian
hi! I did Riply's K function and envelope in the package SPATSTAT. When the species number is less, it can work well and it is quickly. But when the species number is more(example:2000), it told mememory limit. So I change memory limit. But the speed is very slow. I took 13 hours to run the

Re: [R] aboutRiply's K functionand envelope

2006-02-27 Thread zhang jian
them to do Ripley's K analysis. thank you very much! Help me! jian zhang On 2/27/06, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: zhang jian wrote: hi! I did Riply's K function and envelope in the package SPATSTAT. When the species number is less

[R] how to change my data to point data set in package SPLANCE?

2006-02-26 Thread zhang jian
Hi! I want to use the package SPLANCE to do Ripley's K analysis I have a basic question about the package. I try to find how to do it, but I cannot. I hope you can help me. I donot know how to change my data form to point data set. my data form is: qumo[1:5,] code species dbh x y