[R] discerning plot dots using colors

2010-10-26 Thread elaine kuo
Dear List, I am using the command plot to present the relationship between bird richness (Y axis) and elevation (X axis). However, I would like to observe the distributions of bird richness in different administrative areas (A, B, C, …., G) in this plot. For example, the dots in area A

[R] How to calculate squared R of spatial autoregressive models

2010-11-21 Thread elaine kuo
Dear List, I am comparing the squared R values of linear models and its spatial autoregressive counterparts. (SARerror) (1. lm (Y~X1) 2. lm (Y~ X1+X2) 3. lm(Y~X1+X2+X3)) The squared R values of linear models are generated by command summary (lm). Similarly, I tried to produce those of

[R] package anacor possible for formula lm ?

2010-07-16 Thread elaine kuo
Dear list I found package anacor very user-friendly but wanted to learn more after reading the publication a simple... and its manual. Please kindly help with the following questions and thanks in advance. 1. is it possible to implement lm formula in anacor? 2. is there manual to

[R] cca in vegan (formula instead of community matrix data)

2010-07-16 Thread elaine kuo
Dear List, I tried to do cca based on species data and environmental variables (formula instead of community data). However, there was an error saying row sums must be 0. I searched the previous related messages but found few solutions. Please kindly help and thank you in advance. code This is

[R] data.frame required for cca in ade4

2010-07-16 Thread elaine kuo
Dear List, I tried to conduct cca using csv data but failed. The message said that data.frame is required. Please kindly share how to convert a csv-imported file to a data.frame. Thank you. Elaine code rm(list=ls()) spec -read.csv(c:/migration/M_R_20100718_winterM_spec_vegan.csv,header=T,

[R] cca in ade4

2010-07-16 Thread elaine kuo
Dear List, I used spec and envi for cca in ade4. (both are data.frame) However, there is a message telling that error in if (nf rank) nf - rank R missing value in TRUE/FALSE Please kindly help how to modify the code below. Thank you. Elaine code rm(list=ls()) spec

[R] producing biplot of canonical correlation analysis

2010-07-18 Thread elaine kuo
Dear List, I would like to obtain biplot containing arrows and variable labels. However, after checking the previous message and package CCA and function anacor, my attempt remains an open question. Please kindly advise code or package I might miss to achieve it. Thank you. Elaine

[R] alternative in morantest

2010-08-10 Thread elaine kuo
Dear list, I am learning moran.test in package spdep. There is a setting of alternative, defined as a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided. I would like to learn what a alternative hypothesis is in moran.test but found little

[R] factor failure

2010-08-12 Thread elaine kuo
Dear list, factor function was tried but failed. Pls kindly help and thank you. E. code rm(list=ls()) library(faraway) data (pima) pima$test - factor (pima$test) [1] NA NA NA NA NA NA [[alternative HTML version deleted]] __

[R] what is scaling in plot

2010-08-13 Thread elaine kuo
Dear List, Pls kindly advise what scaling is in plot. Sometime it could be negative but sometimes it might be positive .(I guess it is the proportion between the plot and the margin) Thanks Elaine [[alternative HTML version deleted]] __

[R] discerning species by color in cca biplot

2010-08-13 Thread elaine kuo
Dear List, I am running constrained correspondence analysis for abundance data of 7 birds. However, I would like to check which bird prefers which environment gradient by showing the species with different colors of the dots in cca plot (package vegan). Please kindly help and thank you Elaine

Re: [R] what is scaling in plot

2010-08-14 Thread elaine kuo
: elaine kuo elaine.kuo.tw at gmail.com writes: Pls kindly advise what scaling is in plot. Sometime it could be negative but sometimes it might be positive .(I guess it is the proportion between the plot and the margin) Your question is unclear. Please give more context and/or details

[R] cca biplot (vegan) failed in matplot

2010-08-14 Thread elaine kuo
Dear List, I am trying to plot the result of cca using matplot but failed. Pls kindly help and thanks. Elaine The error message was error in xy.coords(x, y, xlabel, ylabel, log = log) : (list) object cannot be coerced to type 'double' code rm(list=ls()) library(vegan) library(MASS)

Re: [R] cca biplot (vegan) failed in matplot

2010-08-14 Thread elaine kuo
Hello, Thanks for the response. matplot was tried for its function to distinguish assigned parts of a matrix by letters, for I wanna differentiate the dissimilar columns in a matrix. Any suggestion based on the idea above will be highly appreciated, such as points. Elaine On Sat, Aug 14, 2010

[R] color vector for green, red, blue

2010-08-14 Thread elaine kuo
Dear list, I am plotting dots using distinct colors according to the species. Like the style of topo.colors(18), please kindly advise if any color vector exists for green, red, and blue. Thank you Elaine [[alternative HTML version deleted]]

Re: [R] discerning species by color in cca biplot

2010-08-14 Thread elaine kuo
Thanks I wanna to add the species labels in a cca biplot based on species and environment conditions (maybe sites are of less relevance here). 1. Gavin's suggestion worked but the dots previously displayed using plot(birdrich.cca, scaling = -1) were gone. Pls advise how to retain the dots. 2.

[R] how to display delta AIC of all models

2010-08-15 Thread elaine kuo
Dear all, I am making model selection of generalised linear models based on delta AIC, using the command step(AIC). Also, I would like to learn the explanatory powers of each independent variable. To phrase differently, it is in need to show the delta AIC of all models rather than the final

[R] AIC for model selection in Package ‘MuMIn ’

2010-08-16 Thread elaine kuo
Dear List, Ben's recommendation to MuMIn is of great importance to research with over ten independent variables. However, the criteria in this package for model selection are AICc (second-order AIC) and QAIC (quasi-AIC). Please kindly share if it is possible to carry AIC rather than the metrics

Re: [R] AIC for model selection in Package â� �MuMInâ��

2010-08-16 Thread elaine kuo
= AIC) print(dd) Elaine On Mon, Aug 16, 2010 at 9:21 PM, Ben Bolker bbol...@gmail.com wrote: elaine kuo elaine.kuo.tw at gmail.com writes: [re: MuMIn package] However, the criteria in this package for model selection are AICc (second-order AIC) and QAIC (quasi-AIC). Please kindly share

