search for: guox

Displaying 20 results from an estimated 31 matches for "guox".

Did you mean: guo
2010 Jun 02
4
Draw text with a box surround in plot.
text() can draw text on a plot. Do we have a way/function to draw text with a box surround it? Thanks, -james
2009 Mar 10
6
Pseudo-random numbers between two numbers
I would like to generate pseudo-random numbers between two numbers using R, up to a given distribution, for instance, rnorm. That is something like rnorm(HowMany,Min,Max,mean,sd) over rnorm(HowMany,mean,sd). I am wondering if dnorm(runif(HowMany, Min, Max), mean, sd) is good. Any idea? Thanks. -james
2010 Jul 12
3
How to mean, min lists and numbers
I would like to sum/mean/min a list of lists and numbers to return the related lists. -1+2*c(1,1,0)+2+c(-1,10,-1) returns c(2,13,0) but sum(1,2*c(1,1,0),2,c(-1,10,-1)) returns 15 not a list. Using the suggestions of Gabor Grothendieck, Reduce('+',list(-1,2*c(1,1,0),2,c(-1,10,-1))) returns what we want, c(2,13,0). However, it seems that this way does not work to mean/min. So, how to
2009 Sep 09
3
How to return/show the indexes of unusual points in boxplot?
I am wondering if you know how to return by function or show in boxplot, the indexes of unusual points, such as, points that are outside the box or in [Q3+1.5IQR,Max]. For example, > boxplot(c(4,rnorm(20),8)) There are 2 unusual points 4 and 8. How to show the indexes of 4 and 8 in the boxplot or return them by function? Thanks, -james
2010 Jul 07
2
Sum vectors and numbers
We want to sum many vectors and numbers together as a vector if there is at least one vector in the arguments. For example, 1 + c(2,3) = c(3,4). Since we are not sure arguments to sum, we are using sum function: sum(v1,v2,...,n1,n2,..). The problem is that sum returns the sum of all the values present in its arguments: sum(1,c(2,3))=6 sum(1,2,3)=6 We do not want to turn sum(v1,v2,...,n1,n2,..) to
2009 Mar 10
2
How to color certain area under curve
For a given random variable rv, for instance, rv = rnorm(1000), I plot its density curve and calculate some quantiles: plot(density(rv)) P10P50P90 = = quantile(rv,probs = c(10,50,90)/100) I would like to color the area between P10 and P90 and under the curve and mark the P50 on the curve. > rv = rnorm(1000) > plot(density(rv)) > P10P50P90 = = quantile(rv,probs = c(10,50,90)/100) Could
2010 May 27
2
How to catch Error Messages in R
As we knew, if a function is not used correctly, an error message will throw/display in R: > rnorm(-1) Error in rnorm(-1) : invalid arguments I would like to catch the error message or assign an error message to a variable so that I can use them some where else. So, how to catch error messages in R? Thanks, -james
2008 Mar 31
2
Call R from C#
I would like to call functions/objects of R from C#.NET environment. I was wondering whether or not it is possible. If yes, could you please give me some suggestions on how to approach it (any examples/documentation on this)? Thanks! -James
2009 May 20
2
How to load data from Statistics Canada
We would like to load data from Statistics Canada (http://www.statcan.gc.ca/) using R, for example, Employment and unemployment rates. It seems to me that the tables are displayed in HTML. I was wondering if you know how to load these tables. Thanks, -james
2009 May 27
2
How to set a filter during reading tables
We are reading big tables, such as, Chemicals <- read.table('ftp://ftp.bls.gov/pub/time.series/wp/wp.data.7.Chemicals',header = TRUE, sep = '\t', as.is =T) I was wondering if it is possible to set a filter during loading so that we just load what we want not the whole table each time. Thanks, -james
2009 Jun 30
1
How to pass parameters to htmlParse Bank of Canada html pages
To get USDCAD rates from Bank of Canada, we first go url <- "http://banqueducanada.ca/en/rates/exchange-avg.html" select 12 months for Rates for the past and click "Get Rates" button. Then the page moves to address <- "http://banqueducanada.ca/cgi-bin/famecgi_fdps" and the rates show in the html page. htmlParse() can read the html document but
2009 Jun 23
1
How to find b entries using xPath?
We got all rows by: library(XML) doc = htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm') rows = xpathSApply(doc, '//table/tbody/tr') The last row is: row_last = rows[15] row_last [[1]] <tr><td id="t1stub17" class="stub1 RGBShade"><b>Unsmoothed composite leading indicator</b></td>&#13; <td
2009 Aug 20
1
Questions on factors in regression analysis
I got two questions on factors in regression: Q1. In a table, there a few categorical/factor variables, a few numerical variables and the response variable is numeric. Some factors are important but others not. How to determine which categorical variables are significant to the response variable? Q2. As we knew, lm can deal with categorical variables. I thought, when there is a categorical
2010 May 05
3
Limitations on R code file
I would like to run R code from a file that is generated from other source. The file consists of some variables and formulas/equations such as Variables = log(100) ##Other variable definitions VariablesWithLongNames = 2*3*log(12345678)+10^4 + Variables Equations=log(VariablesWithLongNames)+Variables^2 ##Other equations, formulas Result = Equations^2+rnorm(10000) hist(Result,breaks=100,freq=FALSE)
2009 Mar 14
1
multiple hypothesis testing
...g / creating unique colours for behavioural / > transitional data (Alexis Gabadinho) > 60. Re: Selecting / creating unique colours for behavioural / > transitional data (Ross Culloch) > 61. Re: How to find maximum values on the density function of > arandom variable (guox@ucalgary.ca) > 62. Re: Selecting / creating unique colours for behavioural / > transitional data (Alexis Gabadinho) > 63. More basic equivalent of TukeyHSD (Janet) > 64. how to add labels to existing plot for the subset of data > (Xin Shi) > 65. Re: print median and...
2009 Jun 01
1
installing sn package
...color/character in qqmath (Kevin W)   63. Re: Hierarchical glm with binomial family (Douglas Bates)   64. Re: Sort matrix by column 1 ascending then by column 2       decending (Linlin Yan)   65. Deviance explined in GAMM, library mgcv (Berta Ib??ez)   66. How to set a filter during reading tables (guox@ucalgary.ca)   67. Re: How to exclude a column by name? (Wacek Kusnierczyk)   68. Labeling barplot bars by multiple factors (Thomas Levine)   69. Re: vegan metaMDS question (Gavin Simpson)   70. Re: Sort matrix by column 1 ascending then by column 2       decending (Kevin W)   71. Re: R in Ubunto (...
2013 Mar 18
0
[linux-linus test] 17325: regressions - trouble: broken/fail/pass
...am@the-dreams.de> Wolfram Sang <wsa@the-dreams.de> Woody Hung <Woody.Hung@mediatek.com> Woody Suwalski <terraluna977@gmail.com> Wouter de Geus <benv-xensource.com@junerules.com> Wouter Verhelst <w@uter.be> Wu Fengguang <fengguang.wu@intel.com> Wu Guoxing <b39297@freescale.com> wwang <wei_wang@realsil.com.cn> Xi Wang <xi.wang@gmail.com> Xiangliang Yu <yuxiangl@marvell.com> Xiangzhen Ye <Xiangzhen.Ye@csr.com> Xianhan Yu <aroundight77@gmail.com> Xiantao Zhang <xiantao.zhang@intel.com> Xiao Gua...
2013 Mar 29
0
[linux-linus test] 17454: regressions - FAIL
...am@the-dreams.de> Wolfram Sang <wsa@the-dreams.de> Woody Hung <Woody.Hung@mediatek.com> Woody Suwalski <terraluna977@gmail.com> Wouter de Geus <benv-xensource.com@junerules.com> Wouter Verhelst <w@uter.be> Wu Fengguang <fengguang.wu@intel.com> Wu Guoxing <b39297@freescale.com> wwang <wei_wang@realsil.com.cn> Xi Wang <xi.wang@gmail.com> Xiangliang Yu <yuxiangl@marvell.com> Xiangzhen Ye <Xiangzhen.Ye@csr.com> Xianhan Yu <aroundight77@gmail.com> Xiantao Zhang <xiantao.zhang@intel.com> Xiao Gua...
2013 Apr 10
0
[linux-linus test] 17612: regressions - FAIL
...am@the-dreams.de> Wolfram Sang <wsa@the-dreams.de> Woody Hung <Woody.Hung@mediatek.com> Woody Suwalski <terraluna977@gmail.com> Wouter de Geus <benv-xensource.com@junerules.com> Wouter Verhelst <w@uter.be> Wu Fengguang <fengguang.wu@intel.com> Wu Guoxing <b39297@freescale.com> wwang <wei_wang@realsil.com.cn> Xi Wang <xi.wang@gmail.com> Xiangliang Yu <yuxiangl@marvell.com> Xiangzhen Ye <Xiangzhen.Ye@csr.com> Xianhan Yu <aroundight77@gmail.com> Xiantao Zhang <xiantao.zhang@intel.com> Xiao Gua...
2013 May 05
0
[linux-linus test] 17901: regressions - FAIL
...am@the-dreams.de> Wolfram Sang <wsa@the-dreams.de> Woody Hung <Woody.Hung@mediatek.com> Woody Suwalski <terraluna977@gmail.com> Wouter de Geus <benv-xensource.com@junerules.com> Wouter Verhelst <w@uter.be> Wu Fengguang <fengguang.wu@intel.com> Wu Guoxing <b39297@freescale.com> wwang <wei_wang@realsil.com.cn> Xi Wang <xi.wang@gmail.com> Xiangliang Yu <yuxiangl@marvell.com> Xiangzhen Ye <Xiangzhen.Ye@csr.com> Xianhan Yu <aroundight77@gmail.com> Xiantao Zhang <xiantao.zhang@intel.com> Xiao Gua...