[R] Two selections from Bag A

2012-08-26 Thread darnold
All, I am looking at an example in Aliaga's Interactive Statistics. Bag A has the following vouchers. BagA - c(-1000,10,10,10,10,10,10, 10,20,20,20,20,20,20,30, 30,40,40,50,60) Bag B has the following vouchers. BagB - c(10,20,30,30,40,40,50,50,

Re: [R] Comparing two variables for match and creating a new vector with results

2012-08-26 Thread David Winsemius
On Aug 25, 2012, at 7:12 PM, inti luna wrote: Hello, I need help comparing two variables and producing a third variable with the result.I have this data: id -c(1,2,3,4,5,6,7,8,9,10) vi -c(1,0,1,1,1,1,1,2,2,0) vi2 -c(0,1,1,1,1,1,1,2,0,0) data-cbind(id,vi,vi2) For the data in the example,

Re: [R] kernlab | ksvm error

2012-08-26 Thread Uwe Ligges
On 25.08.2012 02:12, Reza Salimi-Khorshidi wrote: Dear Uwe, I appreciate that if you let me know why, when using the attached file, the following script (two lines) doesn't work once in 10s of times. Best, Reza svm.pol4- ksvm(class.labs~ ., data= train.data, prob.model= T, scale= T, kernel=

Re: [R] Two selections from Bag A

2012-08-26 Thread David Winsemius
On Aug 25, 2012, at 5:37 PM, darnold wrote: All, I am looking at an example in Aliaga's Interactive Statistics. Bag A has the following vouchers. BagA - c(-1000,10,10,10,10,10,10, 10,20,20,20,20,20,20,30, 30,40,40,50,60) Bag B has the following vouchers. BagB -

[R] to clear combobox value....

2012-08-26 Thread punitha
As i m using tcltk package for GUI designing ttkcombobox command helped me in creating combobox... but, i need to create an application where after i click on *clear all* button the values in combobox should be cleared, but i am not knowing what should be written in the command function of a

[R] link for refernces

2012-08-26 Thread punitha
Please can anyone suggest me some links which have complicated examples with code of *GUI in R(tcltk package),* as i am feeling difficult in arranging the frames in toplevel window, adding images to frames etc. please can i know the websites which have general syntax of the components, as

Re: [R] How to arrange the GUI's in window in tcltk package???

2012-08-26 Thread punitha
Thank you jverzaniNWBKZ :) -- View this message in context: http://r.789695.n4.nabble.com/How-to-arrange-the-GUI-s-in-window-in-tcltk-package-tp4641279p4641332.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Multiple lattice levelplots from matrices

2012-08-26 Thread Jens Peter Andersen / Region Nordjylland
Dear R-users, My goal is to construct a levelplot (from the lattice package) with 4 or more individual plots sharing the same colorkey. While this appears to be relatively simple using functions, I haven't been able to find a solution using data matrices. An example of a working levelplot with

Re: [R] ttkcombobox

2012-08-26 Thread punitha
Thanks Greg, your answer helped me also, but i was searching for tkbind document so that it may help me in knowing the syntax of tkbind or how it can be used but i cud'nt find it, so please can you give me any links which has such documents??? -- View this message in context:

Re: [R] extract vector elements of unknown range [SOLVED]

2012-08-26 Thread Sepp Tannhuber
Thank you all for your answers! Enjoy the rest of the weekend Joseph __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] kernlab | ksvm error

2012-08-26 Thread Reza Salimi-Khorshidi
Thanks Uwe, Am I right that in ksvm's internal cross-validation, there is no guarantee for having *at least one* of each classes in each subset? Some randomness is involved, and when you get an unfortunate subsample (e.g. if in the internal cross-validation one class is not selected at all) it

Re: [R] Multiple lattice levelplots from matrices

2012-08-26 Thread ilai
You want array not list, as in levelplot(array(rnorm(400,rep(1:4,each=100)),c(10,10,4))) abind::abind is useful sometimes for binding preexisting matrices to arrays. Cheers On Sun, Aug 26, 2012 at 5:57 AM, Jens Peter Andersen / Region Nordjylland je...@rn.dk wrote: Dear R-users, My goal

Re: [R] to clear combobox value....

2012-08-26 Thread Hasan Diwan
Punitha, On 26 August 2012 02:43, punitha punitha@wipro.com wrote: but i am not knowing what should be written in the command function of a button, so that the selected value of combobox should be cleared or come back to its default value http://www.tkdocs.com/tutorial/widgets.html

Re: [R] Drawing a simplex

2012-08-26 Thread David Winsemius
On Aug 25, 2012, at 9:00 PM, Chel Hee Lee wrote: I will very appreciate if anyone can provide some materials to draw a simplex plot of a Dirichlet distribution in R as shown in the page at http://en.wikipedia.org/wiki/File:Dirichlet_distributions.png . Go to: http://www.rseek.org search

Re: [R] R2OpenBUGS quesion