[R] Independent variables omitted in lm and glm

2010-08-16 Thread elaine kuo
Dear List, Some independent variable were missing in calculation using lm and glm (gaussian). (X= Y1+Y2+…..+Y16, Independent number: 16 variable) However, those variables did work well in cor(X, Y) respectively. str(dataframe) was also run to ensure that the variables were all numbers.

Re: [R] Independent variables omitted in lm and glm

2010-08-16 Thread elaine kuo
sorry I forget the attachments Dear List, Some independent variable were missing in calculation using lm and glm (gaussian). (X= Y1+Y2+…..+Y16, Independent number: 16 variable) However, those variables did work well in cor(X, Y) respectively. str(dataframe) was also run to ensure that

[R] AIC in MuMIn

2010-08-17 Thread elaine kuo
Hello, I am using package MuMIn to calculate AIC for a full model with 10 explanatory variables. Thanks in advance in sharing your experience. Q1 In the AIC list of all models, each model is differentiated by model number. Please kindly advise if it is possible to find the corresponding

Re: [R] AIC in MuMIn

2010-08-17 Thread elaine kuo
Thank you. Most of the answers solved the puzzles. Q2 I tried to display sub-model with only temp_ran using the code below but failed. Please kindly suggest the potential failure cause. code library(MuMIn) datam -read.csv(c:/migration/Mig_ratio_20100817.csv,header=T,

Re: [R] AIC in MuMIn

2010-08-18 Thread elaine kuo
Hmmm. Thinking some more, I might not have answered your (unstated) question. What do your mean by GLM? = I meant generalized linear model as well. Thanks for the references. The first one was mentioned first in my life time after keeping asking the same question. I mean the Generalized

Re: [R] AIC in MuMIn

2010-08-18 Thread elaine kuo
Please suggest how to define subset in my case How would I know? I still haven't seen your data. You seem to be mistaken on what is and is not included in your model and you fitted it. What hope do we have...? However, given the model 'mig.stds' from above in this email: mig.stds

Re: [R] AIC in MuMIn

2010-08-18 Thread elaine kuo
at 5:37 PM, elaine kuo elaine.kuo...@gmail.com wrote: Please suggest how to define subset in my case How would I know? I still haven't seen your data. You seem to be mistaken on what is and is not included in your model and you fitted it. What hope do we have...? However, given the model

Re: [R] AIC in MuMIn

2010-08-18 Thread elaine kuo
, subset=X3) On Wed, Aug 18, 2010 at 9:18 PM, Gavin Simpson gavin.simp...@ucl.ac.ukwrote: On Wed, 2010-08-18 at 21:11 +0800, elaine kuo wrote: A cause other than data based on standardized regression was identified. It is that the manual command added with target - at the left hand side. C1

