Re: [R] R static is dynamically linked!!

2008-05-20 Thread Prof Brian Ripley
You asked for R to be built as a static lib, not for the front-end to be statically linked. It is not the R lib it is dynamically linking to (that is statically linked by default whether or not you ask for a separate lib), but the OS components. R depends on dlopen-ing extensions, so there is

Re: [R] contr.treatments query

2008-05-20 Thread Prof Brian Ripley
From ?contrasts Usage: contrasts(x, how.many) - value ... how.many: How many contrasts should be made. Defaults to one less than the number of levels of 'x'. This need not be the same as the number of columns of 'ctr'. so that is 2 in your example, and it takes the

Re: [R] For Social Network Analysis-Graph Analysis - How to convert 2 mode data to 1 mode data?

2008-05-20 Thread Gabor Csardi
Solomon, sorry for the delay. In igraph vertices are numbered from 0, so you need keep - 0:3 and then the function i've sent seems to work. But i can see that you also have a solution now. Gabor On Sat, May 17, 2008 at 09:32:27AM -0400, Messing, Solomon O. wrote: Consider the following two

Re: [R] Log or diary file

2008-05-20 Thread Agustin Lobo
Thanks, but I'm looking for a more user-friendly environment that would make the transition from windows to linux easier for students using the R GUIs in windows, either the by default GUI or the SciView GUI (which, btw, are both excellent). Agus Vincent Goulet wrote: Agustin, Given this

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
First of all thank you very much, that helped a lot! Now I have another related problem, again I want to limit a dataframe on certain elements, the dataframe looks like this: colnames(sd_all) [1] Xmydata.a [3] mydata.xmydata.sd.a . . . [13] mydata.mad.xsnr

Re: [R] contr.treatments query

2008-05-20 Thread Ted Harding
Apologies -- I have just observed my oversight below! Please ignore the message below. Ted. On 20-May-08 09:14:30, Ted Harding wrote: On 20-May-08 06:10:48, Prof Brian Ripley wrote: From ?contrasts Usage: contrasts(x, how.many) - value ... how.many: How many contrasts should be made.

Re: [R] Log or diary file

2008-05-20 Thread Tobias Verbeke
Agustin Lobo wrote: Thanks, but I'm looking for a more user-friendly environment that would make the transition from windows to linux easier for students using the R GUIs in windows, either the by default GUI or the SciView GUI (which, btw, are both excellent). Another cross-platform

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 20.05.2008 10:25:00: First of all thank you very much, that helped a lot! Now I have another related problem, again I want to limit a dataframe on certain elements, the dataframe looks like this: colnames(sd_all) [1] Xmydata.a

Re: [R] Starting R from .RData in linux

2008-05-20 Thread Agustin Lobo
Marianne, I do the equivalent gnome-terminal -e R or xterm -e R and R starts on the home directory and indicating: ARGUMENT '/media/mifat32/Rexercises/.RData' __ignored__ Are you sure you do not add any other parameter? I've tried xterm -e R --restore gnome-terminal -e R --restore same result.

Re: [R] contr.treatments query

2008-05-20 Thread Ted Harding
On 20-May-08 06:10:48, Prof Brian Ripley wrote: From ?contrasts Usage: contrasts(x, how.many) - value ... how.many: How many contrasts should be made. Defaults to one less than the number of levels of 'x'. This need not be the same as the number of columns of

Re: [R] Draw Polygon with a Circular Side

2008-05-20 Thread Jim Lemon
ermimi wrote: Hello Friends!!! I would want draw a circular histogram, and I would like draw a polygon with a circular side. This is easy if I use the functions polygon and arc, but I want that the polygon with a circular side have background colour. The polygon created with function polygon

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
sd_all_clusterX-sd_all[(clusterX%in%sd_all$X),] # not tested seems to do nothing, all elements of the original dataframe are now selected Petr Pikal wrote: Hi [EMAIL PROTECTED] napsal dne 20.05.2008 10:25:00: First of all thank you very much, that helped a lot! Now I have

Re: [R] Select certain elements from dataframe

2008-05-20 Thread jim holtman
It would help if you would post a reproducible subset of your data. Use 'dput' if including it in the text. All we can do is make a guess since you have not even include 'str(sd_all)' so we know the structure of your data.

[R] NOTE warning