2012-08-26 Thread felix
I haven't seen any further discussion to this issue beyond Uwe's response below, so I think I have something to add: I'm having this same issue using the standard R2OpenBUGS schools example (below). I find that I get the 'nrow' error when I use OpenBUGS 3.2.2, but when I use OpenBUGS version

Re: [R] SparseM buglet

2012-08-26 Thread David Meyer
Thanks to all for routing this to me - fixed upstream. David Original Message Subject: forwarded message from Roger Koenker Date: Sat, 25 Aug 2012 17:12:04 +0200 From: Kurt Hornik kurt.hor...@wu.ac.at Reply-To: kurt.hor...@wu.ac.at To: David Meyer david.me...@wu.ac.at

Re: [R] Two selections from Bag A

2012-08-26 Thread darnold
Here are the two tables from Aligaga. The first is table 1.1 and the second is table 1.2. http://r.789695.n4.nabble.com/file/n4641344/table1_1.jpg http://r.789695.n4.nabble.com/file/n4641344/table1_2.jpg David Arnold College of the Redwoods -- View this message in context:

Re: [R] Two selections from Bag A

2012-08-26 Thread David Winsemius
On Aug 26, 2012, at 8:28 AM, darnold wrote: Here are the two tables from Aligaga. The first is table 1.1 and the second is table 1.2. http://r.789695.n4.nabble.com/file/n4641344/table1_1.jpg My code from earlier today (that you have not included) showed you how to tabulate and construct

[R] error type

2012-08-26 Thread aprendiz programa
Hi, I am trying plot a grafic but generates an error: Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE, : argumento formal type corresponde a mĂșltiplos argumentos especificados DATA: 44 40 39 38 0 7 7 1030 57 37 5146 40 41 4737 34 36 2636 28 33 3738 26 28 2742 38 36

Re: [R] error type

2012-08-26 Thread David L Carlson
Look at your plot command. You included type=o twice. -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-

Re: [R] Aligning barplot

2012-08-26 Thread David Winsemius
darnold wrote All, Consider: BagA - c(-1000,10,10,10,10,10,10, 10,20,20,20,20,20,20,30, 30,40,40,50,60) BagB - c(10,20,30,30,40,40,50,50, 50,50,50,50,60,60,60,60, 60,60,60,1000) layout(c(2,1)) barplot(table(BagB)) barplot(table(BagA))

Re: [R] Aligning barplot

2012-08-26 Thread darnold
Hmmm This worked this time. And I didn't use the transform t. BagA - c(-1000,10,10,10,10,10,10, 10,20,20,20,20,20,20,30, 30,40,40,50,60) BagB - c(10,20,30,30,40,40,50,50, 50,50,50,50,60,60,60,60, 60,60,60,1000) tblA - table(BagA) tblA - c(tblA,0)

Re: [R] error type

2012-08-26 Thread aprendiz programa
but represents another line of script From: dcarl...@tamu.edu To: aprendizprog...@hotmail.com; r-help@r-project.org Subject: RE: [R] error type Date: Sun, 26 Aug 2012 16:12:50 -0500 Look at your plot command. You included type=o twice. --

Re: [R] error type

2012-08-26 Thread David Winsemius
On Aug 26, 2012, at 2:16 PM, aprendiz programa wrote: but represents another line of script If you post in HTML which fails to properly represent your code you should not be expecting us to deparse it correctly in our heads. plot(dados[1],type=o,pch=21, axes=FALSE,xlab=year,ylab=cases)

Re: [R] Aligning barplot

2012-08-26 Thread David Winsemius
On Aug 26, 2012, at 1:52 PM, darnold wrote: Hmmm This worked this time. And I didn't use the transform t. Yeah. There is something pathological that happens when you do this: tblA - table(BagA) tblA[8] - 0 tmp -c(tmp,0) is.vector(tmp) [1] TRUE But if you instead use tmp[8] - 0

Re: [R] error type

2012-08-26 Thread aprendiz programa
From: aprendizprog...@hotmail.com To: r-help@r-project.org Date: Mon, 27 Aug 2012 00:01:52 +0300 Subject: [R] error type Hi, I am trying plot a grafic but generates an error: Erro em plot.default(xlim, ylim, type = n, ann = FALSE, axes = FALSE, : argumento formal type corresponde a

Re: [R] Aligning barplot

2012-08-26 Thread darnold
I was able to do this, but kinda painful: BagA - c(-1000,10,10,10,10,10,10, 10,20,20,20,20,20,20,30, 30,40,40,50,60) BagB - c(10,20,30,30,40,40,50,50, 50,50,50,50,60,60,60,60, 60,60,60,1000) tblA - table(BagA) tblAnames - names(tblA) tblA -

Re: [R] help with a special variant of balloonplot

2012-08-26 Thread ravi
Hi Peter and r-list members, Thanks a lot for your help. Your solution with the myballoonplot has solved two issues : the original numbers are retained in the table and the colour locations are right. But I have one more requirement - that the sizes should be proportional to the magnitude of

Re: [R] error type

2012-08-26 Thread Jeff Newmiller
As the footer says... PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Some issues with your email are: a) You posted in HTML, which in spite of appearances does NOT appear on our screens the same

Re: [R] error type