Re: [R] AIC in MuMIn

2010-08-19 Thread elaine kuo
Please kindly advise if it is possible to show the singular model with only one certain variable using the command subset. (or maybe others) I tried the command subset=X3 but it returned multiple models including X3. The above demand might look unnecessary when visual inspection

[R] how to plot y-axis on the right of x-axis

2010-08-24 Thread elaine kuo
Dear List, I have a richness data distributing across 20 N to 20 S latitude. (120 E-140 E longitude). I would like to draw the richness in the north hemisphere and a regression line in the plot (x-axis: latitude, y-axis: richness in the north hemisphere). The above demand is done using plot.

Re: [R] how to plot y-axis on the right of x-axis

2010-08-25 Thread elaine kuo
code plot(1:5,axes=FALSE) axis(1) axis(4) box() On Wed, Aug 25, 2010 at 5:39 PM, Jim Lemon j...@bitwrit.com.au wrote: On 08/25/2010 09:12 AM, elaine kuo wrote: Dear List, I have a richness data distributing across 20 N to 20 S latitude. (120 E-140 E longitude). I would like to draw

Re: [R] how to plot y-axis on the right of x-axis

2010-08-25 Thread elaine kuo
Yes, I appreciated your answers which well hit my questions. (esp the perfect model parts). About the plot part, one more question. Is it possible to make the two plots (northern and southern richness) sharing the same Y axis (latitude = 0, the equator) ? In other words, southern richness would

[R] How to set the limit of abline (regression line of lm)

2010-09-20 Thread elaine kuo
Dear List, I ran a regression model using lm and produced a regression line using abline. The line ranges from -20 to 20 in x axis, and the section I only want is from -20 to 0. Please kindly advise any function in abline () to set the range of x axes. Thank you Elaine

[R] how to show the number of each axis interval (plot)

2010-09-20 Thread elaine kuo
Dear List, I am using plot for homework. The x-axis covered from 0 to 80, with 4 intervals. However, the plot only showed 0, 40, 80. 20 and 60 disappeared. Please kindly advise how to show 0, 20, 40, 60, 80 for the axis interval. Thank you. Elaine [[alternative HTML version deleted]]

[R] Extracting data subset for plot

2010-10-11 Thread elaine kuo
Dear list, I want to make a plot based on the following information, using the command plot. variable A for x axis : temperature (range: -20 degrees to 40 degree) variable B for y axis : altitude (range: 50 m to 2500 m ) The data below 0 degree of X variable wants to be erased tentatively.

[R] delta AIC for models with 2 variables using MuMIn

2010-10-12 Thread elaine kuo
Dear List, I want to ask a AIC question based on package library(MuMIn) The relative importance of 16 explanatory variables are assessed using delta AIC in a generalized linear model. Please kindly advise if it is possible to show models with any two only certain variables. Thank you.

[R] cross validation for species distribution

2009-12-30 Thread elaine kuo
Dear, I wanna make cross-validation for the species data of species distribution models. Please kindly suggest any package containing cross validation suiting the purpose. Thank you. Elaine [[alternative HTML version deleted]] __

Re: [R] cross validation for species distribution

2010-01-01 Thread elaine kuo
guide might help you get better answers. There are a few packages and functions to do what (I think) you desire. There is the train function in the caret package, the errorest function in ipred and a few in e1071. Max On Dec 31, 2009, at 12:13 AM, elaine kuo elaine.kuo...@gmail.com wrote

[R] Boxplot- change y axis partition

2010-01-01 Thread elaine kuo
Hello, I am a newbie to R. Now I am learning to draw boxplot using graphics(). I want to change the default setting of y asix. from 0, 0.1, 0.2,0.8 to 0, 0.4, 0.8. Please kindly share the command and thank you. Elaine [[alternative HTML version deleted]]

[R] Boxplot- change the vertical line from dash to solid

2010-01-01 Thread elaine kuo
Dear, I am a newbie to R. Now I am learning to draw boxplot using graphics(). I want to change the vertical line penetrating the box from dashed line to solid line Please kindly share the command and thank you. Elaine [[alternative HTML version deleted]]

