Re: [R] Size of windows graphics device

2011-11-02 Thread Dejian Zhao
par("fin") : The figure region dimensions, |(width,height)|, in inches. par("din") : the device dimensions, |(width,height)|, in inches. On 2011-11-2 18:50, Erich Neuwirth wrote: > R for Windows 2.14.0 > > Is there a function reporting the size of the current "windows" device > after it has been r

Re: [R] ERROR: Object not found

2010-09-20 Thread Dejian Zhao
Error originates in the customized function ode. When IN!=0, You did not assign a value to dIN which is required in list(c(dP1,dP2,dIN)). On 2010-9-21 2:30, Tianchan Niu wrote: Dear All, I am trying to use ode solver "rk4" to solve an ODE system, however, it keeps saying: Error in eval(expr

Re: [R] invalid 'row.names' length error when running scatterplots or plot in R Commander

2010-09-20 Thread Dejian Zhao
I did not reproduce the error either, because I failed to find the function scattperplot in your script. :D I suggest that you check whether they read the data into R correctly. On 2010-9-20 10:00, Samantha McKenzie wrote: Hello, I teach statistics and use R Commander for teaching. I have 2

Re: [R] Linux Editor

2010-09-12 Thread Dejian Zhao
Try SciViews-K, an extension for Komodo Edit to transform it into a R editor and GUI. http://www.sciviews.org/SciViews-K/index.html On 2010-8-2 23:35, alphaace wrote: Hi Everyone, I recently have started using R again on a Linux box after spending several years on a Mac. Last I checked, the b

Re: [R] WriteXLS problem

2010-09-06 Thread Dejian Zhao
The maximum number of rows in excel 2003 or below is 65535, less than your number of rows, so if you export your data into "xls" files, probably you cannot see all your data in excel. Exel 2007 can hold as many as 1048575 lines, thus "xlsx" file is a better choice. On 2010-9-7 0:03, Kenneth

Re: [R] "pairs" with same xlim and ylim scale

2010-09-03 Thread Dejian Zhao
lly in the "panel.cor" function. Adding "..." in the function and "text" call fixed everything. Best, ...Tao - Original Message From: Dejian Zhao To: r-help@r-project.org Sent: Thu, September 2, 2010 7:57:55 PM Subject: Re: [R] "pairs"

Re: [R] "pairs" with same xlim and ylim scale

2010-09-02 Thread Dejian Zhao
rs. Just type "pairs.default" at the R command prompt and enter, you can get the source code of "pairs.default". On 2010-9-2 15:15, Shi, Tao wrote: Hi Dejian, You're right on this! Do you know how to pass those two argument into lower.panel? Thanks! ...Tao __

Re: [R] vglm

2010-09-01 Thread Dejian Zhao
be NA. I have the same problem that my fitted values is NA. > from the R document (f...@extra <mailto:f...@extra> is to get the > estimate of alpha, how about to get the estimate of k ?) > any idea how to solve the NA problem ? > thanks again > > On Tue, Aug 31,

Re: [R] vglm

2010-09-01 Thread Dejian Zhao
My previous expression is ok. But I agree using argument 'data' will be a better choice especially when there are many variables from the object specified by 'data'. On 2010-9-1 16:23, Gavin Simpson wrote: On Wed, 2010-09-01 at 11:05 +0800, Dejian Zhao wrote: try fi

Re: [R] vglm

2010-08-31 Thread Dejian Zhao
try fit=vglm(mydata[,"Loss"]~1,pareto1(location=alpha),trace=TRUE,crit="c") On 2010-9-1 3:20, choonhong ang wrote: Hi All, could anybody help me to understand what is this error means ? mydata=read.table("C:/Documents and Settings/angieb/Desktop/CommercialGL/cl_ilf_claimdata.csv",header=TRUE,

Re: [R] "mode" function

2010-08-31 Thread Dejian Zhao
R does have a mode function, but it seems NOT to do the same thing as in matlab. > A <- matrix(c(1:3,1,3,2,3,3,2),nrow=3,byrow=F) > A [,1] [,2] [,3] [1,]113 [2,]233 [3,]322 > A[,2] [1] 1 3 2 > mode(A) [1] "numeric" > mode(A[,2]) [1] "numeric" On 2010-9-

Re: [R] "pairs" with same xlim and ylim scale

2010-08-31 Thread Dejian Zhao
I think you have successfully passed the "xlim" and "ylim" into the function pairs1. Compare the two graphs produced by the codes you provided, you can find the xlim and ylim in the second graph have been reset to the assigned value. It seems that the program halted in producing the second plot

Re: [R] Can WinBUGS run two processes through R at the same time?

2010-08-31 Thread Dejian Zhao
Does winbugs write anything to the file 'inits1.txt'? If yes,possibly the file is exclusively occupied by the first winbugs process. On 2010-9-1 1:12, 潘家群 wrote: Dear all, I want to run two winBugs processes through R (by R2WinBUGS package). The first WinBUGS process can successfully perfor

Re: [R] R and MySQL

2010-08-26 Thread Dejian Zhao
I am not sure whether you are working under windows. Hope the following message helps. Using the RMySQL package under Windows http://www.stat.berkeley.edu/users/spector/s133/RMySQL_windows.html On 2010-8-27 5:03, quant wrote: I installed MySQL 5.0.67 and R. I installed RMySQL and added env var

Re: [R] checking if a package is installed

2010-08-26 Thread Dejian Zhao
require() does what you want. Run "?require" for details. require() returns 'FALSE' and gives a warning (rather than an error as 'library()' does by default) if the package does not exist. 'require' returns (invisibly) a logical indicating whether the required package is available. (You can c

Re: [R] How to remove all objects except a few specified objects?

2010-08-24 Thread Dejian Zhao
If your specified objects have a certain pattern, you can use the parameter "pattern" in ls() to remove or keep it. rm(list=ls(..., pattern="your_pattern")) If not, possibly you have to manually specify them. On 2010-8-24 3:00, Cheng Peng wrote: How to remove all R objects in the RAM except for

Re: [R] Fancy Page layout

2010-06-01 Thread Dejian Zhao
I think you can use grid.layout() to create the appropriate layout, allocating proper space for the upper plotting area and the bottom text region, and then use viewport() with the layout parameter to control the output by pushing the viewport at the proper region on the graphical device.

Re: [R] sort a data.frame

2010-05-20 Thread Dejian Zhao
If you want to sort the data frame according to column "b", the followding code does this work. attach(dd) dd<-dd[order(b),] detach(dd) If you want to sort the data frame according to the chr number in column b, you should extract the numbers first into a vector, say chrnum, and then use order

[R] about chisq.test()

2010-05-19 Thread Dejian Zhao
Dear all, I want to check whether 5 decimal data is 1:1:1:1:1. For example, data = c(14.3,16.2,14.7,18.7,14.5) Since chisq.test() can do the goodness-of-fit test, it becomes my choice. However, I find in the "?chisq.test" help file that it requires "non-negative integers"! It seems that it is i