2008-05-20 Thread Mikis Stasinopoulos
Dear all I am using NAMESPACE in my package but I would like the user to be able to overwrite four functions: own.linkfun, own.linkinv, own.mu.eta and own.valideta. These are used to defined own link functions. Is there any way of doing that without getting the when I am checking the

Re: [R] Log or diary file

2008-05-20 Thread Agustin Lobo
This is what I was looking for and actually TeachingDemos includes a lot of very interesting things! Thanks a lot for making it and for pointing it to me. Agus Greg Snow wrote: The R2HTML package has tools for creating an HTML log of your session (see ?HTMLStart). Or the TeachingDemos

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 20.05.2008 11:43:07: sd_all_clusterX-sd_all[(clusterX%in%sd_all$X),] # not tested seems to do nothing, all elements of the original dataframe are now selected OK you made me to test it. As you do not provided reproducible example I used some of my data

Re: [R] function in nls argument -- robust estimation

2008-05-20 Thread Fernando Moyano
Hi Kate and others, thanks for the info. Btw, you sent the different methods to analyze the data: nls, nls.lm and nlrob. Comparing the results visually nlrob performed better then nls, but nls.lm (using the 0.9 quantile of residuals) was still better than nlrob. My data may have a rather large

[R] Printing output in STDOUT

2008-05-20 Thread Edward Wijaya
Hi, Currently the R script I have is executed with this command: $ R CMD BATCH mycode.R And the output is stored in mycode.Rout. Is there a way I can issue command from shell (like above) so that the output is printed to STDOUT? It's troublesome to open the Rout file every time to debug.

Re: [R] NOTE warning

2008-05-20 Thread Duncan Murdoch
On 20/05/2008 6:27 AM, Mikis Stasinopoulos wrote: Dear all I am using NAMESPACE in my package but I would like the user to be able to overwrite four functions: own.linkfun, own.linkinv, own.mu.eta and own.valideta. These are used to defined own link functions. Is there any way of doing

Re: [R] R syntax, space smaller than space

2008-05-20 Thread Torsten Wiebke
Hallo, does nobody have an answer? I changed something in the package climatol especially in the function diagwl. Dos anybody know where I can put the code in the Internet to discuss it? I put it to: http://de.pastebin.ca/1023676 It would be kind if someone can have a look what is to make

Re: [R] Starting R from .RData in linux