[R] Boxplot- input the median point and the median value

2010-01-01 Thread elaine kuo
Dear, I am a newbie to R. Now I am learning to draw boxplot using graphics(). I want to highlight the median position with a round point and the value left (or on the top of)to the point. Please kindly share the command and thank you. Elaine [[alternative HTML version deleted]]

[R] to discriminate AUC of different models

2010-01-01 Thread elaine kuo
Dear, Regarding the methodology comparing the power of AUC generated by differernt models, please kindly suggest any R code available for the function. (similar to DeLong, DeLong, and Clarke-Pearson (1988) ) Thank you very much. Elaine [[alternative HTML version deleted]]

Re: [R] Boxplot- change the vertical line from dash to solid

2010-01-04 Thread elaine kuo
Dear Dieter, Thanks for the info. However, I did not know which document you refer to. Please kindly indicate the website or the source. Thank you Elaine On Mon, Jan 4, 2010 at 4:24 PM, Dieter Menne dieter.me...@menne-biomed.dewrote: elaine kuo wrote: Now I am learning to draw boxplot

[R] BIOMOD: the format of background data

2010-01-04 Thread elaine kuo
Dear, I am a newbie to R. I am trying BIOMOD to simulate species distributions with presence-only data. As the presence-only data consist of three columns, presence, longitude, latitude, please kindly share how to prepare the background data (maybe using ArcGIS ?) Thank you Elaine

[R] no rcorrp.cens in hmisc package

2010-01-04 Thread elaine kuo
Dear, I wanna to compare AUC generated by two distribution models using the same sample. I tried improveProb function's example code below. set.seed(1) library(survival) x1 - rnorm(400) x2 - x1 + rnorm(400) d.time - rexp(400) + (x1 - min(x1)) cens - runif(400,.5,2) death - d.time = cens d.time

[R] Are unpaired data suitable for Hmisc's improveProb ?

2010-01-04 Thread elaine kuo
Dear, I wanna to compare AUC generated by two distribution models using the same sample. The AUC for model 1 consists of two columns, column A for 0/1 and column B for probability, eahc with the same row number of 3000. The AUC for model 2 consists of two columns, column A for 0/1 and column B

[R] Are unpaired data suitable for DiagnosisMed's Diagnosis ?

2010-01-04 Thread elaine kuo
Dear, I wanna to compare AUC generated by two distribution models using the same sample. The AUC for model 1 consists of two columns, column A for 0/1 and column B for probability, eahc with the same row number of 3000. The AUC for model 2 consists of two columns, column A for 0/1 and column B

Re: [R] Boxplot- input the median point and the median value

2010-01-10 Thread elaine kuo
/02/2010 12:53 PM, elaine kuo wrote: Dear, I am a newbie to R. Now I am learning to draw boxplot using graphics(). I want to highlight the median position with a round point and the value left (or on the top of)to the point. Hi Elaine, For your boxplot questions, I'll use the first

[R] color of histgram in Psych package (pairs.panels)

2010-06-07 Thread elaine kuo
Hello, I searched the archives but found no answers. How to modify the hisgram color of function pairs.panels of Psych package ? I tried col() but it was the line color modified. Thanks. Elaine [[alternative HTML version deleted]] __

[R] how to identify autocorrelation in Pearson Correlation Coefficient

2010-06-08 Thread elaine kuo
Dear, I computed pearson correlation coefficient between annual precipitation and temperature in a grid system. It is doubtful that there should be autocorrelation which might inflate the P-coefficient. Please kindly suggest any possible methods to filter autocorrelation. Thanks Elaine

[R] compute coefficient of determination (R-squared) for GLM (maximum likelihood)

2010-06-20 Thread elaine kuo
Dear, I want to compute coefficient of determination (R-squared) to complement AIC for model selection of multivariable GLM. However, I found this is not a built-in function in glm. neither is it available through reviewing the question in the R-help archive. Please kindly help and thanks a lot.

[R] how to find observed Moran's I value using moran.test(spdep)

2010-06-21 Thread elaine kuo
Dear , This is Elaine. I am computing moran's I using moran.test for a generalized linear model (multiregression). The following contents are the results, and I cannot find the observed Moran's I mentioned as estimate in the manual. Please kindly help indicate if there is observed Moran's I did

[R] process of stepwise selection

