[R] fail to install packages in R3.0.2 running in Redhat linux

2013-11-05 Thread Mao Jianfeng
Dear R-helpers, Glad to write to you. I would like to have your helps to install packages through internet, in a linux computer. Could you please share any of your expertise with me on this problem? Thanks in advance. Best Jian-Feng, # check the

Re: [R] fail to install packages in R3.0.2 running in Redhat linux

2013-11-05 Thread Mao Jianfeng
. So, do you have any ideas/tools/scripts on how to track the real problem, in my case? Best Jian-Feng, 2013/11/5 Marc Schwartz marc_schwa...@me.com On Nov 5, 2013, at 4:38 AM, Mao Jianfeng jianfeng@gmail.com wrote: Dear R-helpers, Glad to write to you. I would like to have your

[R] how to write out a tree file with bootstrap from phangorn package

2012-08-07 Thread Mao Jianfeng
Dear R-helpers and Klaus, I would like to know how to write out a tree file with bootstrap from phangorn package. That tree file could be in newick format or others. I am new for phylogenetic operation in R. Could you please give me any directions on that? Thanks in advance. Best wishes,

Re: [R] how to write out a tree file with bootstrap from phangorn package

2012-08-07 Thread Mao Jianfeng
this tree: tree - plotBS(fit$tree, bs) # You can export than this tree using write.tree or write.nexus, e.g. write.tree(tree) Regards, Klaus On 8/7/12, Mao Jianfeng jianfeng@gmail.com wrote: Dear R-helpers and Klaus, I would like to know how to write out a tree file

[R] phyloclim could not be installed in linux - problems on tkrplot dependence

2012-05-14 Thread Mao Jianfeng
Dear R-helpers, Christoph (author of phyloclim) and Luke (author of tkrplot), I would like to get your helps on installing of phyloclim in Ubuntu linux. It seems a package named 'tkrplot' could not be installed at firstly, then packages depends on it could not be installed latter. As I have

[R] select integer intervals from a integer space

2011-12-07 Thread Mao Jianfeng
Dear r-helpers, I have an one-dimensional integer space (defined by random integer intervals, which overlapped each other or not). I would like to select consecutive integer intervals with specific intra and inter length. Here, an integer interval means a set of consecutive increasing integers,

Re: [R] select integer intervals from a integer space

2011-12-07 Thread Mao Jianfeng
Dear David, Thanks for your response and warnings. I will obey the rule and be a good citizen. Best, Jian-Feng, Because you have a poorly posted problem. As far as I can tell you have not yet responded constructively to the attempts at clarification of the problem. Cross-posting to this list

Re: [R] select integer intervals from a integer space

2011-12-07 Thread Mao Jianfeng
Dear Gene, Thanks a lot for your kindness. isp - data.frame(begin=c(1,5,6,15,31,51,102), end=c(7,9,13,21,49,52,109)) isp ints = apply(isp, 1, function(x)seq(x[1],x[2])) ints ints = do.call(c, ints) ints ## option to fix if the regions are overlapping ## and you don't want overlapping

[R] from points in Lon/Lat to physical distance in dist class

2011-11-08 Thread Mao Jianfeng
Dear R-listers, Here, I would like to hearing helps from you. I have GPS data (multiple points in the geographic scale) in longitude/latitude. I intend to calculate distance (in kilometer) among such points and output the distance matrix in dist class. I have gotten some progress, but I still

Re: [R] from points in Lon/Lat to physical distance in dist class

2011-11-08 Thread Mao Jianfeng
[mailto:r-help-boun...@r-project.org] On Behalf Of Mao Jianfeng Sent: Tuesday, November 08, 2011 8:22 AM To: r-help@r-project.org Cc: bossa.pack...@gmail.com Subject: [R] from points in Lon/Lat to physical distance in dist class Dear R-listers, Here, I would like to hearing helps from you. I

Re: [R] generating Venn diagram with 6 sets

2011-10-03 Thread Mao Jianfeng
Dear Peter, I am glad to hearing your reply. That is really nice. Thanks a lot. ### # (1) the problem of the plot venneuler generated me is sets (A,B,C,D,E,F) should shared 69604 elements. # But, it illustrated nothing for me for this 6 sets sharing.

[R] generating Venn diagram with 6 sets

2011-10-02 Thread Mao Jianfeng
Dear r-helpers, Here I would like to have your kind helps on generating Venn diagram. There are some packages within R on this task, like venneuler, VennDiagram, vennerable. But, vennerable can not be installed on my Mac book. It seems VennDiagram can not work on my data. And, venneuler may have