2008-05-20 Thread Marianne Promberger
On 05/20/08 10:42, Agustin Lobo wrote: Marianne, I do the equivalent gnome-terminal -e R or xterm -e R and R starts on the home directory and indicating: ARGUMENT '/media/mifat32/Rexercises/.RData' __ignored__ Oops, turns out I get the same message, I just overlooked it. However, for me R

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
Hi, sd_all_clusterX-sd_all[(as.character(clusterX)%in%as.character(sd_all$X)),] again selects everything from sd_all, whereas sd_all_clusterX-sd_all[(as.character(sd_all$X)%in%as.character(ClusterX)),] results in sd_all_clusterX having 681 entries, what is smaller than the whole dataset (707

Re: [R] Select certain elements from dataframe

2008-05-20 Thread jim holtman
Is this what you want: It turns out that clusterX was a dataframe - sd_all[sd_all$X %in% clusterX$X,] X mydata.mean.a mydata.mean.x mydata.sd.a mydata.sd.x mydata.log2.mean.a mydata.log2.mean.x 3 VS_0225 2.00 1.330.170.14 -0.01 -0.59 6

[R] how to save many trees within a loop?

2008-05-20 Thread Angel Marley
Hi, I would like to save many trees created in a loop as different ones. I can plot them, but I can not get the whole tree properties saved. I paste the script below Also, How can I perform multivariate trees?, that is predicting a vector o values, not a simple scalar observation. Thanks in

Re: [R] R syntax, space smaller than space

2008-05-20 Thread Duncan Murdoch
On 5/20/2008 6:52 AM, Torsten Wiebke wrote: Hallo, does nobody have an answer? I changed something in the package climatol especially in the function diagwl. Dos anybody know where I can put the code in the Internet to discuss it? I put it to: http://de.pastebin.ca/1023676 It would be kind if

[R] Yellow dog linux install?

2008-05-20 Thread Ben Snyder
Hello folks I am attempting to install R on a series of Apple G5 machines which are running Yellow Dog Linux 6.0. Has anyone had success with this, and is there something I should be doing which I am not? Upon configure, I receive the error message: checking whether mixed C/Fortran code can

Re: [R] R syntax, space smaller than space

2008-05-20 Thread Uwe Ligges
Duncan Murdoch wrote: On 5/20/2008 6:52 AM, Torsten Wiebke wrote: Hallo, does nobody have an answer? I changed something in the package climatol especially in the function diagwl. Dos anybody know where I can put the code in the Internet to discuss it? I put it to:

[R] recompute values repeatedly, or new file for glm()?

2008-05-20 Thread Esmail Bonakdarian
Hello all, I need to tap into the collective wisdom of the group re an issue of efficiency. A sketch of the situation: Let's say 4000 observations in variables Y, X1, X2 , X3 and X4. I would like to feed various combinations of this expression Y ~ X1+X2+X3+X4 +

[R] need some help in plotting xy graph

2008-05-20 Thread Kurapati, Ravichandra (Ravichandra)
Hi Dataframefdf contains bin rate overlay 1 1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 2 2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 3 1 90 Assign First/cc

Re: [R] how to save many trees within a loop?

2008-05-20 Thread Dieter Menne
Angel Marley angel_nauti at yahoo.com writes: I would like to save many trees created in a loop as different ones. I can plot them, but I can not get the whole tree properties saved. I paste the script below for (i in 1:7){#loop para hacer arb arb=arb[i]#contador

[R] New mailing list R-SIG-Fedora

2008-05-20 Thread Martyn Plummer
Thanks to Martin Maechler, there is a new special interest group (SIG) mailing list for users of R on Fedora: http://www.fedoraproject.org Fedora users will have noticed that RPMs for R 2.7.0 have not yet arrived through the Fedora Yum channel. This is because Fedora 9 went into feature freeze,

Re: [R] Lattice box percentile plot

2008-05-20 Thread Mr Derik
Hello Thanks for your attempted help. I have just worked out how to do it. You take the code for panel.bpplot and near the top of the code replace lline with lpolygon. Then it take the $fill paramiter from the trellis settings. Seems to work, though I need to check it isn't doing something

[R] Show Basic Properties of Functions

2008-05-20 Thread guox
I would like to know some basic properties, such as its domain, its range, if it is increasing, of the function defined. I was wondering if R provides functionalities to show this information. If not, any ideas on writing such functions. Thanks. -james

[R] Error in `[.matrix.coo`(x, rw, cl) : Subscripts out of bound

2008-05-20 Thread Vidhu Choudhary
Hi All, I am facing a strange problem. I am making a R Package that internally run various packages and summarizes the results from them. I am getting this error from the piece of code written below. The text in red color is throwing Error in `[.matrix.coo`(x, rw, cl) : Subscripts out of bound

[R] Alignment of axes intersection

2008-05-20 Thread David Afshartous
All, Very basic question I can't seem to find the answer to: plot(0:10, 0:10) The axes intersection is not aligned at (0,0) in the lower left. How does one force this? I searched for graphical parameters under par(graphics) but can't seem to find it. Thanks! David

Re: [R] Printing output in STDOUT

2008-05-20 Thread Esmail Bonakdarian
Edward Wijaya wrote: Hi, Currently the R script I have is executed with this command: $ R CMD BATCH mycode.R And the output is stored in mycode.Rout. Is there a way I can issue command from shell (like above) so that the output is printed to STDOUT? It's troublesome to open the Rout file

Re: [R] R static is dynamically linked!!

2008-05-20 Thread George Georgalis
On Tue 20 May 2008 at 07:01:58 AM +0100, Prof Brian Ripley wrote: You asked for R to be built as a static lib, not for the front-end to be statically linked. It is not the R lib it is dynamically linking to (that is statically linked by default whether or not you ask for a separate lib),

Re: [R] Alignment of axes intersection

2008-05-20 Thread Prof Brian Ripley
Pars xaxs, yaxs which take value i: see also 'An Introduction to R. On Tue, 20 May 2008, David Afshartous wrote: All, Very basic question I can't seem to find the answer to: plot(0:10, 0:10) The axes intersection is not aligned at (0,0) in the lower left. How does one force this? I

Re: [R] Alignment of axes intersection

2008-05-20 Thread Bert Gunter
You need to read the docs more carefully! xaxs and yaxs are the par values you want: set them to i . Cheers, Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Afshartous Sent: Tuesday, May 20, 2008 8:50 AM

Re: [R] Printing output in STDOUT

2008-05-20 Thread Prof Brian Ripley
On Tue, 20 May 2008, Esmail Bonakdarian wrote: Edward Wijaya wrote: Hi, Currently the R script I have is executed with this command: $ R CMD BATCH mycode.R And the output is stored in mycode.Rout. Is there a way I can issue command from shell (like above) so that the output is printed to

Re: [R] Alignment of axes intersection

2008-05-20 Thread Greg Snow
Mathematicians like to have axes cross at 0, the general rule for statistics is to have the axes positioned so that they help you understand the data, but don't interfere with the actual points (or force too much whitespace by being put to far away from the data), so the default positioning

Re: [R] Alignment of axes intersection

2008-05-20 Thread David Afshartous
Agreed. The main reason I wanted the change in alignment was that I had three curves that were converging to a asymptote, and when I drew the horizontal asymptote via abline(), it distorted the picture somewhat since the line from abline() goes all the way to the y-axis. On 5/20/08 12:21 PM,

[R] Question about banking to 45 degrees.

2008-05-20 Thread Joshua Hertlein
Hello, I am very interested in banking to 45 degrees as defined by William S. Cleveland in Visualizing Data. I like to do it in R as well as Excel, etc. With R I have come across the following method: xyplot(x, y, aspect=xy) (part of lattice package) which will bank my graph to 45

Re: [R] Printing output in STDOUT

2008-05-20 Thread Esmail Bonakdarian
Prof Brian Ripley wrote: On Tue, 20 May 2008, Esmail Bonakdarian wrote: Edward Wijaya wrote: Hi, Currently the R script I have is executed with this command: $ R CMD BATCH mycode.R And the output is stored in mycode.Rout. Is there a way I can issue command from shell (like above) so that

Re: [R] how can i superpose 2 graphs

2008-05-20 Thread Jorge Ivan Velez
Hi there, Perhaps: set.seed(122) x=1:50 y1=2*x+x^2 y2=x^2 plot(x,y1,ylim=range(y1,y2),type='l',ylab=expression(f(x)),xlab='x', main='Two superimposed graphs') points(x,y2,type='l',col=2) legend(topleft,c(expression(f(x)==2*x+x^2),expression(f(x)==x^2)),lty=1,col=1:2) Also you could check ?curve

[R] R for loop question

2008-05-20 Thread Douglas M. Hultstrand
Hello, I am trying to assign a variable name (x1,x2,x3...) in a loop statement that is based on a counter (counter is based on the number of hours within the datafile). The x1,x2 data will later be called for plotting the data. Below is a clip of the for loop I am using, any suggestions?

Re: [R] R for loop question

2008-05-20 Thread Erik Iverson
Douglas - To answer your question directly, use perhaps combination of ?assign and ?paste. In general, you usually do not have to do this sort of thing, but can use one of the apply family of functions (apply, sapply, lapply, mapply) to do whatever you want with shorter, cleaner code and

Re: [R] String buffer

2008-05-20 Thread Duncan Murdoch
On 5/20/2008 12:58 PM, Applejus wrote: Hello, I have an expression a in R that has about 2300 characters and I want to convert it to a string using toString or as.character. The problem is I am only getting the first 500 or so characters when I convert it to string. I tried to use substring in

Re: [R] Draw Polygon with a Circular Side

2008-05-20 Thread ermimi
Thank you very much Jim for you help!!Your help was my need!! I have create this function to draw a polygon with a circular side DrawPortion-function(init,finish,length_){ plot(0,xlim=c(-10,10),ylim=c(-10,10),xlab=,ylab=,type=n,axes=TRUE)

[R] Programatic Method for Holiday Dummy Variables

2008-05-20 Thread Idgarad
I am working on a weekly analysis and would like to look into the effects of a holiday. As I only get weekly data how can I populate, automagically, a series of dummy variables that are aligned with my data. Snip - channel1 - odbcConnectExcel(D:/RSTATS/metrics.xls) sqlTables(channel1)

[R] for loop step

2008-05-20 Thread Nair, Murlidharan T
How do I define the incremental step in a for loop? for (j in 1:10){ cat(j, \n) } In the above example, if I want to increment j by 2 where do I specify that? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread Deepayan Sarkar
On 5/20/08, Joshua Hertlein [EMAIL PROTECTED] wrote: Hello, I am very interested in banking to 45 degrees as defined by William S. Cleveland in Visualizing Data. I like to do it in R as well as Excel, etc. With R I have come across the following method: xyplot(x, y, aspect=xy)

Re: [R] String buffer

2008-05-20 Thread Prof Brian Ripley
On Tue, 20 May 2008, Duncan Murdoch wrote: On 5/20/2008 12:58 PM, Applejus wrote: Hello, I have an expression a in R that has about 2300 characters and I want to convert it to a string using toString or as.character. The problem is I am only getting the first 500 or so characters when I

Re: [R] for loop step

2008-05-20 Thread Erik Iverson
You are doing it in your bit about 1:10, which is shorthand for generating a sequence 1, 2, 3, ..., 9, 10. Use ?seq to do what you want. for(i in seq(1, 10, by = 2)) cat(i, \n) Best, Erik Nair, Murlidharan T wrote: How do I define the incremental step in a for loop? for (j in 1:10){

[R] hist clarification

2008-05-20 Thread John Gant
Can someone help me with a misunderstanding I'm having with hist? I expected, from the example below, that the number of bins would always be 10 and the length of the counts array the same. According to the help section 'breaks' can be a integer indicating the number of bins. From the example

Re: [R] hist clarification

2008-05-20 Thread Deepayan Sarkar
On 5/20/08, John Gant [EMAIL PROTECTED] wrote: Can someone help me with a misunderstanding I'm having with hist? I expected, from the example below, that the number of bins would always be 10 and the length of the counts array the same. According to the help section 'breaks' can be a

Re: [R] hist clarification

2008-05-20 Thread Duncan Murdoch
On 5/20/2008 2:51 PM, John Gant wrote: Can someone help me with a misunderstanding I'm having with hist? I expected, from the example below, that the number of bins would always be 10 and the length of the counts array the same. According to the help section 'breaks' can be a integer indicating

Re: [R] Alignment of axes intersection

2008-05-20 Thread Greg Snow
If the issue is with abline going all the way to the axis rather than stopping at 0 (or other value), then you may want to look at the clip function (allow the default axes, but clip abline to a smaller region), for example: plot(0:10,0:10) points(0:10,0:10) clip(2,8,0,10) points(0:10,0:10)

Re: [R] R for loop question

2008-05-20 Thread Juan Manuel Barreneche
I had to do the same thing many times, i usually use a combination of the functions eval, parse and sprinf, as below: k - 1 for (i in 1:length(stats$hour)) { eval(parse(text=sprintf(x%s - dataset[%s,(3:15)], i, k))) k - k+1 } what it does is: eval(parse(text=STRING)) is a way to execute

Re: [R] R for loop question

2008-05-20 Thread Erik Iverson
Take a look at ?assign Juan Manuel Barreneche wrote: I had to do the same thing many times, i usually use a combination of the functions eval, parse and sprinf, as below: k - 1 for (i in 1:length(stats$hour)) { eval(parse(text=sprintf(x%s - dataset[%s,(3:15)], i, k))) k - k+1 } what it

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread Charilaos Skiadas
On May 20, 2008, at 2:34 PM, Deepayan Sarkar wrote: On 5/20/08, Joshua Hertlein [EMAIL PROTECTED] wrote: Hello, I am very interested in banking to 45 degrees as defined by William S. Cleveland in Visualizing Data. I like to do it in R as well as Excel, etc. With R I have come

[R] Finding functions

2008-05-20 Thread Felipe Carrillo
Hi All: Can anyone give me a hint about how to find functions built in in R. based on the articule below it should be something called DIYhelp but I can't find it. Thanks Part of the Kickstarting R package is a little text searching facility called DIYHelp. The program is based upon a simple,

[R] drawing lines in 3D (rotating them)

2008-05-20 Thread cgenolin
Hi the list, I write a short function to draw lines in 3D, showing then turning. At some point, I add delais to slow down the rotation. So two questions: 1) I try to find a library to draw animate lines in 3D but I did not find. That surprise me since it is very simple to do. Did I forget to

Re: [R] R for loop question

2008-05-20 Thread jim holtman
Consider using a 'list' instead of creating a lot of objects that you then have to manage: x - lapply(1:length(stats$hour), function(.indx) dataset[.indx, 3:15]) You can then access the data as x[[1]], ... On Tue, May 20, 2008 at 12:58 PM, Douglas M. Hultstrand [EMAIL PROTECTED] wrote:

Re: [R] Finding functions

2008-05-20 Thread Rolf Turner
On 21/05/2008, at 8:21 AM, Felipe Carrillo wrote: Hi All: Can anyone give me a hint about how to find functions built in in R. based on the articule below it should be something called DIYhelp but I can't find it. Thanks Part of the Kickstarting R package is a little text searching facility

Re: [R] drawing lines in 3D (rotating them)

2008-05-20 Thread jim holtman
Try the 'rgl' package On Tue, May 20, 2008 at 4:19 PM, [EMAIL PROTECTED] wrote: Hi the list, I write a short function to draw lines in 3D, showing then turning. At some point, I add delais to slow down the rotation. So two questions: 1) I try to find a library to draw animate lines in

Re: [R] R 2.70 + ps2pdf14

2008-05-20 Thread ivo welch
thanks. I am now using R-patched 2008-05-18 r45723 . This is probably intended, but if not, I wanted to note it briefly: on the pdf output device, symbol 1 is always black, no matter what color is selected. symbols 10 and 13 contain black. symbol 19 is the replacement for symbol 1 that takes

[R] 6 Courses: Upcoming June-July 2008 R/S+ Course Schedule by XLSolutions Corp

2008-05-20 Thread Sue Turner
Our June-July 2008 R/S+ course schedule is now available. Please check out this link for additional information and direct enquiries to Sue Turner [EMAIL PROTECTED] Phone: 206 686 1578 Can't see your city? Please email us! www.xlsolutions-corp.com/courselist.htm (1) R/S System: Advanced

[R] rose diagram

2008-05-20 Thread s j
hi all - I am student researcher in Bioengineeing and I am very new member of this group as well as a very new user of R. To my knowledge, rose.diag is a available function in circstat that i can use to plot circular data. Ideally I want to plot half-circle since I only have 0-180 deg angles. I

[R] Finding Functions

2008-05-20 Thread Felipe Carrillo
Thank you all for your help, it looks like www.rseek.org its a good place to look for help. Hi Felipe, It's a private message, so I hope you don't mind. Regarding your question, personally I think that apropos(what you want here), i.e, apropos(lm) is very useful. I use www.rseek.org from myy

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread Deepayan Sarkar
On 5/20/08, Charilaos Skiadas [EMAIL PROTECTED] wrote: Here is how I see it. Let me define a visual y-unit as the height of a unit of data in the y-direction, and similarly for a visual x-unit. Then the aspect ratio is the quotient of the visual y-unit over the visual x-unit. So the aspect

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread Charilaos Skiadas
On May 20, 2008, at 5:59 PM, Deepayan Sarkar wrote: On 5/20/08, Charilaos Skiadas [EMAIL PROTECTED] wrote: Here is how I see it. Let me define a visual y-unit as the height of a unit of data in the y-direction, and similarly for a visual x-unit. Then the aspect ratio is the quotient of

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread hadley wickham
I've also come across banking (), but I don't understand it, nor the significance of the value it returns. Regardless, it doesn't seem to be the aspect ratio that I am looking for. You might also want to have a look at: @article{heer:2006, Title = {Multi-scale banking to 45

[R] Help creating a correlation matrix

2008-05-20 Thread Robert O'Brien
Hello all. I have 14 variables, named D2_1, D2_2,...,D2_14 (inherited from a data set). I would like to create a matrix of correlations, although I would be content in just learning how to create a proper do loop. I tried something like this: (for i in 1:14){cor(D2_[i],D2_[i], use =

Re: [R] Help creating a correlation matrix

2008-05-20 Thread Jorge Ivan Velez
Hi Robert, There are so many way to do what you want to do. A good staring point would be http://www.nabble.com/Re%3A-applying-cor.test-to-a-%28m%2C-n%29-matrix---SUMMARY-to17150239.html#a17150239 HTH, Jorge On Tue, May 20, 2008 at 6:41 PM, Robert O'Brien [EMAIL PROTECTED] wrote: Hello

[R] Nonlinear regression

2008-05-20 Thread LXu
Could someone help me on the following: SAS has DUD (Does not Use Derivatives) for nonlinear regression. Does R has a similar capability? I am not good at derivatives and may get my derivative wrong before feeding it to a nonlinear regression procedure. Any help would be much appreciated.

Re: [R] Nonlinear regression

2008-05-20 Thread Bill.Venables
?nls (I always knew SAS *is* a DUD, but never that it has a DUD too...) Bill Venables CSIRO Laboratories PO Box 120, Cleveland, 4163 AUSTRALIA Office Phone (email preferred): +61 7 3826 7251 Fax (if absolutely necessary): +61 7 3826 7304 Mobile: +61 4 8819 4402 Home

Re: [R] Nonlinear regression

2008-05-20 Thread Spencer Graves
Let's not be so hard on SAS. I thought it was marvelous when I first used it over 30 years ago. Spencer Graves [EMAIL PROTECTED] wrote: ?nls (I always knew SAS *is* a DUD, but never that it has a DUD too...) Bill Venables CSIRO Laboratories PO Box 120, Cleveland, 4163

[R] Displaying horizontal abline levels and controlling object opacity

2008-05-20 Thread Arshavir
Hi, I am plotting time series data, then using abline to draw a horizontal line through the graph (for mean, etc). I would like to be able to display the level at which the abline is drawn on either the left (main) Y axis or a supplemental right Y axis. Additionally, I would like to display

[R] Log likelihood of Gamma distributions

2008-05-20 Thread Edward Wijaya
Dear all, How can I compute the log likelihood of a gamma distributions of a vector. I tried the following. But it doesn't seem to work: samples-c(6.1, 2.2, 14.9, 9.9, 24.6, 13.2) llgm - dgamma(samples, scale=1, shape=2, log = TRUE) It gives [1] -4.291711 -1.411543 -12.198639 -7.607465

Re: [R] Log likelihood of Gamma distributions

2008-05-20 Thread Xiaohui Chen
The scale of log-likelihood depends on the number of your data samples, you should sum over the log-densities from individual points: sum(llgm) Xiaohui Edward Wijaya 写道: Dear all, How can I compute the log likelihood of a gamma distributions of a vector. I tried the following. But it

Re: [R] Log likelihood of Gamma distributions

2008-05-20 Thread Edward Wijaya
Dear Xiaohui, Thanks. The scale of log-likelihood depends on the number of your data samples Can you explain what do you mean by this? For example if I have 10 data points. Should I use scale=10 ? And how about shape parameters. What's the rule to choose its value? Hope to hear from you

Re: [R] Log likelihood of Gamma distributions

2008-05-20 Thread Xiaohui Chen
By the scale of log-likelihood, I did not mean the scale parameter of the gamma density... Generally, as you get more and more data, the log-likelihood will get more and more negative. Hence, what I mean by scale is how negative of the values of loglik. So the 10 values returned from your dgamma

[R] Converting Data Types

2008-05-20 Thread Edward Wijaya
Hi, How can I convert the matrices to list. For example I have this snippet: samples-mymatrix[1,] print(samples) which prints: V1 V2V3V4V5V6 1 103.9 88.5 242.9 206.6 175.7 164.4 How can I convert the object samples such that it prints: [1] 103.9 88.5 242.9 206.6 175.7

Re: [R] Converting Data Types

2008-05-20 Thread Edward Wijaya
Hi Mark, Doesn't seem to work. x - unclass(samples) print (x) It prints this instead $V1 [1] 103.9 $V2 [1] 88.5 $V3 [1] 242.9 $V4 [1] 206.6 $V5 [1] 175.7 $V6 [1] 164.4 attr(,row.names) [1] 1 And it gives the same error for dgamma function. - Edward On Wed, May 21, 2008 at 11:22 AM,

Re: [R] Converting Data Types

2008-05-20 Thread Peter Alspach
Edward Are you sure mymatrix is, in fact, a matrix and note a dataframe (which is a list)? I get: is.matrix(mymatrix) [1] FALSE is.data.frame(mymatrix) [1] TRUE samples - mymatrix[1,] llgm - dgamma(samples, scale=1, shape=2, log = TRUE) Error in dgamma(x, shape, scale, log) : Non-numeric

Re: [R] Converting Data Types

2008-05-20 Thread Edward Wijaya
Hi Peter, Thanks. as.matrix() does the trick. - Edward On Wed, May 21, 2008 at 11:31 AM, Peter Alspach [EMAIL PROTECTED] wrote: Edward Are you sure mymatrix is, in fact, a matrix and note a dataframe (which is a list)? I get: is.matrix(mymatrix) [1] FALSE is.data.frame(mymatrix) [1]

[R] How to use classwt parameter option in RandomForest

2008-05-20 Thread Nagu
Hi, I am trying to model a dataset with the response variable Y, which has 6 levels { Great, Greater, Greatest, Weak, Weaker, Weakest}, and predictor variables X, with continuous and factor variables using random forests in R. The variable Y acts like an ordinal variable, but I recoded it as