2010-06-29 Thread elaine kuo
Dear list, I wanna select the significant variables relative to bird distribution, using stepwise method. However, the result is always the best-fit model. Please kindly suggest if it is possible to show the selection process. Thank you Elaine [[alternative HTML version deleted]]

[R] rotate y axis label and resize its font

2010-01-12 Thread elaine kuo
Dear , As a newbit to R learning boxplot, please kindly share how to rotate y axis lable by 90 degrees or 180 degrees clockwise. Also, please advise how to resize the label font and change its color. Thank you Elaine [[alternative HTML version deleted]]

[R] how to print km square in the form of km2

2012-02-20 Thread Elaine Kuo
Hello, This is Elaine. I am drawing a plot with x-axis label with km square as the unit. Now I want to print km square in the form of km2 and output 2 as the uppercase. Please kindly help suggest command to show the uppercase. Thank you. Elaine [[alternative HTML version deleted]]

Re: [R] how to print km square in the form of km2

2012-02-29 Thread Elaine Kuo
...@xtra.co.nz wrote: On 21/02/12 12:54, Elaine Kuo wrote: Hello, This is Elaine. I am drawing a plot with x-axis label with km square as the unit. Now I want to print km square in the form of km2 and output 2 as the uppercase. Please kindly help suggest command to show the uppercase. When

[R] to check if a group of values is randomly distributed

2011-05-13 Thread elaine kuo
Dear list, I have 603 numbers depicting range sizes of birds in Japan. I would like to learn if the 603 range sizes are randomly distributed or not, in order to check if they meet mid-domain effects. Please kindly advise if any R package or function can check the fit. Also, any more references

[R] add categorical labels in plot

2013-01-11 Thread Elaine Kuo
Hello I want to draw a plot using the code below. Further, I want to add labels (White, Yellow, Red) to x-axis. Please kindly advise how to add the categorical labels, by modifying the code. Thank you. Elaine Code dataN -read.csv(H:/skin_color.csv,header=T, row.names=1) dim(dataN)

[R] two-group comparison in boxplot

