[R] problem with CPU usage

2009-10-08 Thread venkata kirankumar
Hi all, I have a problem with CPU usage while running the Rgui.exe problem is while I am running scripts on Rgui its taking 100% of CPU is there any posibility to reduce the cpu consumption are any package I can use to reduce CPU consumption can any one help me out from this problem because whi

Re: [R] Plot nls line on plot?

2009-10-08 Thread Christian Ritz
Hi Doug, you can add the fitted curve using the following general paradigm: ## Plotting the data plot(p~z) ## Defining grid of z values ## (100 values ensures a smooth curve in your case) zValues <- seq(min(z), max(z), length.out = 100) ## Adding predicted values corresponding to the grid val

[R] Determine restricted variable in SVAR and SVEC?

2009-10-08 Thread Arif Chandra
How to determine restricted variable in SVAR and SVEC? There are some values which set to be zero and others set to be NA.. How to determine values that set to be 0? Thanks Regards, Arif _

[R] FW: Determine restricted variable in SVAR and SVEC?

2009-10-08 Thread Arif Chandra
How to determine restricted variable in SVAR and SVEC? There are some values which set to be zero and others set to be NA.. How to determine values that set to be 0? Thanks Regards, Arif _ k

Re: [R] plotting a set of discrete distributions

2009-10-08 Thread Jim Lemon
On 10/09/2009 12:24 AM, Michael Friendly wrote: est a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 13 23 NA NA NA NA NA NA NA NA NA NA NA NA 24 NA 65 NA NA NA NA NA NA NA NA NA NA NA 35 NA NA 102 7 NA NA NA NA NA NA NA NA NA 46 NA NA 4 120 18 NA NA

[R] about function *lapply*