[R] How to predict significant dominant regions of two sequence of numeric values by Hidden Markov Model

2011-07-13 Thread Mao Jianfeng
Dear all, I have few training on Hidden Markov Model. But, I intend to solve my problem by HMM. I would like to have your helps/directions to me. Here, I have two variables to define the 8 one-dimension space (coordinate.1, coordinate.2). In this one-dimension space, there are two sequences of

[R] how to generate a normal distribution with mean=1, min=0.2, max=0.8

2011-04-28 Thread Mao Jianfeng
Dear all, This is a simple probability problem. I want to know, How to generate a normal distribution with mean=1, min=0.2 and max=0.8? I know how the generate a normal distribution of mean = 1 and sd = 1 and with 500 data point. rnorm(n=500, m=1, sd=1) But, I am confusing with how to generate

Re: [R] how to generate a normal distribution with mean=1, min=0.2, max=0.8

2011-04-28 Thread Mao Jianfeng
-help-boun...@r-project.org] On Behalf Of Mao Jianfeng Sent: Thursday, April 28, 2011 12:02 PM To: r-help@r-project.org Subject: [R] how to generate a normal distribution with mean=1, min=0.2, max=0.8 Dear all, This is a simple probability problem. I want to know, How to generate a normal

[R] strategy for writing out file with lines header initiated with comment sign