2013-01-11 Thread Elaine Kuo
Hello I have a data composing three columns: body weight, body length, and sex. I want to draw a box plot, X-axis for body weight, Y-axis for body length. In the boxplot, I want to compare the body length between two sexes of three groups of body weight: 50, 51-100, 101 kg. (For instance,

[R] how to change font size of axis label (not axis title)

2013-01-11 Thread Elaine Kuo
Hello, I am using lattice to produce xyplot. I want to change the font size of axis-X label. Please kindly advise how to write the code. Thank you. For changing the font size of axis-X title it would be xlab=list(Diet of Breeding Ground, cex = 1.4) Elaine [[alternative HTML version

[R] panel failure in xyplot

2013-01-11 Thread Elaine Kuo
Hello I ran the code below but it said: no object 'panel.xyplot.intermediate.hh' Please kindly advise how to modify the code. thank you. (It works with panel.bwplot.intermediate.hh) Elaine code library(HH) # data input dataN -read.csv(H:/R_data/Mig_bird_586.csv,header=T, row.names=1)

[R] color in xyplot

2013-01-11 Thread Elaine Kuo
Hello I want to draw a xyplot. Its dots will have three colors: red for meat, green for vegetable, and blue for both. I used the code below but could not make the dot in the same group show the same color. Please kindly advise how to modify it. Thank you. code library (lattice) diet.code -

[R] customize color in xyplot

2013-01-12 Thread Elaine Kuo
Hello I want to draw a plot and classify the dot by different color, according to the habitats. I am using xyplot in lattice but do not know how to assign specific colors to the habitats. Please kindly advise how to modify the code. Thank you. Elaine code dataN

[R] how to draw confidence interval lines of a fitted curve of polynominal regression

2013-02-06 Thread Elaine Kuo
Hello, I drew a plot of weight and height of people and fitted it with a polynominal regression x^2. (using curve()) Now I would like to draw the confidence interval line for the fitted curve. Please kindly advise the code for the purpose. Thank you. Elaine [[alternative HTML version

[R] how to make a median line thicker in bwplot (lattice)

2013-02-11 Thread Elaine Kuo
Hello, I am drawing a boxplot using bwplot in lattice. I would like to learn how to draw a thicker median line instead of the default setting. Thank you. Code bwplot(, pch=rep(|,2)) Elaine [[alternative HTML version deleted]] __

[R] how to change whisker width in bwplot (lattice)

2013-02-11 Thread Elaine Kuo
Hello, I am using lattice to draw boxplots. I would like to make the whisker look shorter than the box width. Please kindly advise how to modify the code. Thank you. Elaine code bwplot(x,y, pch=rep(|,2), box.umbrella = list(col = black, lty = 1)) [[alternative HTML version deleted]]

[R] locating boxplot in bwplot (lattice)

2013-02-22 Thread Elaine Kuo
Hello I am using lattice bwplot to draw migration distance of three groups of birds. The boxplots from the left to right is displayed in alphabetic order of the boxplot names, as the default setting. However, I would like the boxplots from the left to right to be displayed according to the

Re: [R] locating boxplot in bwplot (lattice)

2013-02-23 Thread Elaine Kuo
:29 AM, Ben Bolker bbol...@gmail.com wrote: Elaine Kuo elaine.kuo.tw at gmail.com writes: Hello I am using lattice bwplot to draw migration distance of three groups of birds. The boxplots from the left to right is displayed in alphabetic order of the boxplot names, as the default

Re: [R] locating boxplot in bwplot (lattice)

2013-02-24 Thread Elaine Kuo
Martínez armand...@gmail.com wrote: Hi Elaine, In your dataset create a vector with the order in which you want appear the levels, then use that vector in the argument reorder. Andrés AM El 24/02/2013, a las 00:59, Elaine Kuo elaine.kuo...@gmail.com escribió: Hello, I tried

Re: [R] locating boxplot in bwplot (lattice)

2013-02-24 Thread Elaine Kuo
, No. become red.) Please kindly advise R-code that can specify the red color for No. 1 and 2, the blue color for the rest. Thanks again. Elaine On Mon, Feb 25, 2013 at 4:17 AM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2013-02-24 03:50, Elaine Kuo wrote: Hello Thank you for the advice

Re: [R] locating boxplot in bwplot (lattice)

2013-02-27 Thread Elaine Kuo
Hello, I used group in dotplot to classify diet by colors. Elaine On Mon, Feb 25, 2013 at 6:27 AM, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello sorry that I did not make the letter clearly stated. Now I have 21 boxplots (No. 1, No. 2No. 21 from the left to the right)(lattice). I

[R] put strip below the panel (dotplot)

2013-02-28 Thread Elaine Kuo
Hello I am using lattice dotplot and I would like to put the strip under the panel. I found the code “strip” is for the strip above the panel, and “strip.left” for the strip left to the panel. Please kindly advise how to write the code for the strip under the panel Thank you Elaine

[R] resizing panels but some strip letters disappeared (dotplot)

2013-02-28 Thread Elaine Kuo
Hello, I am using library(latticeExtra) resizePanels to have better visual display in dotplot (lattice). However, some panels became smaller and the strip letters of those panels were partially missing. Please kindly advise how to keep all strip letters remaining when resizing panels. Thank you.

[R] boxplot of different colors

2012-09-24 Thread Elaine Kuo
Hello, I am making a boxplot of 13 boxes. I tried to color the box using 13 colors but failed. Only red and brown were displayed. Green, blue, and grey disappeared. Please kindly advise modification after checking the code below. Thank you in advance. Elaine R code # data input dataN

Re: [R] boxplot of different colors

2012-09-24 Thread Elaine Kuo
= 1.4), panel=panel.bwplot.intermediate.hh, col=Diet.colors, pch=rep(|,13)) On Mon, Sep 24, 2012 at 6:23 PM, Elaine Kuo elaine.kuo...@gmail.comwrote: Hello, I am making a boxplot of 13 boxes. I tried to color the box using 13 colors but failed. Only red and brown were

Re: [R] boxplot of different colors

2012-09-24 Thread Elaine Kuo
. Sarah On Mon, Sep 24, 2012 at 6:23 PM, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello, I am making a boxplot of 13 boxes. I tried to color the box using 13 colors but failed. Only red and brown were displayed. Green, blue, and grey disappeared. Please kindly advise modification

[R] boxplot of multi box color

2012-09-24 Thread Elaine Kuo
Hello, I want to draw a boxplot using 13 colors for 13 boxes. Each box represents a type of diet of birds. Y axis is the breeding range of the birds. I checked the previous r-help and found a possible solution. However, it did not work by showing error in ncol(Diet_B), Diet_B not found. Please

Re: [R] boxplot of different colors

2012-09-25 Thread Elaine Kuo
=panel.bwplot.intermediate.hh, col=Diet.colors, pch=rep(|,13), scales=list(x=list(rot=90)), par.settings=list(box.umbrella=list(lty=1))) On Mon, Sep 24, 2012 at 11:13 PM, Elaine Kuo elaine.kuo...@gmail.comwrote: Hello Richard, Your answer is a great help to my problem

[R] changing outlier shapes of boxplots using lattice

2012-09-27 Thread Elaine Kuo
Hello This is Elaine. I am using package lattice to generate boxplots. Using Richard's code, the display was almost perfect except the outlier shape. Based on the following code, the outliers are vertical lines. However, I want the outliers to be empty circles. Please kindly help how to modify

Re: [R] changing outlier shapes of boxplots using lattice

2012-09-28 Thread Elaine Kuo
question, and that reading ?par will tell you why. Sarah On Thursday, September 27, 2012, Elaine Kuo wrote: Hello This is Elaine. I am using package lattice to generate boxplots. Using Richard's code, the display was almost perfect except the outlier shape. Based

[R] two indirect effects of path analysis

2012-10-06 Thread Elaine Kuo
Hello, This is Elaine. I am trying a path analysis using lavaan Package. There are three explanatory variables: X, Z, and M. The response variable is Y. A, b, and c have direct effects on Y. On the other hand, X and Z also have direct effects on M. In other words, X and Z have indirect effects

[R] lm and glm

2012-10-23 Thread Elaine Kuo
Dear list, I am making a linear regression of the following format. lm(Y~X1+X2+log(X3)+log(X4)) Now I would like to check the linear regression above using generalized linear model. Please kindly if the following format is correct and thank you. (If it is wrong, please indicate why.)

[R] change lm log(x) to glm poisson

2012-10-28 Thread Elaine Kuo
Hello list, I am running a regression using lm(Y~A+B+log(C)+log(D)) Now, I would like to test if glm can produce similar results. So the code was revised as glm(Y~A+B+C+D, family=poisson) (code 1) However, I found some example using glm for lm. It suggests that the code should be revised

Re: [R] change lm log(x) to glm poisson

2012-10-30 Thread Elaine Kuo
and the concept of link functions. Cheers, Josh On Sun, Oct 28, 2012 at 8:01 PM, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello list, I am running a regression using lm(Y~A+B+log(C)+log(D)) Now, I would like to test if glm can produce similar results. So the code

[R] pearson correlation significant level

2013-05-17 Thread Elaine Kuo
Hello I am using package Hmisc to calculate the pearson correlation and the significant level for the matrix of t_i and t_r. (temperature minimum and temperature range) However, I have difficulty interpreting the result, even after checking the manual. Please kindly help to indicate if the

[R] error of betadiver in vegan

2013-07-11 Thread Elaine Kuo
Hello, I am using betadiver (vegan) to calculate beta diversity. However, an error message shows Error in ifelse(x 0, 1, 0) : (list) object cannot be coerced to type 'double' R version: 3.0.0 Please kindly advise how to solve the issue. Also, please kindly tell if any more information is

Re: [R] error of betadiver in vegan

2013-07-12 Thread Elaine Kuo
) ## The beta sim index (Lennon 2001) d - betadiver(dataR, sim) On Fri, Jul 12, 2013 at 2:13 PM, Jari Oksanen jari.oksa...@oulu.fi wrote: Elaine Kuo elaine.kuo.tw at gmail.com writes: Hello, I am using betadiver (vegan) to calculate beta diversity. However, an error message shows

