[R] re ad and check table

2008-07-18 Thread mysimbaa
Dear R users, I want to read a file like following : if it is a table then z <- read.table(pathname, dec=".", header=TRUE) else if it's not a table (image,doc,...) then send an error or something like that acually I have a read.table in the beginnig of my R code, and if my data is not a table I

Re: [R] eval.wih.vis

2008-07-16 Thread mysimbaa
I solved my problem. I had to delete stop() It doesn't make sense to have a stop() in if. stop() is to stop the execution of the code once the condition is met. the else does the job of stop() in this case. mysimbaa wrote: > > Hello, > I have an error since I run my R code.

[R] eval.wih.vis

2008-07-14 Thread mysimbaa
Hello, I have an error since I run my R code. This error is : Fehler in eval.with.vis(expr, envir, enclos) : > My code is: #CONDITION1 : check if the right logfile is chosen c1=log(z[,3],n) if (c1==FALSE) { plot(0:1,0:1,type = "n", axes=FALSE,xlab="",ylab="") text(0.4,0.8,adj=0,paste("FEHLER"

Re: [R] Plot depends on conditions

2008-07-10 Thread mysimbaa
E should do the job. What happens in the > c1 & c4 are FALSE, or some other combination? Is your description the > priority order that the tests are to be done in? > > On Mon, Jul 7, 2008 at 10:45 AM, mysimbaa <[EMAIL PROTECTED]> wrote: >> >> Dear R users, &

[R] Plot depends on conditions