2011-04-13 Thread Mao Jianfeng
Dear all, I have data.frame object in R. I want to export it in tab-delimited file with several lines of header initiated with comment sign (#). I do not know how to do that in R. Could you please give helps on this problem? Thanks in advance. Best, Jian-Feng,

Re: [R] strategy for writing out file with lines header initiated with comment sign

2011-04-13 Thread Mao Jianfeng
- as.data.frame(matrix(letters[1:25], 5)) writeLines(c(#comment, # lines, # in the file), con = ./test.csv) write.table(myData, ./test.csv, append=TRUE) Cheers, Rainer On Wed, Apr 13, 2011 at 6:15 AM, Mao Jianfeng jianfeng@gmail.com wrote: Dear all, I have data.frame object in R. I want

[R] a statistical problem - more statistical strategy for making quality control

2011-04-01 Thread Mao Jianfeng
Dear R-listers, I would like to have your helps on make a good strategy of quality control by several quality control variables. This means I need a good strategy to choose cutoff for each quality control variables, or make cutoff for all such quality control variables in one time. For quality

[R] Can not invoke maxent() of library(dismo) in GNU linux

2011-01-27 Thread Mao Jianfeng
Dear R-helpers and Dr. Hijmans, I can not invoke maxent() in GNU Linux. Could you give me any directions on that? There is maxent.jar in version 3.3.3e in the right folder. R: jar - paste(system.file(package=dismo), /java/maxent.jar, sep='') jar [1]

[R] Can not invoke maxent() of library(dismo) in Mac OSX

2011-01-26 Thread Mao Jianfeng
Dear R-helpers, I can not invoke maxent() in Mac OSX. Could you give me any directions on that? Thank you in advance. Here is my info: # (1) the error me - maxent(predictors, occtrain, factors='biome') me - maxent(predictors, occtrain, factors='biome') Error in .jcall(mxe, S, fit, c(autorun,

[R] how to calculate the consistency of different clusterings

2011-01-13 Thread Mao Jianfeng
Dear R-listers, I do clustering on tens of individuals by thousands of traits. I have known the assignment of each individual. I want to classify the individuals by randomly resampling different subsets of the traits, for example, randomly resampling 100 traits for 100 times, then 200 traits for

[R] helps on upgrading R in Mac OS

2010-12-29 Thread Mao Jianfeng
Dear R-helpers, I intend to upgrade R in Mac OS with updated R version and updated Mac OS version. I think my Mac notebook is produced with Mac x86_64, darwin9.8.0. I have updated my Mac OS to Mac OS X version 10.6.5. But, when I installed R 2.12.1, the version function still gave me

[R] how to do randomly sampling in raster layer

2010-08-03 Thread Mao Jianfeng
Dear r-helpers, I want to randomly sample n points from regions of a raster layers, the cells denoted as NA is not included in this sampling process. And, I want to got the longitude and latitude of the sampled points. I checked the manual of raster package, I found several functions is relative

[R] implement a jackknife resampling test with size of each jackknife replicate controlled

2010-07-20 Thread Mao Jianfeng
Dear R-help listes, I need your helps on implementation a jackknife resampling test. For example, I have a sample of 100 observations. I need to calculate the mean by jackknife resampling test. I just intend to sample 75% of the whole sample (say 75 in this case) in each 100 times of jackknife

[R] help me on discriminant analysis and Bayesian discriminant analysis in R

2010-07-12 Thread Mao Jianfeng
Dear R-listers, I have a set of plant multivariate morphological data (including thousands of individuals from several species) which may be identified as several units of morphological variation. Firstly, I want to defined the optimal number of such units Then, I want to choose proper

[R] how to plot two histograms overlapped in the same plane coordinate

2010-07-09 Thread Mao Jianfeng
Dear R-help listers, I am new. I just want to get helps on how to plot two histograms overlapped in the same plane coordinate. What I did is very ugly. Could you please help me to improve it? I want to got a plot with semi- transparent overlapping region. And, I want to know how to specify the

[R] how to update R10.0 to R11.0 in Ubuntu linux

2010-05-25 Thread Mao Jianfeng
Dear R-listers, I am new to R in linux. And, I am now confused by updating R in Ubuntu 9.10 linux system. I would like to seek some advice on that problem. I have done what are listed in CRAN linux installation guide: 1. add an entry like deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu

[R] problems on JGR package and demo() function in Ubuntu linux

2010-04-13 Thread Mao Jianfeng
Dear R-helpers I want to express my respect and thankfulness to all of you. An apology to the second post of this query. I have ever asked this question yesterday. Following Mr. Henrik Bengtsson's advice I re-submit this query here. I just switch from windows xp to Ubuntu linux platform. I am

[R] can not execute two functions - env() and profile()

2010-04-12 Thread Mao Jianfeng
Dear R-helpers I want to express my respect and thankfulness to all of you. When I tried to follow a draft book on lme4 authored by Prof. Doug. Bates (http://lme4.r-forge.r-project.org/book/) to learn how to fit mixed-effects model, I found I can not execute two functions which listed in the

[R] two problems on R in Ubuntu linux

2010-04-12 Thread Mao Jianfeng
Dear R-helpers I want to express my respect and thankfulness to all of you. I just switch from windows xp to Ubuntu linux platform. I am facing two problems when I run R in Ubuntu. I need your helps and advice, thanks in advance.

[R] problems on JGR package and demo() function in Ubuntu linux

2010-04-12 Thread Mao Jianfeng
Dear R-helpers I want to express my respect and thankfulness to all of you. I have ever ask this question about one hour ago. Following Mr. Henrik Bengtsson's advice I re-submit this query here. I just switch from windows xp to Ubuntu linux platform. I am facingtwo problems when I run R in

[R] How can I get contour plot on this data?

2009-11-12 Thread Mao Jianfeng
Dear R-listers, I have a data set which combine population (site name), longitude, latitude, altitude, initial (for flowering of a plant), and end (also for flowering of the same plant) of each site. Now, I want to make contour plot to display the initial or end of the spatial pattern of

[R] how to contour plot on Date data.

2009-11-12 Thread Mao Jianfeng
Dear R-listers, I have a data set which combine population (site name), longitude, latitude, altitude, initial (for flowering of a plant), and end (also for flowering of the same plant) of each site. Now, I want to make contour plot to display spatial pattern of the initial or end of the

[R] how to draw stacked ellipses to illustrate the shared and specific of multiple objects using R

2009-10-20 Thread Mao Jianfeng
Dear R-help listers, I am now asking for helps on how to draw stacked ellipses to illustrate the shared and specific of multiple objects using R. My problem comes from my population genetics study. Now, I genotyped three species, and I get known about the amount of shared and specific haplotypes

[R] how to add 95% confidential interval as vertical lines to x axe in density plot

2009-08-24 Thread Mao Jianfeng
Dear R-help listers, I want to add 95% confidential interval as vertical lines to x axe in density plot. I have found the library(hdrcde) can do this work, but I do not know how to handle functions of this library when I used ggplot2 to draw the graph. Thank you in advance. The data and codes

[R] how to plot 95% confidential interval as vertical lines to x axe in density plot

2009-08-21 Thread Mao Jianfeng
Dear R-help listers, Under the helps from the ggplot2 list, I have set up method of drawing a graph with multiple density plots arranged one by one in one page. Now, I want to add 95% confidential interval as vertical lines to x axe in density plot. I have found the library(hdrcde) can do this

[R] Why are there small circles in my plot

2009-08-19 Thread Mao Jianfeng
Dear R-listers, There is my data and my codes to create a plot. I want to know why there are two small circles in the upper right and lower left of the plot respectively. Could you please share your experience or advice with me? # dummy data factor-rep(c(Alice,Jone,Mike),each=100)

[R] how to fill the area under the density line with semitransparent colors

2009-08-19 Thread Mao Jianfeng
Dear R-listers, I have created a plot to display the density lines for the same variable by different entities. Now, I want to fill the area under the density lines with semitransparent colors. Though I have checked that in web-searching and book-reading, I still do not perform that. Could

[R] step by step tutorial to beginning of R programming by Emacs+ESS on MS Windows

2009-08-04 Thread Mao Jianfeng
Dear R-listers, I am now asking for step by step tutorial to beginning of R programming by Emacs+ESS on MS Windows. Though it was appreciated highly, there is much troubles we must conquered before we set up R programming by Emacs+ESS, especially for users of MS Windows and who without

[R] any advice on noparametric statistics

2009-07-31 Thread Mao Jianfeng
Dear R-lister and Prof. Harrell, To Prof. Harrell: I feel very sorry to bothering you. The ecological data usually do not follow strictly-defined normal distribution. So, there are many more works before any parametric testing or any regression modeling-fitting . Tens of days ago, when I ask

[R] How to do poisson distribution test like this?

2009-07-28 Thread Mao Jianfeng
Dear R-listers, I want to reperfrom a poisson distribution test that presented in a recent-published biological research paper (Plant Physiology 2008, vol 148, pp. 1189-1200). That test is about the occurrence number of a kind of gene in separate chromosomes. For instance: The observed gene

[R] confusion on levels() function, and how to assign a wanted order to factor levels, intentionally?

2009-06-16 Thread Mao Jianfeng
Dear R-helpers, I want to make a series of boxplots on several numeric univariates with two group variables (species and population, population nested in species, and with population as the X-axis). In order to get a proper order of the individual populations in X-axis, I need to assign a wanted

[R] How to replace outliers by group median?

2009-06-16 Thread Mao Jianfeng
Dear R-helpers, Very small amount of outliers can greatly affect the mean and many other statistic of a numeric variable. So, usually we must deal with the outliers properly in the process of data analysis. Here, I want to replace outliers with the group median of the variable. But, I can not

[R] How to do automatical-plotting

2009-06-15 Thread Mao Jianfeng
Hi R-listers, I am new to R and programming. I have a large dataframe composed of two grouping variables (species, population, with populations nested in species) and tens of continuously numeric variables. For each numeric variable, I want to make a boxplot with population as the X axis and the

[R] how to substitute missing values (NAs) by the group means

2009-06-08 Thread Mao Jianfeng
Dear Ruser's I ask for helps on how to substitute missing values (NAs) by mean of the group it is belonging to. my dummy dataframe is: df group traits 1 BSPy01-10 NA 2 BSPy01-107.3 3 BSPy01-107.3 4 BSPy01-115.3 5 BSPy01-115.4 6 BSPy01-115.6 7 BSPy01-11

[R] how to use lapplyBy function of doBy package

2009-06-08 Thread Mao Jianfeng
Dear Ruser's I want to substitute each NA by the group mean of which the NA is belonging to. For example, substitute the first record of traits NA by the mean of BSPy01-10 in the dummy dataframe. I have ever tried to solve this problem by using doBy package. But, I failed. I ask for the advice

[R] split a character variable into several character variable by a character

2009-04-10 Thread Mao Jianfeng
Dear, R-lister, I have a dataframe like the followed. And, I want to split a character variable (popcode, or codetot) into several new variables. For example, split BCPy01-01 (in popcode) into BCPy01 and 01. I need to know how to do that. I have tried strsplit() and substring() functions. But, I

[R] failed when merging two dataframes, why

2009-04-09 Thread Mao Jianfeng
Hi, R-listers, Failed, when I tried to merge df1 and df2 by codetot in df1 and codetoto in df2. I want to know the reason and how to merge them together. Data frames and codes I have used were listed as followed. Thanks a lot in advance. df1: popcode codetot p3need BCPy01-01 BCPy01-01-1

[R] how todefine an variable/column in a dataframe as numeric mode

2009-02-23 Thread Mao Jianfeng
Hello dear R-users, I have a tricky problem of data manipulation with R. Although it seems very easy, I can not solve it by myselves. The problem is a variable in my dataset is usually be readed as factor (variable mode), however I want it be a numeric one. I want to know how can I define an

[R] how to derive 5 level nested anova results table

2009-02-11 Thread Mao Jianfeng
Hello. I am new to R. And, I want to perform a multiple nested anova on a large datasets (with 9448 observations). Under the helps from R-Sig-ecology mailing list, I have gained many progresses. But I still have some confusions. I want to ask for some helps here. my dataset(SeedL.txt) was not