[R] memory problem of betadiver of vegan

2013-07-12 Thread Elaine Kuo
Hello List, This is Elaine. I am running betadiver for a dataset of 4873 rows and 2749 columns. (4873 rows = 4873 gridcell of the study region and 2749 columns for the bird species) The dataset was produced by combing 5 dbf. When running the code o, an error message jumped out, saying Error:

Re: [R] memory problem of betadiver of vegan

2013-07-12 Thread Elaine Kuo
Hello List, I solved the problem by using the code with 31 votes http://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session On Sat, Jul 13, 2013 at 6:15 AM, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello List, This is Elaine. I am running betadiver

[R] extract beta.sim from dist type data (package betapart)

2013-07-17 Thread Elaine Kuo
Dear List, This is Elaine. I am using beta.part to calculate the beta diversity index. The function of beta.part can generate three kinds of beta diversity indice at one time. However, it is Simpson index that I want. The calculation result is composed of three rows and N/A columns (dist class).

Re: [R] [R-sig-eco] extract beta.sim from dist type data (package betapart)

2013-07-19 Thread Elaine Kuo
sarah.gos...@gmail.comwrote: Replied to on the R-sig-ecology list, with a request not to cross-post. Briefly, the output is a list with named components, so can be extracted as usual. Sarah On Wed, Jul 17, 2013 at 5:50 AM, Elaine Kuo elaine.kuo...@gmail.com wrote: Dear List