2009-10-08 Thread guangchuang yu
I used *lapply* and *for* to call the function *GetC* respectively. The output is different!!! I can't figured out how this happen! It's so wierd. > x=lapply(ipi.go,GetC, ont = "BP", org=cell.cycle) > unlist(x) *IPI00011654 IPI00013683 "cell cycle" "cell cycle"* > categorate=list() > for (i in 1

Re: [R] R user defined language file for NotePad++

2009-10-08 Thread Andrew Redd
HI there. nice discussion. I'm the developer for NppToR. First NppToR should not make any changes to your workflow in Notepad++. It should be as unobtrusive as possible. In fact I use it with several languages daily with no problems. If is does get in the way I need to know about it, and please

[R] subsetting key on qqmath

2009-10-08 Thread John Field
Dear R list, The code below puts qq-plots for two of three groups on the one plot. However the legend includes all three groups, ie the auto.key ignores the subset instruction. Is there an easy way to get around this, so that only those groups plotted are included in the legend? y1<-rnorm(

Re: [R] Colouring a grid segment

2009-10-08 Thread darrenh65
I have done some more tinkering this morning. It seems it's the first polar plot that has the unusual size. If I add a third plot the last two grids match ok. So I added a further kludge to solve my problem, I added a dummy plot before the two 'real' plots and this works ok: polar.plot(0,0,labels

Re: [R] R user defined language file for NotePad++

2009-10-08 Thread Jason Rupert
Unfortunately, I need the ability to switch between languages within one editor and I like the flexibility and simplicity offered via the NotePad++ to support other key languages within my current workflow. Thus, I am attempting to limit editor switching and build up skills within one editor.

Re: [R] R user defined language file for NotePad++

2009-10-08 Thread Remko Duursma
Jason, if you install NppToR, it generates the XML file for you, I think. That is one way to get it. Or, you could use Npptor as is, it not only gives R syntax highlighting, but can also send commands to the Rgui (simply by pressing F8). I have been using it for quite a while and I really like it

Re: [R] R user defined language file for NotePad++

2009-10-08 Thread Jason Rupert
Thank you very much for the reply, but this doesn't appear to be the XML file to load into NotePad++ to use as a User Defined Language. It appears to be an stand-alone executable that interacts with NotePad++ and the R GUI. I guess I will keep looking for a bit and maybe breakdown and build t

Re: [R] proto and get()

2009-10-08 Thread Gabor Grothendieck
This may be a bug in objects of class "instantiatedProtoMethod". I tried it with the devel version of proto and got no error so you could try that. I will send it to you offline for your try. On Thu, Oct 8, 2009 at 1:02 PM, baptiste auguie wrote: > Dear all, > > In mucking around with ggplot2,

Re: [R] Colouring a grid segment

2009-10-08 Thread darrenh65
Thanks for the reply Jim, I didn't think of that but polar.plot seems to have a couple of quirks. The first is if I try your idea using c(rep(maxlength,40)) as the lengths it does not work, the grid is not even displayed, no error info is given. I solved that by adding an additional point to the v

Re: [R] Plot nls line on plot?

2009-10-08 Thread Peter Ehlers
Douglas M. Hultstrand wrote: Hello, I have a non-linear function (exponential) that I am trying to display the line with the data in a plot, is there a command similar to abline() for the function I created, if not what is the best way to display the fitted line. Example code below. ###

Re: [R] lattice: passing multiple lty values to the key/legend

2009-10-08 Thread Peter Ehlers
Try setting lty with par.settings: xyplot(v3~v2,data=xx, xlab='', # group=v1,type='l', lty=1:3 , groups=v1, type='l', par.settings = list(superpose.line = list(lty = 1:3)), auto.key = list(text=levels(as.factor(xx$v1)) , title='', cex.title=.75,points=F,lines = T,cex=1,

Re: [R] error message - unexpected input

2009-10-08 Thread Duncan Murdoch
Danielle Dandreaux wrote: I have been using R the past couple of years to run models on data we are collecting. I recently got a new computer and updated to a new version of R (2.60 -> 2.90). Since the update, I cannot get my syntax to run. I have tried copying the file it is looking for into man

Re: [R] Bringing dbf Data With SQL

2009-10-08 Thread Gabor Grothendieck
Try this: RSiteSearch('dbf") On Thu, Oct 8, 2009 at 4:17 PM, Michael Yutzi wrote: > > I have a heavy DATA saved in dbf format. > > What I want is to bring that data to R with SQL statements. Like: I want > columns 1, 4, 5 and only when column 4 > 30. > > Sorry asking it here instead of keep sear

[R] glm pairwise interaction coefficients

2009-10-08 Thread Josh Roofchop
I am trying to recreate the analysis of the recent Kirwan et al paper in Ecology [9(80), 2032-2032]. The SAS code is available but am having troubles getting the R equivalents. The SAS code is: *Model 5 - Species-specific interaction coefficients; PROC GLM; where N=150; MODEL YIELD=G1 G2

[R] Is there a book that summarizes different correlation methods?

2009-10-08 Thread Peng Yu
Hi, I know what the following correlation methods ("pearson", "kendall", "spearman") are through wiki. But I'm wondering if there is a good book that discuss why these metrics are defined and when to use one coefficient versus the others. cor.test(x, y, alternative = c("two.sided", "less

Re: [R] row selection

2009-10-08 Thread Khanh Nguyen
The problem is your loop condition. For example, when i reaches (n-3), a[i + 5, ] is out of bounds. -k On Thu, Oct 8, 2009 at 4:14 PM, Ashta wrote: > Hi all, > I have a matrix named x with N by C > I want to select every 5 th rrow from matrix x > I used the following code > n<- nrow(x) > >

Re: [R] histogram

2009-10-08 Thread Khanh Nguyen
I see ! Thank you everyone for the responses. -k On Thu, Oct 8, 2009 at 4:55 PM, David Scott wrote: > Henrique Dallazuanna wrote: > >> Change the breaks argument: >> >> t1 <- hist(1:5, 0:5) >> t1$counts >> >> On Thu, Oct 8, 2009 at 4:47 PM, Khanh Nguyen wrote: >> >>> Hi all, >>> >>> I have

Re: [R] histogram

2009-10-08 Thread David Scott
Henrique Dallazuanna wrote: Change the breaks argument: t1 <- hist(1:5, 0:5) t1$counts On Thu, Oct 8, 2009 at 4:47 PM, Khanh Nguyen wrote: Hi all, I have a question about hist() 1) t1 <- hist(c(1,2,3,4,5)) t1 $breaks [1] 1 2 3 4 5 $counts [1] 2 1 1 1 why is there 2 counts for 1? And sho

Re: [R] "ask=F" option with plot.gam

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 4:40 PM, Marc Carpentier wrote: Hello. I'd like to plot only one component smooth function of a gam model (for example the second) (library mgcv). So, I did : plot(my.gam, select=2, ask=F) But plot.gam doesn't seem to understand the "ask" option, so I can't deactivate th

[R] "ask=F" option with plot.gam

2009-10-08 Thread Marc Carpentier
Hello. I'd like to plot only one component smooth function of a gam model (for example the second) (library mgcv). So, I did : plot(my.gam, select=2, ask=F) But plot.gam doesn't seem to understand the "ask" option, so I can't deactivate the interactive plotting. I tried and failed by forcing it t

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread Bert Gunter
Bill: Defensive programming seems to me to be a wise policy, so thanks for the helpful tip. -- Bert Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: Thursday, October 08, 2009 12:01 PM To: Bert Gunter; Erik Ive

Re: [R] row selection

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 4:18 PM, David Winsemius wrote: On Oct 8, 2009, at 4:14 PM, Ashta wrote: Hi all, I have a matrix named x with N by C I want to select every 5 th rrow from matrix x I used the following code n<- nrow(x) for(i in 1: n){ + b <- a[i+5,] b } Error: subscript out of bounds

[R] odfWeave & XML error in post-processing

2009-10-08 Thread Rob James
I've been happily building a file with odfWeave, and just as the hour draws nigh for it to be sent off, odfWeave or XML throws the following catastrophic error: ...this is the tail of entirely uneventful processing of input file. 31 : term xml(label=LR_Fall_Model_Results) 32 : term verb

Re: [R] row selection

2009-10-08 Thread Nutter, Benjamin
> x[seq(1, nrow(x), by=5), ] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Thursday, October 08, 2009 4:19 PM To: Ashta Cc: R help Subject: Re: [R] row selection On Oct 8, 2009, at 4:14 PM, Ashta wrote: >

[R] Problems With RODBC, sqlQuery

2009-10-08 Thread JoK LoQ
Hello, Im trying to get a Oracle database to R, but I'm having problems with most of SQL sintax. Suppose that Im trying to bring a table "TABLE" with columns "COL1","COL2",.. from schema "SCHEMA". What am I doing wrong? library(RODBC) channel<-odbcConnect("xxx",uid="xxx",pwd="xxx") sqlQuery(

[R] Bringing dbf Data With SQL

2009-10-08 Thread Michael Yutzi
I have a heavy DATA saved in dbf format. What I want is to bring that data to R with SQL statements. Like: I want columns 1, 4, 5 and only when column 4 > 30. Sorry asking it here instead of keep searching in manuals, but it seems that there are too many ways of doing it. So what's the appropri

Re: [R] Adapt function

2009-10-08 Thread Ben Bolker
Doran, Harold wrote: > > I am trying to use the adapt function in the package adapt. To make sure > I am using it correctly, I am trying a toy example that should yield a > result of 2/3. > > Suppose the function is f(x,y) = x*y^2 and I want to integrate over f as > > Int_0^1 Int_0^2 x*y^2 dx

Re: [R] row selection

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 4:14 PM, Ashta wrote: Hi all, I have a matrix named x with N by C I want to select every 5 th rrow from matrix x I used the following code n<- nrow(x) for(i in 1: n){ + b <- a[i+5,] b } Error: subscript out of bounds What did you expect when "i" in your loop counter b

Re: [R] error message - unexpected input

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 3:28 PM, Danielle Dandreaux wrote: I have been using R the past couple of years to run models on data we are collecting. I recently got a new computer and updated to a new version of R (2.60 -> 2.90). Since the update, I cannot get my syntax to run. I have tried copying the

[R] row selection

2009-10-08 Thread Ashta
Hi all, I have a matrix named x with N by C I want to select every 5 th rrow from matrix x I used the following code n<- nrow(x) > for(i in 1: n){ + b <- a[i+5,] >b } Error: subscript out of bounds Can any body point out the problem? [[alternative HTML version deleted]] __

Re: [R] histogram

2009-10-08 Thread Ista Zahn
Or the right argument: t1 <- hist(1:5, right=false) t1[1:2] $breaks [1] 1 2 3 4 5 $counts [1] 1 1 1 2 The issue has to do with what hist() does with the points that fall right on the break points. -Ista On Thu, Oct 8, 2009 at 3:58 PM, Henrique Dallazuanna wrote: > Change the breaks argument:

Re: [R] histogram

2009-10-08 Thread Rolf Turner
On 9/10/2009, at 8:47 AM, Khanh Nguyen wrote: Hi all, I have a question about hist() 1) t1 <- hist(c(1,2,3,4,5)) t1 $breaks [1] 1 2 3 4 5 $counts [1] 2 1 1 1 why is there 2 counts for 1? RTFM --- include.lowest = TRUE and right = TRUE by default. And should the counts be '1 1

Re: [R] histogram

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 3:47 PM, Khanh Nguyen wrote: Hi all, I have a question about hist() 1) t1 <- hist(c(1,2,3,4,5)) t1 $breaks [1] 1 2 3 4 5 $counts [1] 2 1 1 1 why is there 2 counts for 1? And should the counts be '1 1 1 1 1' ? It depends on the way the bins are defined. Had you forced

Re: [R] Plot nls line on plot?

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 3:39 PM, Douglas M. Hultstrand wrote: Hello, I have a non-linear function (exponential) that I am trying to display the line with the data in a plot, is there a command similar to abline() for the function I created, if not what is the best way to display the fitted li

Re: [R] histogram

2009-10-08 Thread Henrique Dallazuanna
Change the breaks argument: t1 <- hist(1:5, 0:5) t1$counts On Thu, Oct 8, 2009 at 4:47 PM, Khanh Nguyen wrote: > Hi all, > > I have a question about hist() > > 1) >> t1 <- hist(c(1,2,3,4,5)) >> t1 > $breaks > [1] 1 2 3 4 5 > > $counts > [1] 2 1 1 1 > > why is there 2 counts for 1? And should the