2012-08-26 Thread David L Carlson
You are still using html - you need to tell hotmail to use plain text only. I can't replicate your error with the following: dados - c(44, 40, 39, 38, 0, 7, 7, 1030, 57, 37, 5146, 40, 41, 4737, 34, 36, 2636, 28, 33, 3738, 26, 28, 2742, 38, 36, 3636, 27, 22, 2853, 43, 33, 40)

Re: [R] {Spam?} Re: help with a special variant of balloonplot

2012-08-26 Thread Peter Ehlers
On 2012-08-26 15:00, ravi wrote: Hi Peter and r-list members, Thanks a lot for your help. Your solution with the myballoonplot has solved two issues : the original numbers are retained in the table and the colour locations are right. But I have one more requirement - that the sizes should be

Re: [R] Aligning barplot

2012-08-26 Thread David L Carlson
How about this? grps - unique(c(BagA, BagB)) BagA - factor(BagA, levels=grps) BagB - factor(BagB, levels=grps) layout(c(2,1)) barplot(table(BagB)) barplot(table(BagA)) -- David L Carlson Associate Professor of Anthropology Texas AM University

[R] Aligning barplot

2012-08-26 Thread darnold
All, Consider: BagA - c(-1000,10,10,10,10,10,10, 10,20,20,20,20,20,20,30, 30,40,40,50,60) BagB - c(10,20,30,30,40,40,50,50, 50,50,50,50,60,60,60,60, 60,60,60,1000) layout(c(2,1)) barplot(table(BagB)) barplot(table(BagA)) At this point, I'd like to

[R] for loop optimization help

2012-08-26 Thread Jinsong Zhao
Hi there, In my code, there is a for loop like the following: pmatrix - matrix(NA, nrow = 99, ncol = 1) qmatrix - matrix(NA, nrow = 99, ncol = 3) paf - seq(0.01, 0.99, 0.01) for (i in 1:1) { p.r.1 - rnorm(1000, 1, 0.5) p.r.2 - rnorm(1000, 2, 1.5) p.r.3 -

Re: [R] for loop optimization help

2012-08-26 Thread David Winsemius
On Aug 26, 2012, at 5:06 PM, Jinsong Zhao wrote: Hi there, In my code, there is a for loop like the following: pmatrix - matrix(NA, nrow = 99, ncol = 1) qmatrix - matrix(NA, nrow = 99, ncol = 3) paf - seq(0.01, 0.99, 0.01) for (i in 1:1) { p.r.1 - rnorm(1000, 1, 0.5)

[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

Re: [R] how to generate response variables using simple regression

2012-08-26 Thread R. Michael Weylandt
Hi Elaine, As posed, your question is rather difficult to respond to properly. I'd imagine the answer is the predict() function, but you'll probably want to rephrase if that's not enough to get what you want. What worries me is that I would be inclined to model your bird species as categorical

Re: [R] Error while installing gsubfn_0.6-4.tar.gz for R 2.15.1

2012-08-26 Thread Divya Kakkillaya B
Hi, I have installed the latest version of R (2.15.1). I have downloaded the tar file from the R CRAN website. The below mentioned problem exists with the latest version. Please help. Regards, Divya From: Gabor Grothendieck [ggrothendi...@gmail.com]

Re: [R] how to generate response variables using simple regression

2012-08-26 Thread Simon Blomberg
Hi Elaine, It's perfectly OK to develop regression models that predict wing data based on body mass. One problem that you should address is the degree of correlation among the data due to shared evolutionary history. 5 species is too small a sample to check for phylogenetic signal in your data

Re: [R] how to append datasets with the same name pattern as they are created within a for loop

2012-08-26 Thread Daniel Malter
Hi, You can use rbind(). E.g., id-rep(1:10,each=10) x-rnorm(100) y-rnorm(100) d-data.frame(id,x,y) rm(id,x,y) newdata-data.frame() for(i in 1:10){ newdata-rbind(newdata,split(d,d$id)[[i]]) print(newdata) } The resulting data.frame newdata has rbind-ed all split elements of d (in this case

[R] How to apply HEGY test in R

2012-08-26 Thread Samithree Rajapaksha
Dear All, I want to apply HEGY test for bi-monthly data.Is it possible if I'll do that by editing the code of uroot package. Could you please help me to solve this problem. Thank You [[alternative HTML version deleted]] __

Re: [R] link for refernces

2012-08-26 Thread jverzani
punitha punitha.c87 at wipro.com writes: Please can anyone suggest me some links which have complicated examples with code of *GUI in R(tcltk package),* There is some code in the ProgGUIInR package: http://cran.r-project.org/web/packages/ProgGUIinR/ The `browseTclTkFiles` function will

[R] total CPU time in Matlab - what is the equivalent in R?

2012-08-26 Thread Gopi Goteti
I am trying to compare the speed of my R code with that reported by the authors of a reference paper who used Matlab. The authors of the paper state Total CPU time for the algorithm was 10 s for the ...on a modest mobile 2.2 GHz Pentium processor running MATLAB v.6. I am using proc.time (similar