[R] rapache memory problem

2012-11-21 Thread mrzung
Hi all; Now I'm developing web application by using rapache in ubuntu. My problem is that as users execute the application, the server PC cumulates memory. After users close or refresh the application page, the server PC memory is still cumulated. Now I'm renewing apache machine by manually in term

[R] to print system.time always

2012-11-03 Thread mrzung
Hi all; I want to print system.time whenever I execute any command. It takes too much time to type "system.time()" function to all command. is there any solution on it? And, apply(matrix,1,cumsum) command is too slow to some large matrix. is there any function like rowCumSums ? thank u! -

[R] stop at error point in for-loop

2012-10-14 Thread mrzung
hi all: Following is simple example, for(i in 1:1000){ a<-function(i){ #some function that has an error } } What I want to know is the way to find the error point in for-loop, What "i" makes the error. is there any way to solve it instead of debugging and finding an error manually? Thanks,

[R] To summary data

2012-05-14 Thread mrzung
hi all, my data is here, -- data clss number 1A 1 2B 2 3C 3 4A 4 5B 5 6C 6 7A 7 8B 8 9C 9

[R] How to define format of number

2012-04-13 Thread mrzung
hi all, What I want to do is show a number with thousand expression. I dont know exactly the expression name but here is example. 1,000 10,000,000 is there a way to express a number like that? -- View this message in context: http://r.789695.n4.nabble.com/How-to-define-format-of-number-tp4

[R] How to close gwindow by automatially

2012-04-04 Thread mrzung
Hi, all I am using gWidgets for making gui, and in trouble with closing gwindow. I want to close gwindow "A" by automatically when I click a button in gwindow "A" that loads another gwindow "B" . for example. A<-gwindow(visible=FALSE) open<-gbutton(cont=A,"open new window",handler=function(h,..

[R] Choice between gwidgetsRGtk2 and gwidgetstcltk

2012-04-03 Thread mrzung
Hi, all What I want to ask is "what is better gui between gwidgetsRGtk2 and gwidgetstcltk?" In my opinion, gwidgetsRgtk2 has more functionality for gui. For example , in importing image from file, Rgtk2 works with most of formats but tcltk only with gif and pnm. However, gwidgetstcltk is more lo

[R] How to hide console window

2012-04-02 Thread mrzung
Hi, all I'm wondering the code that hides or minimizes console window. What I'm making is gui for some function and that is saved as gui.RData that is started with gui window when I open the gui.RData. In this sitiuation I don't want to see console window but just gui window. How can I solve my pro

[R] How to export plot outputs as "gif"

2012-04-01 Thread mrzung
Hi, I really need to export plot image as "gif". I know that other image forms are available with functions like png(), jpeg() etc. However, The reason that I only need the "gif" form is "gimage" function in "gWidgetstcltk" library only works with "gif" or "pnm". I want to lo

[R] gWidgetstcltk gtext problem

2012-04-01 Thread mrzung
hi, what I want to do is put a function result(output) into gtext area. short example is following, require("gWidgetstcltk") options(guiToolkit = "tcltk") win<-gwindow() input<-gedit("",con=win) run<-gbutton("run",con=win,handler=function(h,...){ y<<-as.numeric(svalue(input))+1 }) outarea<-gtext(

[R] clear console

2012-03-31 Thread mrzung
hi, I use R - 2.15(32bit), and want to make a code to clear a console. Actually, I used to run following code to do that but after update the version of R from 2.14 to 2.15, it doesn't work. cls <- function (t) { require(RDCOMClient) wsh <- COMCreate("Wscript.Shell")

[R] Error in use of "gwindow" and ".First" function

2012-03-29 Thread mrzung
Hi, I saved an image and planed to open it whenever I want to load it. However, when I open it, It doesn't work. The code is following, and saved it as an image. .First<-function(){ require(tcltk) require(TeachingDemos) library(gWidgetstcltk) options(guiToolkit = "

[R] Error in use of "gwindow" and ".First" function

2012-03-29 Thread mrzung
Hi, I saved an image and planed to open it whenever I want to load it. However, when I open it, It doesn't work. The code is following, and saved it as an image. .First<-function(){ require(tcltk) require(TeachingDemos) library(gWidgetstcltk) options(guiToolkit = "

[R] How to change the color of tcltk widget background color

2012-03-27 Thread mrzung
hi, I'm a beginner of tcltk packages. I'm making some gui for some function and want to change the background color that is grey in default. anybody who knows the way that changes the color of it plz teach me how to do that. Forthemore is there a nice manual for tclck? Thanks. -- View this mess

[R] How to install tclRequire(Iwidgets)

2012-03-25 Thread mrzung
hi, i'm trying to make "Tabbed Notebook Widget",but cannot install "tclRequire(Iwidgets)". I installed Activetcl but I don't know what can be the next step to execute "tclRequire(Iwidgets)". how can i do that? Thanks -- View this message in context: http://r.789695.n4.nabble.com/How-to-install

[R] how to make output more lovely

2012-03-23 Thread mrzung
Hi, I'm trying to make output of my function easier to see and more lovely. As u know, R output is not easy to see for beginner of study or anyone not expert so I want to transform the output into other form. Output of my function is just long text with some numerical result and table. Is there a

[R] how to adjust gui window size

2012-03-22 Thread mrzung
hi, i'm trying to make gui function by "aDialog" FUN. What i want to do is adjusting the window size. my function is , aa<- aDialog(items=list( ps=numericItem(), number=numericItem(), term=numericItem() ), OK_handler=function(.) { # . is reference to dlg object values <- .$to_R() do.call("KOD",va

[R] Bold font in "paste" function

2012-03-16 Thread mrzung
hi Can it be possible to make font in "paste" function large or small, diffent color and bold? for example, m<-function(x){ if(x==11){ print(paste(" A. Result"),quote=F) # I want to make this string bold and diffent color print(paste(" It confirm that there is

[R] how to speed up the inefficient code

2012-03-16 Thread mrzung
hi, i'm really in trouble to simulate some experiment. that is, it takes too much time to process the following code. following is short example, --- p<-data.frame(a=rnorm(10),b=rnorm(10),c=rnor

[R] how to speed up the process of R

2012-03-15 Thread mrzung
hi I'm simulating some experiment by "for" function. The problem is that it takes too much time. for example, a<-list() for(i in 1:1){ a[[i]]<-i*1000 } is there anyway to speed up the process? I heard there is solution but i don't have idea. Can anyone help me? -- View this message i

[R] how to hide code of any function

2012-03-15 Thread mrzung
hi I'm making some program and it need to be hidden. it's not commercial purpose but it is educational, so i do want to hide the code of function. for example, if i made following function: a<-function(x){ y<-x^2 print(y) } i do not want someone to type "a" and take the code of the function.

[R] how to assign "writeLines" function

2012-03-15 Thread mrzung
hi, what I want to do is assigning following code to any object. k<-paste("thank") writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)) To assign the "writeLines" code, I try this a<-writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)) or assign(a,writeLines(strwrap(k, width = 80,ind

[R] erasing "[1]"

2012-03-12 Thread mrzung
hi, is there any way to erase the term "[1]"? for example, > a<-3+2 > a *[1]* 5 the term [1] in front of number 5. is there any way? -- View this message in context: http://r.789695.n4.nabble.com/erasing-1-tp4467628p4467628.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] macro function

2012-02-28 Thread mrzung
I really appreciate to your attention. I want to change the data form "A" into "B" http://r.789695.n4.nabble.com/file/n4428807/1.png http://r.789695.n4.nabble.com/file/n4428807/2.png In fact, there are 1095 column in data "A". Specifically, variable "publish_day" is when some book in the

Re: [R] macro function

2012-02-28 Thread mrzung
Actually, what I really want to do is that, <<"annual productivity data(2011)">> firts date 2011-01-01 2011-01-02 2011-01-03 2011-01-04

[R] macro function

2012-02-28 Thread mrzung
hi, I know how to use the "for" loop function like: for(i in 1:ncol(mat)){ mat[i]<-b[i,2] } but, in this case r1<-b[1,1] r2<-b[2,1] r3<-b[3,1] r4<-b[4,1] * * * r3002<-b[3002,1] r3003<-b[3003,1] - must make vectors how should I make a efficient code for that? Is there anyth

[R] macro function

2012-02-27 Thread mrzung
hi, I know how to use the "for" loop function like: for(i in 1:ncol(mat)){ mat[i]<-b[i,2] } but, in this case r1<-b[1,1] r2<-b[2,1] r3<-b[3,1] r4<-b[4,1] * * * r3002<-b[3002,1] r3003<-b[3003,1] - must make vectors how should I make a efficient code for that? Is there anything in R like SAS