[R] how to calculate the average values of each row in a matrix

2013-07-19 Thread Elaine Kuo
Hello, I have a matrix (class matrix) composed of GridCell (row and column). The matrix value is the beta diversity index value between two grids. Now I would like to get the average value of each GridCell. Please kindly advise how to make the calculation. Thank you. Elaine The matrix looks

[R] merge matrix row data

2013-07-31 Thread Elaine Kuo
Dear list, I have a matrix showing the species presence-absence on a map. Its rows are map locations, represented by GridCellID, such as GID1 and GID 5. Its columns are species ID, such as D0989, D9820, and D5629. The matrix is as followed. Now I want to merge the GridCellID according to

Re: [R] merge matrix row data

2013-07-31 Thread Elaine Kuo
)),];(!!colSums(x1))*1} )) res #D0989 D9820 D5629 D4327 D2134 #IslandA 1 1 0 1 0 #IslandB 0 1 1 0 1 A.K. - Original Message - From: Elaine Kuo elaine.kuo...@gmail.com To: r-h...@stat.math.ethz.ch r-h...@stat.math.ethz.ch Cc: Sent

Re: [R] merge matrix row data

2013-08-01 Thread Elaine Kuo
(mat1)),];!!colSums(x1)})) #D0989 D9820 D5629 D4327 D2134 #IslandA TRUE TRUE FALSE TRUE FALSE #IslandB FALSE TRUE TRUE FALSE TRUE # *1 will replace TRUE with 1 and FALSE with 0. A.K. From: Elaine Kuo elaine.kuo...@gmail.com To: arun

Re: [R] merge matrix row data

2013-08-01 Thread Elaine Kuo
- mat1[match(gsub(.*\\s+,,get(x)),mat1[,1]),-1];(!!colSums(x1))*1})) #D0989 D9820 D5629 D4327 D2134 #IslandA 1 1 0 1 0 #IslandB 0 1 1 0 1 A.K. From: Elaine Kuo elaine.kuo...@gmail.com To: arun smartpink

Re: [R] merge matrix row data

2013-08-01 Thread Elaine Kuo
:24 PM, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello Arun Thank for comments. You are right. GID is the first column in the matrix this time. In the second row of the first column, it used to be GID 1 in the first e-mail. But you are also right. You answered it already, and this time

[R] how to generate response variables using simple regression

2012-08-26 Thread Elaine Kuo
Hello, I have weight and wing length data of 5 kinds of birds (B1 to B5). Weight data (predictor) and wing data (response) were used to generated a simple regression. (using lm) Now some weight data are found but without wing data (B6, B7). I want to use the generated simple regression to

[R] To predict Y based on only one sample of X and Y

2012-08-27 Thread Elaine Kuo
Hello I want to predict wing length using regression commands. (lm and predict) The data details are as followed Data: Bird physiological data 1. body mass 2. body length 3. wing length Data type: Order A: consisting of 20 species, body mass and length of all 20 species are

[R] to retrieve specific data from a matrix

2013-09-11 Thread Elaine Kuo
Dear list, I want to retrieve a specific data from a matrix with 3000 columns. The matrix has island ID as its rows and species ID as its columns. There are 20 rows and 3000 columns in the matrix. (Island ID: Species 1- Species 20/ species ID: Species 1- Species 3000) The contents of the matrix

[R] search species with all absence in a presence-absence matrix

2013-09-20 Thread Elaine Kuo
Dear list I have a matrix composed of islandID as rows and speciesID as columns. IslandID: Island A, B, C….O (15 islands in total) SpeciesID: D0001, D0002, D0003….D0100 (100 species in total) The cell of the matrix describes presence (1) or absence (0) of the species in an island. Now I

  1   2   >