2008-07-07 Thread mysimbaa
Dear R users, I want to do some plots which depends on conditions (7 conditions) I had collected all the conditions in a vector Cond(c1,c2,c3,c4,c5,c6,c7) All the conditions are logic (TRUE/FALSE). If c1 or c2 are FALSE I want to have only one Plot. Then I want to have a break (something like st

Re: [R] initialize a matrix

2008-07-04 Thread mysimbaa
I had implemented this tvar=pmean=pmin=pmax=varmax=varmin<-matrix(data=NA,nrow=n-deltat-tml,ncol=1) Now the problem I become pmean=pmin=pmax which is not possible! Any suggestion? Thanks in advance -- View this message in context: http://www.nabble.com/initialize-a-matrix-tp18279886p18280210

[R] create a zero matrix & fill

2008-07-04 Thread mysimbaa
Dear R user, I have written a function which returns max,min and variation of a power (see below) Power is a given matrix(1,n) I call the function >Variation<-VAR(p,(n-deltat)) Now the problem is when I want plot(Results[1],Results[2]). Not possible! I become the following error (in english i

[R] initialize a matrix

2008-07-04 Thread mysimbaa
-- View this message in context: http://www.nabble.com/initialize-a-matrix-tp18279886p18279886.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] if one of 4 conditions is not satisfied

2008-07-01 Thread mysimbaa
Thank you very much for your precise help. I will try to implement this tomorrow. It looks like the best solution which could be done. Greetings, Adel Tekari Marc Schwartz wrote: > > on 07/01/2008 07:40 AM mysimbaa wrote: >> I'm trying to do realize the following: >

[R] if one of 4 conditions is not satisfied

2008-07-01 Thread mysimbaa
I'm trying to do realize the following: I have 4 condtions. If all conditions are satisfied I will paste("PASS") If any of these is not satisfied I will paste("FAIL"). But I have to paste the corresponding failure. ifelse is a good solution but for a 2 conditions. Maybe switch or something like t

Re: [R] Add comments on plot window

2008-07-01 Thread mysimbaa
I solved the problem with plot(0:1,0:1, type = "n", axes=FALSE,xlab="",ylab="") text(...) Thanks, Adel mysimbaa wrote: > > Dear R users, > > Is it possible to add comments in a plot window? > I have 3 plots -> this plots have to be commented

[R] Add comments on plot window

2008-06-30 Thread mysimbaa
Dear R users, Is it possible to add comments in a plot window? I have 3 plots -> this plots have to be commented on same window Is possible to do the following : http://www.nabble.com/file/p18193822/plot%2526comments.JPG plot%26comments.JPG I don't know how to do it. Maybe plot.window or someth

[R] png file in batch mode

2008-03-31 Thread mysimbaa
Dear R users, I have an R script which produce me a plot. I run it in batch mode. The outputed file is .ps How ca I ouput the plot in .png in stead of .ps ? I found in R FAQ 7.19 the solution but it is for Linux, and I'm using Windows. Thanks for your help, Ciao, Adel -- View this message in co

[R] gui to run script

2008-03-20 Thread mysimbaa
Dear R users, I'm trying since longtime to make an autolaunch of my code, but no results. I have programmed three codes. And depending on my data(logfile collected from another source) I have (frequently) to run one of the three codes. I'm looking for a better solution that run on of the codes wi

Re: [R] executable script

2008-03-20 Thread mysimbaa
; > > Peter Alspach > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of mysimbaa >> Sent: Thursday, 15 November 2007 6:10 a.m. >> To: r-help@r-project.org >> Subject: [R] executable script >> >>

[R] re ad .csv separated with coma

2008-03-18 Thread mysimbaa
Dear R users, I try to read .csv composed of two rows which are separated with coma in the followin manner: 1.ignore the three first lines 2. read datas separated with coma. I tried the following : pathname <- file.choose() z <-read.csv(pathname, s

[R] automatically save graphic

2008-03-04 Thread mysimbaa
Dear R users, I write some code which produce a graphic Now I try at the end to output it (bitmap or jpeg) like this way : - pop up window asking me to choose a path where to save my picture - choose name for this picture thanks you in advance, Adel -- View this message in context: http://

[R] Plot using colors

2008-03-03 Thread mysimbaa
Dear R users, I have a problem since I try to plot my datas with different colors. plot(tvar, var, xlab="zeit [s]",ylab="Variation [%]", col = ifelse(var <= varstability, 'green','red')) this works well! But since I add a type="l" to my plot, it will color all the plot with green!!! Is there an

[R] better curve

2007-11-21 Thread mysimbaa
Hi R users, I have collected data which I plot(x,y).The problem it has oscillations. Now i'm trying to "make better" this curve with a smooth line. And then collect my new datas. But I don't know how doing this. Perhaps a linear regression ?? See .jpeg foto. Thanks for any help it will be give

[R] Changing axis scale

2007-11-21 Thread mysimbaa
Hello R users, Is it possible after making a plot(x,y) to change axis scale? For example : I have a range of 0 to 3000 in my y-axis and I want to make a zoom between 2000 and 3000. Thanks for any help. -- View this message in context: http://www.nabble.com/Changing-axis-scale-tf4850633.html#

Re: [R] display basename

2007-11-21 Thread mysimbaa
Thanks for help. -- View this message in context: http://www.nabble.com/display-basename-tf4846650.html#a13876120 Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

[R] display basename

2007-11-20 Thread mysimbaa
Hello everybody, I'm sorry for asking a dumb question, but I don't find how to loos it. I need to display the name of the choosing file using this command : z=read.table(file.choose(),dec=".",header=TRUE) Thanks for any help. -- View this message in context: http://www.nabble.com/display-bas

[R] executable script

2007-11-14 Thread mysimbaa
Dear All, Apologies for this simple question and thanks in advance for any help given. I want to make from my .R script an .exe file. Is there any way to transfort my script to an autolaunch file? It means it runs the script by double clicking on it. p.s.: I'm using windows -- View this mess

Re: [R] Plot segments with different colors

2007-11-13 Thread mysimbaa
Another question concerning the type. plot(x,F,xlab="Zeit [s]",ylab="Variation [%]",col = rep(c("red", "blue", "magenta"), c(t0, ts, n)),type=c("p", "l","o")) Doesnt change the type with differents colors! (I become only one type and my color is red) How can I solve this? -- View this message

[R] Plot segments with different colors

2007-11-13 Thread mysimbaa
Hello Everybody, I'm trying to plot(x,y) using different colors. I have to cut (x,y) into sub intervals. And I want to plot this sub intervals using colors. But infortunally I don't know how to do this with R. Can any body help me please? My code is looking like : x<-c(tvar[1:t0],tvar[t0:(ts)],t