Re: [R] problem understanding factor levels for use lattice panel order

2009-10-08 Thread Rolf Turner
On 9/10/2009, at 6:52 AM, Folkes, Michael wrote: Hello all, In order to get the desired order of panels within lattice I realized I needed to define my factor levels. I now see how to properly do it (attached code), but: 1. I don't understand why I have to use factor() on a variable that i

Re: [R] histogram

2009-10-08 Thread Erik Iverson
For simply counting frequency of discrete data, table , xtabs, and ftable will work. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Khanh Nguyen > Sent: Thursday, October 08, 2009 2:47 PM > To: r-help@r-project.org > Subjec

[R] histogram

2009-10-08 Thread Khanh Nguyen
Hi all, I have a question about hist() 1) > t1 <- hist(c(1,2,3,4,5)) > t1 $breaks [1] 1 2 3 4 5 $counts [1] 2 1 1 1 why is there 2 counts for 1? And should the counts be '1 1 1 1 1' ? Is there any other function to count frequency of discrete data? Thanks. -k [[alternative HTML vers

[R] Plot nls line on plot?

2009-10-08 Thread Douglas M. Hultstrand
Hello, I have a non-linear function (exponential) that I am trying to display the line with the data in a plot, is there a command similar to abline() for the function I created, if not what is the best way to display the fitted line. Example code below. ### Example z <- c(1,10,15,20,25,30,

[R] error message - unexpected input

2009-10-08 Thread Danielle Dandreaux
I have been using R the past couple of years to run models on data we are collecting. I recently got a new computer and updated to a new version of R (2.60 -> 2.90). Since the update, I cannot get my syntax to run. I have tried copying the file it is looking for into many different directories to t

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of William Dunlap > Sent: Thursday, October 08, 2009 12:01 PM > To: Bert Gunter; Erik Iverson; Kajan Saied; r-help@r-project.org > Subject: Re: [R] sort (all columns of) a matrix ..

[R] run WinBUGS under R, and kept getting the error message

2009-10-08 Thread LinZhongjun
Dear R help lists, Hello! I ran WinBUGS under R using the function bugs, but I kept getting the following error message. Error in FUN(X[[3L]], ...) : .C(..): 'type' must be "real" for this format I can not find the reason. I am freaking out. Could any one have a look at the model codes

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Bert Gunter > Sent: Thursday, October 08, 2009 11:41 AM > To: 'Erik Iverson'; 'Kajan Saied'; r-help@r-project.org > Subject: Re: [R] sort (all columns of) a matrix > > Right. My

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread Bert Gunter
Right. My guess is that Kajan wants: a[do.call(order,data.frame(a)),] ## this generalizes to an arbitrary number of columns ## do.call() is a very powerful and useful R feature worth learning about Yet another reason why the posting guide asks for a simple, proper, reproducible example. -- Be

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread Daniel Malter
I assume you want to sort the whole dataset (matrix) by ordering one column in ascending order (and order all other columns appropriately). a<-matrix(a<-c(1,3,4,6,6,4,6,56,4,64,86,39,4,2),length(a),2) a #sort by first column a[order(a[,1]),] #sort by second column a[order(a[,2]),] #both give t

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread Henrique Dallazuanna
Try this: a[order(a[,1], a[,2]),] On Thu, Oct 8, 2009 at 1:50 PM, Kajan Saied wrote: > Dear R-Help Team, > > I have been trying to sort (all columns of) a matrix: > >> a<-matrix(a<-c(1,3,4,6,6,4,6,56,4,64,86,39,4,2),length(a),2) >> a >      [,1] [,2] >  [1,]    1    1 >  [2,]    3    3 >  [3,]  

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread Erik Iverson
You need to define "sorted" in the context of a matrix. By each row individually, by each column individually, or by column using the whole matrix, or by row using the whole matrix? > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Beh

Re: [R] sort (all columns of) a matrix

2009-10-08 Thread Don McKenzie
Untested, but a.sorted <- apply(a,sort,2) ? Kajan Saied wrote: Dear R-Help Team, I have been trying to sort (all columns of) a matrix: a<-matrix(a<-c(1,3,4,6,6,4,6,56,4,64,86,39,4,2),length(a),2) a [,1] [,2] [1,]11 [2,]33 [3,]44 [4,]66 [5,]6

Re: [R] Adapt function

2009-10-08 Thread Ravi Varadhan
Harold, Try this: ff <- function(x) x[1]*x[2]^2 adapt(2, lo = c(0,0), up = c(1,2), fun = ff) The answer should be 4/3, since the first variable is integrated from 0 to 1 and the second variable (second-degree) is integrated from 0 to 2. The answer is 1/3, if you do, adapt(2, lo = c(0,0), u

[R] sort (all columns of) a matrix

2009-10-08 Thread Kajan Saied
Dear R-Help Team, I have been trying to sort (all columns of) a matrix: > a<-matrix(a<-c(1,3,4,6,6,4,6,56,4,64,86,39,4,2),length(a),2) > a [,1] [,2] [1,]11 [2,]33 [3,]44 [4,]66 [5,]66 [6,]44 [7,]66 [8,] 56 56 [9,]4

Re: [R] modifications of out-of-the-function variable

2009-10-08 Thread Ben Bolker
devol wrote: > > Dear all, > > could you please advice whether it is possible somehow to modify an > external (from the point of some function view) variable by some > function-internal operators. For example > >> var=1 >> foo<-function(var){var=var+1} >> foo(var) >> var > [1] 1 > > but th

Re: [R] Need a vectorized way to avoid two nested FOR loops

2009-10-08 Thread Dimitris Rizopoulos
Bert Gunter wrote: If I understand your intent, I believe you can get what you want much faster (no interpreted loops and linear times) by looking at this slightly differently. First of all, the choice of columns is unimportant, as indexing can be used to create a data frame containing only the

Re: [R] foreach loop - rejection method

2009-10-08 Thread Steve Weston
Hi Ben, It looks like you're getting into trouble because you've converted the body of a for-loop into a function. You don't need to do that with foreach, and some of your problems will be solved by reverting to something more like your original for-loop, I suspect. However, it also looks like yo

[R] problem understanding factor levels for use lattice panel order

2009-10-08 Thread Folkes, Michael
Hello all, In order to get the desired order of panels within lattice I realized I needed to define my factor levels. I now see how to properly do it (attached code), but: 1. I don't understand why I have to use factor() on a variable that is already a factor, and why levels() alone doesn't work

[R] lattice: passing multiple lty values to the key/legend

2009-10-08 Thread Folkes, Michael
hi all, It's not clear to me how (or if) I can pass multiple values for lty to a key in xyplot? I've tried: lines=list(lty=1:3), to no avail. Do I need to use something other than auto.key? (Deepayan, if you're out there, I have your book and must admit the answer isn't jumping out at me.) thank

Re: [R] external variable by inside-function routines modifications

2009-10-08 Thread Alex Bird
Thanks all of you for your help!!! 2009/10/8 Bert Gunter : > I am uncertain what you mean. Possibly... > > x <- 1 >> f <- function()x<<-2 >> f() >> x > [1] 2 > > HOWEVER, this is very dangerous and most unwise as it depends on scoping > rules and where f is called to determine exactly which "x" is

Re: [R] Need a vectorized way to avoid two nested FOR loops

2009-10-08 Thread Rama Ramakrishnan
Bert, Jim, Dimitris and Joris, Thank you all very much for your prompt help and suggestions. After trying the ideas out, I have decided to go with Bert's approach since it is by far the fastest of the lot. Thanks again! Rama Ramakrishnan On Oct 8, 2009, at 12:49 PM, Bert Gunter wrote:

Re: [R] external variable by inside-function routines modifications

2009-10-08 Thread Bert Gunter
I am uncertain what you mean. Possibly... x <- 1 > f <- function()x<<-2 > f() > x [1] 2 HOWEVER, this is very dangerous and most unwise as it depends on scoping rules and where f is called to determine exactly which "x" is being assigned the value of 2. So I think you would do well to reconsider

Re: [R] external variable by inside-function routines modifications

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 1:14 PM, devol wrote: Dear all, could you please advice whether it is possible somehow to modify an external (from the point of some function view) variable by some function-internal operators. For example var=1 foo<-function(var){var=var+1} foo(var) var [1] 1 Use fun

Re: [R] How to start R in mac with the current directory as the current working directory?

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 1:14 PM, Peng Yu wrote: On Thu, Oct 8, 2009 at 10:57 AM, Steve Lianoglou wrote: Hi Peng, On Oct 8, 2009, at 11:21 AM, Peng Yu wrote: Hi, I installed R on mac (see below). When I start it from a terminal by the following command, the current working directory is always '

Re: [R] Parameters of Beta distribution

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 1:13 PM, Albyn Jones wrote: Quoting David Winsemius : In insurance situation there is typically a cap on the covered losses and there is also typically an amount below which it would not make sense to offer a policy. So a minimum and a maximum are sensible assumptions

Re: [R] external variable by inside-function routines modifications

2009-10-08 Thread baptiste auguie
Hi, with assign, foo <- function(var){ assign("var", var+1, envir = .GlobalEnv) } var =1 foo(2) var # [1] 3 HTH, baptiste 2009/10/8 devol : > > Dear all, > >  could you please advice whether it is possible somehow to modify an > external (from the point of some function view) variable by

Re: [R] external variable by inside-function routines modifications

2009-10-08 Thread Alex Bird
Is it possible to do what you mentioned somehow outside of the function. I mean that there's some function and the only thing I can do is to point on the variable to be modified inside the function without any possibilities to modify the very function. 2009/10/8 Henrique Dallazuanna : > See assign

Re: [R] external variable by inside-function routines modifications

2009-10-08 Thread Henrique Dallazuanna
See assign, you can use '<<-' assignment: foo <- function(var) var <<- var + 1 On Thu, Oct 8, 2009 at 2:14 PM, devol wrote: > > Dear all, > >  could you please advice whether it is possible somehow to modify an > external (from the point of some function view) variable by some > function-interna

Re: [R] proto and get()

2009-10-08 Thread baptiste auguie
... without answering my previous question, I have just found a fortune-hate workaround, getIcon <- function(geom){ st <- paste("Geom", firstUpper(geom),"$icon", sep="") eval(parse(text=st)) } getIcon("abline") I'm still curious about the get() behaviour though. Best, baptiste __

Re: [R] How to start R in mac with the current directory as the current working directory?

2009-10-08 Thread Peng Yu
On Thu, Oct 8, 2009 at 10:57 AM, Steve Lianoglou wrote: > Hi Peng, > > On Oct 8, 2009, at 11:21 AM, Peng Yu wrote: > >> Hi, >> >> I installed R on mac (see below). When I start it from a terminal by >> the following command, the current working directory is always '~' no >> matter where my current

[R] external variable by inside-function routines modifications

2009-10-08 Thread devol
Dear all, could you please advice whether it is possible somehow to modify an external (from the point of some function view) variable by some function-internal operators. For example > var=1 > foo<-function(var){var=var+1} > foo(var) > var [1] 1 but the goal is to get the var equal to 2 in t

[R] Adapt function

2009-10-08 Thread Doran, Harold
I am trying to use the adapt function in the package adapt. To make sure I am using it correctly, I am trying a toy example that should yield a result of 2/3. Suppose the function is f(x,y) = x*y^2 and I want to integrate over f as Int_0^1 Int_0^2 x*y^2 dxdy Where the limits of integration for y

Re: [R] Parameters of Beta distribution

2009-10-08 Thread Albyn Jones
Quoting David Winsemius : In insurance situation there is typically a cap on the covered losses and there is also typically an amount below which it would not make sense to offer a policy. So a minimum and a maximum are sensible assumptions about loss distributions in may real modeling s

[R] proto and get()

2009-10-08 Thread baptiste auguie
Dear all, In mucking around with ggplot2, I've hit the following snag, library(ggplot2) # this returns a grob, OK GeomAbline$icon() # lines[GRID.lines.9] # this returns the function icon, OK GeomAbline$icon # proto method (instantiated with ): function (.) # linesGrob(c(0, 1), c(0.2, 0.8)) #

Re: [R] Parameters of Beta distribution

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 12:53 PM, Albyn Jones wrote: Maithili I find it really hard to believe that a beta distribution would be a reasonable probability model for loss data. There would have to be an upper bound on the size of losses. What is the process that generates the data. Is there

Re: [R] 64-bit R on mac

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 11:59 AM, Peng Yu wrote: Hi, My Mac OS is Leopard. I downloaded R-GUI-5496-2.9-leopard-Leopard64.dmg from http://r.research.att.com/. I run R from the image disk, but it always "quit unexpectedly". It is hard to say. If you were really trying to run R from the image, the

Re: [R] Parameters of Beta distribution

2009-10-08 Thread Albyn Jones
Maithili I find it really hard to believe that a beta distribution would be a reasonable probability model for loss data. There would have to be an upper bound on the size of losses. What is the process that generates the data. Is there any natural upper bound? Why is there a lower b

Re: [R] Need a vectorized way to avoid two nested FOR loops

2009-10-08 Thread Bert Gunter
If I understand your intent, I believe you can get what you want much faster (no interpreted loops and linear times) by looking at this slightly differently. First of all, the choice of columns is unimportant, as indexing can be used to create a data frame containing only the columns of interest.

[R] Multiple plots of multiple plots

2009-10-08 Thread showa
I'd like to generate on a single device multiple plots, each of which contains two plots. Essentially, I've got sub-plots which consist of two tracks, the upper one displaying gene expression data, and the lower one showing gene position along the chromosome. I'd like to display four of these sub-

Re: [R] Evaluating/comparing dynamic linear model

2009-10-08 Thread Erb Philipp (erbp)
Apologies for my overhasty and thus inaccurate reply. I of course assumed that model2 is a submodel of model1. But thanks to Giovanni: a closer look at your equations shows that this is only the case if at == bt (and of course same innovations/ disturbances et, etat) and xt e.g. something like x

Re: [R] how to convert list into a vector

2009-10-08 Thread delnatan
Ok, nevermind. all I had to do was unlist(myList). delnatan wrote: > > Hi , > > I want to convert a my list: > >> myList > [[1]] > [1] 1 2 3 4 5 > [[2]] > [1] 6 7 8 > [[3]] > [1] 9 10 11 > > into something like c(1,2,3,4,5,6,7,8,9,10,11) > > I realized that this is possible by > >> c(d

Re: [R] how to convert list into a vector

2009-10-08 Thread Henrique Dallazuanna
If you want do.call, you can use c indeed of cbind: do.call(c, list(1:5, 6:8, 9:11)) On Thu, Oct 8, 2009 at 12:13 PM, delnatan wrote: > > Hi , > > I want to convert a my list: > >> myList > [[1]] > [1] 1 2 3 4 5 > [[2]] > [1] 6 7 8 > [[3]] > [1] 9 10 11 > > into something like c(1,2,3,4,5,6,7,8,

Re: [R] 64-bit R on mac

2009-10-08 Thread Steve Lianoglou
On Oct 8, 2009, at 12:23 PM, Steve Lianoglou wrote: You probably need to install a 64bit version of R. The one distributed "normally" through CRAN isn't 32bit. I mean to say that the one distributed through cran isn't *64 bit*, sorry. -steve -- Steve Lianoglou Graduate Student: Computat

Re: [R] unordered multinomial logistic regression (or logit model) with repeated measures (I think)

2009-10-08 Thread Dieter Menne
drlucyasher wrote: > > I am attempted to examine the temporal independence of my data set and > think I need an unordered multinomial logistic regression (or logit model) > with repeated measures to do so. > > What I have thought of so far is > > glm(Location~ Pen| Bird*AMPM*Time, family=mu

Re: [R] 64-bit R on mac

2009-10-08 Thread Steve Lianoglou
Hi, On Oct 8, 2009, at 11:59 AM, Peng Yu wrote: Hi, My Mac OS is Leopard. I downloaded R-GUI-5496-2.9-leopard-Leopard64.dmg from http://r.research.att.com/. I run R from the image disk, but it always "quit unexpectedly". What could cause the problem? Is it because that I have a 32 bit R insta

[R] 64-bit R on mac

2009-10-08 Thread Peng Yu
Hi, My Mac OS is Leopard. I downloaded R-GUI-5496-2.9-leopard-Leopard64.dmg from http://r.research.att.com/. I run R from the image disk, but it always "quit unexpectedly". What could cause the problem? Is it because that I have a 32 bit R installed already installed in the same machine. Regards

Re: [R] How to start R in mac with the current directory as the current working directory?

2009-10-08 Thread Steve Lianoglou
Hi Peng, On Oct 8, 2009, at 11:21 AM, Peng Yu wrote: Hi, I installed R on mac (see below). When I start it from a terminal by the following command, the current working directory is always '~' no matter where my current directory is in the terminal. I'm wondering if there is a way to make the

[R] New Special Interest Group: R-SIG-DYNAMIC-MODELS

2009-10-08 Thread Thomas Petzoldt
Dear useRs and developeRs, In the last few months we have had an increasing number of requests about deSolve and dynamic modelling. We have also received several requests to establish a SIG of our own about such things. We think this is a good idea -- here it is! ---

Re: [R] how to convert list into a vector

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 11:13 AM, delnatan wrote: Hi , I want to convert a my list: myList [[1]] [1] 1 2 3 4 5 [[2]] [1] 6 7 8 [[3]] [1] 9 10 11 into something like c(1,2,3,4,5,6,7,8,9,10,11) ?unlist I realized that this is possible by c(do.call("cbind",myList)) But only when list[[1]

[R] how to convert list into a vector

2009-10-08 Thread delnatan
Hi , I want to convert a my list: > myList [[1]] [1] 1 2 3 4 5 [[2]] [1] 6 7 8 [[3]] [1] 9 10 11 into something like c(1,2,3,4,5,6,7,8,9,10,11) I realized that this is possible by > c(do.call("cbind",myList)) But only when list[[1]] through list[[3] have equal length of vectors within them

[R] unordered multinomial logistic regression (or logit model) with repeated measures (I think)

2009-10-08 Thread drlucyasher
I am attempted to examine the temporal independence of my data set and think I need an unordered multinomial logistic regression (or logit model) with repeated measures to do so. The data in question is location of chickens. Chickens could be in any one of 5 locations when a snapshot sample was ta

Re: [R] plotting a set of discrete distributions

2009-10-08 Thread Michael Friendly
Gabor Grothendieck wrote: Try this (possibly after scaling the rows or columns to 1): library(gplots) with(as.data.frame.table(as.matrix(jevons[-1])), balloonplot(Var1, Var2, Freq)) Thanks, Gabor -- That's not bad as a first cut; I can work with that. -- Michael Friendly Email: frien

[R] Question on NLTM package

2009-10-08 Thread Abderrahim Oulhaj
Dear all, I didn't get any suggestion for my querry concerning the NLTM package so I am re-posting it hoping that someone can give me any clue. I apologize for doing so. Please find attached a copy of my previous email: Dear R users, I have a question concerning the nltm package. Before postin

[R] How to use multiple time series in R?

2009-10-08 Thread FMH
Dear All, I have temperature series for 10 different sea levels, where there are 3000 observations for each level. I am planning to use multiple time series modelling on these series, with/ without correlation structure for the residuals. Is there any package that can be used to do this operat

[R] How to start R in mac with the current directory as the current working directory?

2009-10-08 Thread Peng Yu
Hi, I installed R on mac (see below). When I start it from a terminal by the following command, the current working directory is always '~' no matter where my current directory is in the terminal. I'm wondering if there is a way to make the gui R on mac inherent the current directory from the term

Re: [R] intersection of 2 density curves

2009-10-08 Thread Monica Pisica
<57d3c6e9-402b-4991-a53b-71e25af78...@comcast.net> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 No worries there =3B-)) But thanks for the reminder all the same! =20 Monica > CC: pisican...

Re: [R] distributed computing

2009-10-08 Thread Steve Lianoglou
Hi, On Oct 8, 2009, at 11:06 AM, wesley mathew wrote: Dear All, I am a researcher, working at the Department of Software Engineering at University of Minho, Portugal. I am working on in the area of Distributed data mining and attempting to develop distributed data mining system in „R‰ En

Re: [R] intersection of 2 density curves

2009-10-08 Thread David Winsemius
It should also be remembered that there will often be multiple intersections of such density estimates. I hope this is not being done in support of a data-driven discretization of two group comparisons. Such practices are to be eschewed (as they are even worse than obfuscation). -- David

[R] distributed computing

2009-10-08 Thread wesley mathew
Dear All, I am a researcher, working at the Department of Software Engineering at University of Minho, Portugal. I am working on in the area of Distributed data mining and attempting to develop distributed data mining system in “R” Environment. I have an enquiry. Suppose I have 3 different nodes (m

  1   2   >