[R] Weird R Studio behaviour...

2024-07-09 Thread Levent TERLEMEZ via R-help
Hi,

Have a nice week. First of all, I know this is not R Studio forum but I want to 
ask here first, if you all do not mind. Well, I am away from my computer right 
now but, I have a strange problem (at least to me). My script worked perfectly 
for a year, and today, suddenly stop working because R Studio begins to warn me 
about illegal characters in the script.

System is on W 10, and R 3.4.1 is working with R Studio. R Studio is updated 
today to the latest one because of this problem with the hope of resolving the 
problem (but no luck) and they are used as their default installation settings. 
Anyway, the problem example may not be repoducable right now but if it is, I 
can give detailed one later.

While the original working code is this (there is no synax error, too in the 
code because it was working perfectly until today before updating R Studio, 
error also came out before this update as I mensioned before);

legend(c("Kapanış",""20 Günlük,"50 Günlük"),col=c("black"...

The warning is this;

Error: unexpected symbol inside:
" Encoding(kill3) <- "latin1" legend(c(kill1,kill2,"50 G�nl�k"),col=c("black"… 
and can be solved when converted “ü” to “u”. Addition to this another solution 
(at least for me) is this;

kill1<-"Kapanış"
Encoding(kill1) <- "UTF-8" (these two statements are not needed but fort he 
sake of code integrity, is applied to it, too. If kill1 is converted to latin1, 
this time it is broken)
kill2<-"22 Günlük MA"
Encoding(kill2) <- "latin1"
kill3<-"50 Günlük MA"
Encoding(kill3) <- "latin1"

And also it is set to “ASK” and always “UTF-8” is selected.

But, I also wonder why today and what changed so R Studio stops suddenly 
running the script? I can not following up the changes anymore as used to be 
and if this is a character set problem, it is coming back again and again. What 
is the permenant solution of this? This is like an endless problem…

With my best regards and thanks for your patience….

Levent Terlemez.




YASAL UYARI: Bu e-postanın içerdiği bilgiler (ekleri de dahil olmak üzere) 
gizlidir. Sahibinin onayı olmaksızın içeriği kopyalanamaz, üçüncü kişilere 
açıklanamaz veya iletilemez . Bu mesajın gönderilmek istendiği kişi değilseniz 
(ya da bu e-postayı yanlışlıkla aldıysanız), lütfen yollayan kişiyi haberdar 
ediniz ve mesajı sisteminizden derhal siliniz. Eskişehir Teknik Üniversitesi, 
bu mesajın içerdiği bilgilerin doğruluğu veya eksiksiz olduğu konusunda bir 
garanti vermemektedir. Bu nedenle, bilgilerin ne şekilde olursa olsun 
içeriğinden, iletilmesinden, alınmasından, saklanmasından Eskişehir Teknik 
Üniversitesi sorumlu değildir. Bu mesajın içeriği yazarına ait olup, Eskişehir 
Teknik Üniversitesi'nin görüşlerini içermeyebilir. Bu e-posta bizce bilinen tüm 
bilgisayar virüslerine karşı taranmıştır.

DISCLAIMER: This e-mail (including any attachments) may contain confidential 
and/or privileged information. Copying, disclosure or distribution of the 
material in this e-mail without owner authority is strictly forbidden. If you 
are not the intended recipient (or have received this e-mail in error), please 
notify the sender and delete it from your system immediately. Eskisehir 
Technical University makes no warranty as to the accuracy or completeness of 
any information contained in this message and hereby excludes any liability of 
any kind for the information contained therein or for the information 
transmission, reception, storage or use of such in any way whatsoever. Any 
opinions expressed in this message are those of the author and may not 
necessarily reflect the opinions of Eskisehir Technical University. This e-mail 
has been scanned for all computer viruses known to us.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R] YNT: ggtern and bquote...

2017-12-04 Thread Levent TERLEMEZ via R-help
Hi, thanks to everybody for pointing the issue and their kind answers. I 
appreciated, it is solved.

x11<-data.frame(A=c(.6,.6,.6),B=c(.20,.20,.20),C=c(0.20,.20,.20))
ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend= c(.30,.50,.0),zend 
=c(.0,.50,0.3)))+
  geom_point()+
  theme_showarrows()+geom_segment(size=.5)+
  
geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=c("P[a]","P[b]","P[c]"),parse=TRUE)


My best regards,
Levent.

Kimden: peter dalgaard [pda...@gmail.com]
Gönderildi: 04 Aralık 2017 Pazartesi 17:23
Kime: Eik Vettorazzi
Bilgi: Levent TERLEMEZ; R-help@r-project.org
Konu: Re: [R] ggtern and bquote...

D'oh! Thanks for pointing this out. I blame caffeine depletion at the time...

-pd

> On 4 Dec 2017, at 15:48 , Eik Vettorazzi <e.vettora...@uke.de> wrote:
>
> reading ?plotmath you might notice that "_" isn't the propper syntax for
> subscripts. This will work:
>
> ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend =
> c(.30,.50,.0),zend =c(.0,.50,0.3)))+
>  geom_point()+
>  theme_showarrows()+geom_segment(size=.5)+
> geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=c("P[a]","P[b]","P[c]"),
> parse=TRUE)
>
> cheers.
>
> Am 04.12.2017 um 15:37 schrieb Levent TERLEMEZ via R-help:
>> Hi,
>>
>> My example code is this;
>>
>> x11<-data.frame(A=c(.6,.6,.6),B=c(.20,.20,.20),C=c(0.20,.20,.20))
>> ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend 
>> =c(.0,.50,0.3)))+
>>geom_point()+
>>theme_showarrows()+geom_segment(size=.5)+
>>
>> geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=as.expression("P_a","P_b","P_c"))
>>
>> ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend 
>> =c(.0,.50,0.3)))+
>>geom_point()+
>>theme_showarrows()+geom_segment(size=.5)+
>>
>> geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=as.expression(quote(c("P_a","P_b","P_c"
>>
>> In geom_text_viewport (I also tried geom_label and geom_text versions) tried 
>> all possible solutions, but i couldn't achieved. R command outputs are like 
>> this:
>>
>> Error in stats::complete.cases(df[, vars, drop = FALSE]) :
>>  invalid 'type' (expression) of argument
>>
>>
>> Maybe i am writing the code wrong, i couldn't figure out.
>>
>> Thanks for your kind answers.
>>
>>
>>
>> ____
>> Kimden: Martin Maechler [maech...@stat.math.ethz.ch]
>> Gönderildi: 04 Aralık 2017 Pazartesi 16:16
>> Kime: peter dalgaard
>> Bilgi: Levent TERLEMEZ; R-help@r-project.org
>> Konu: Re: [R] ggtern and bquote...
>>
>>>>>>> peter dalgaard <pda...@gmail.com>
>>>>>>>on Mon, 4 Dec 2017 14:55:19 +0100 writes:
>>
>>>> On 4 Dec 2017, at 11:58 , Levent TERLEMEZ via R-help
>>>> <r-help@r-project.org> wrote:
>>>>
>>>> Dear Users,
>>>>
>>>> What is the proper way to write symbol, superscript,
>>>> subscript in ggtern/ggplot? I tried every given example,
>>>> every possible features of ggplot but couldn’t achived. I
>>>> just want to write P_a, sigma^2, etc, would you please
>>>> advise me about this problem.
>>
>>> Did you try expression(P_a)? I don't do much gg-stuff, but
>>> I seem to recall that quote() doesn't quite cut it the way
>>> it does in base graphics.
>>
>>> -pd
>>
>> Yes, I vaguely remember that indeed also for the lattice package
>> (which is based on 'grid' the same as 'ggplot2' is ..) sometimes
>> expressions instead of calls are needed, i.e., expression(*)
>> instead of just quote(*).
>>
>> However, I think Levent really meant what you'd get by
>> expression(P[a]) ?
>>
>> @Levent: The clue is the need for valid R syntax, and indeed, as
>>   in LaTeX  x_i often is the i-th element of x,  the R syntax for
>>   indexing/subsetting is used here, i.e.
>>x[i]  for LaTeX  x_i
>>
>>
>> Last but not least, if Levent really needs bquote() [i.e. substitute()]
>> then, a final
>>  as.expression(.)
>> may be needed :
>>
>> identical(as.expression(quote(a == 1)),
>> expression(  a == 1))  # --> TRUE
>>
>> --
>> Martin Maechler, ETH Zurich
>>
>>
>> 
>>
>> Bu elektronik posta ve onunla iletilen b

[R] YNT: ggtern and bquote...

2017-12-04 Thread Levent TERLEMEZ via R-help
Hi,

My example code is this;

x11<-data.frame(A=c(.6,.6,.6),B=c(.20,.20,.20),C=c(0.20,.20,.20))
ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend 
=c(.0,.50,0.3)))+
geom_point()+
theme_showarrows()+geom_segment(size=.5)+

geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=as.expression("P_a","P_b","P_c"))

ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend 
=c(.0,.50,0.3)))+
geom_point()+
theme_showarrows()+geom_segment(size=.5)+

geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=as.expression(quote(c("P_a","P_b","P_c"

In geom_text_viewport (I also tried geom_label and geom_text versions) tried 
all possible solutions, but i couldn't achieved. R command outputs are like 
this:

Error in stats::complete.cases(df[, vars, drop = FALSE]) :
  invalid 'type' (expression) of argument


Maybe i am writing the code wrong, i couldn't figure out.

Thanks for your kind answers.




Kimden: Martin Maechler [maech...@stat.math.ethz.ch]
Gönderildi: 04 Aralık 2017 Pazartesi 16:16
Kime: peter dalgaard
Bilgi: Levent TERLEMEZ; R-help@r-project.org
Konu: Re: [R] ggtern and bquote...

>>>>> peter dalgaard <pda...@gmail.com>
>>>>> on Mon, 4 Dec 2017 14:55:19 +0100 writes:

>> On 4 Dec 2017, at 11:58 , Levent TERLEMEZ via R-help
>> <r-help@r-project.org> wrote:
>>
>> Dear Users,
>>
>> What is the proper way to write symbol, superscript,
>> subscript in ggtern/ggplot? I tried every given example,
>> every possible features of ggplot but couldn’t achived. I
>> just want to write P_a, sigma^2, etc, would you please
>> advise me about this problem.

> Did you try expression(P_a)? I don't do much gg-stuff, but
> I seem to recall that quote() doesn't quite cut it the way
> it does in base graphics.

> -pd

Yes, I vaguely remember that indeed also for the lattice package
(which is based on 'grid' the same as 'ggplot2' is ..) sometimes
expressions instead of calls are needed, i.e., expression(*)
instead of just quote(*).

However, I think Levent really meant what you'd get by
 expression(P[a]) ?

@Levent: The clue is the need for valid R syntax, and indeed, as
   in LaTeX  x_i often is the i-th element of x,  the R syntax for
   indexing/subsetting is used here, i.e.
x[i]  for LaTeX  x_i


Last but not least, if Levent really needs bquote() [i.e. substitute()]
then, a final
  as.expression(.)
may be needed :

identical(as.expression(quote(a == 1)),
 expression(  a == 1))  # --> TRUE

--
Martin Maechler, ETH Zurich




Bu elektronik posta ve onunla iletilen bütün dosyalar sadece yukarıda isimleri 
belirtilen kişiler arasında özel haberleşme amacını taşımakta olup gönderici 
tarafından alınması amaçlanan yetkili gerçek ya da tüzel kişinin kullanımına 
aittir. Eğer bu elektronik posta size yanlışlıkla ulaşmışsa, elektronik 
postanın içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız 
kesinlikle yasaktır. Bu durumda, lütfen mesajı geri gönderiniz ve sisteminizden 
siliniz. Anadolu Üniversitesi bu mesajın içerdiği bilgilerin doğruluğu veya 
eksiksiz olduğu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu 
bilgilerin ne şekilde olursa olsun içeriğinden, iletilmesinden, alınmasından ve 
saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen kişiye 
aittir ve Anadolu Üniversitesinin görüşlerini yansıtmayabilir.

This electronic mail and any files transmitted with it are intended for the 
private use of the people named above. If you are not the intended recipient 
and received this message in error, forwarding, copying or use of any of the 
information is strictly prohibited. Any dissemination or use of this 
information by a person other than the intended recipient is unauthorized and 
may be illegal. In this case, please immediately notify the sender and delete 
it from your system. Anadolu University does not guarantee the accuracy or 
completeness of any information included in this message. Therefore, by any 
means Anadolu University is not responsible for the content of the message, and 
the transmission, reception, storage, and use of the information. The opinions 
expressed in this message only belong to the sender of it and may not reflect 
the opinions of Anadolu University.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.

[R] ggtern and bquote...

2017-12-04 Thread Levent TERLEMEZ via R-help
Dear Users,

What is the proper way to write symbol, superscript, subscript in 
ggtern/ggplot? I tried every given example, every possible features of ggplot 
but couldn’t achived. I just want to write P_a, sigma^2, etc, would you please 
advise me about this problem.

Thanks in advance,
Levent TERLEMEZ






Bu elektronik posta ve onunla iletilen bütün dosyalar sadece yukarıda isimleri 
belirtilen kişiler arasında özel haberleşme amacını taşımakta olup gönderici 
tarafından alınması amaçlanan yetkili gerçek ya da tüzel kişinin kullanımına 
aittir. Eğer bu elektronik posta size yanlışlıkla ulaşmışsa, elektronik 
postanın içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız 
kesinlikle yasaktır. Bu durumda, lütfen mesajı geri gönderiniz ve sisteminizden 
siliniz. Anadolu Üniversitesi bu mesajın içerdiği bilgilerin doğruluğu veya 
eksiksiz olduğu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu 
bilgilerin ne şekilde olursa olsun içeriğinden, iletilmesinden, alınmasından ve 
saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen kişiye 
aittir ve Anadolu Üniversitesinin görüşlerini yansıtmayabilir.

This electronic mail and any files transmitted with it are intended for the 
private use of the people named above. If you are not the intended recipient 
and received this message in error, forwarding, copying or use of any of the 
information is strictly prohibited. Any dissemination or use of this 
information by a person other than the intended recipient is unauthorized and 
may be illegal. In this case, please immediately notify the sender and delete 
it from your system. Anadolu University does not guarantee the accuracy or 
completeness of any information included in this message. Therefore, by any 
means Anadolu University is not responsible for the content of the message, and 
the transmission, reception, storage, and use of the information. The opinions 
expressed in this message only belong to the sender of it and may not reflect 
the opinions of Anadolu University.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.

Re: [R] ccomp Composition and ggtern plot...

2017-11-23 Thread Levent TERLEMEZ via R-help
Thank you for your kind and quick answers, Jeff Newmiller and Ron Crump. I
looked at the help pages, but I missed the point you underlined.. Solved
the problem.

Levent TERLEMEZ.



On 22.11.2017 23:23, "Jeff Newmiller" <jdnew...@dcn.davis.ca.us> wrote:

>I have no clue what this package is for, but reading the help page for
>the ccomp function tells you that it returns a numeric vector or matrix.
>How do YOU want to display information from this numeric vector? That
>will determine how you would put it into a data frame.
>--
>Sent from my phone. Please excuse my brevity.
>
>On November 22, 2017 3:13:01 AM PST, Levent TERLEMEZ via R-help
><r-help@r-project.org> wrote:
>>Dear Users,
>>
>>I would like to use compositions package with ggplot/ggtern, other
>>composition classes of compositional package can be used with ggtern by
>>converting to data frame but I could do anything with c(ount)comp
>>class. Ggplot/ggtern can not recognise comp and also can not be
>>converted to data frame. Is there any other way to do this?
>>
>>Thank you in advance,
>>
>>Levent TERLEMEZ.
>>
>>
>>
>>
>>
>>Bu elektronik posta ve onunla iletilen bütün dosyalar sadece yukarıda
>>isimleri belirtilen kişiler arasında özel haberleşme amacını taşımakta
>>olup gönderici tarafından alınması amaçlanan yetkili gerçek ya da tüzel
>>kişinin kullanımına aittir. Eğer bu elektronik posta size yanlışlıkla
>>ulaşmışsa, elektronik postanın içeriğini açıklamanız, kopyalamanız,
>>yönlendirmeniz ve kullanmanız kesinlikle yasaktır. Bu durumda, lütfen
>>mesajı geri gönderiniz ve sisteminizden siliniz. Anadolu Üniversitesi
>>bu mesajın içerdiği bilgilerin doğruluğu veya eksiksiz olduğu konusunda
>>herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne şekilde
>>olursa olsun içeriğinden, iletilmesinden, alınmasından ve
>>saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca
>>gönderen kişiye aittir ve Anadolu Üniversitesinin görüşlerini
>>yansıtmayabilir.
>>
>>This electronic mail and any files transmitted with it are intended for
>>the private use of the people named above. If you are not the intended
>>recipient and received this message in error, forwarding, copying or
>>use of any of the information is strictly prohibited. Any dissemination
>>or use of this information by a person other than the intended
>>recipient is unauthorized and may be illegal. In this case, please
>>immediately notify the sender and delete it from your system. Anadolu
>>University does not guarantee the accuracy or completeness of any
>>information included in this message. Therefore, by any means Anadolu
>>University is not responsible for the content of the message, and the
>>transmission, reception, storage, and use of the information. The
>>opinions expressed in this message only belong to the sender of it and
>>may not reflect the opinions of Anadolu University.
>>
>>  [[alternative HTML version deleted]]
>>
>>__
>>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>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, minimal, self-contained, reproducible code.





Bu elektronik posta ve onunla iletilen bütün dosyalar sadece yukarıda isimleri 
belirtilen kişiler arasında özel haberleşme amacını taşımakta olup gönderici 
tarafından alınması amaçlanan yetkili gerçek ya da tüzel kişinin kullanımına 
aittir. Eğer bu elektronik posta size yanlışlıkla ulaşmışsa, elektronik 
postanın içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız 
kesinlikle yasaktır. Bu durumda, lütfen mesajı geri gönderiniz ve sisteminizden 
siliniz. Anadolu Üniversitesi bu mesajın içerdiği bilgilerin doğruluğu veya 
eksiksiz olduğu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu 
bilgilerin ne şekilde olursa olsun içeriğinden, iletilmesinden, alınmasından ve 
saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen kişiye 
aittir ve Anadolu Üniversitesinin görüşlerini yansıtmayabilir.

This electronic mail and any files transmitted with it are intended for the 
private use of the people named above. If you are not the intended recipient 
and received this message in error, forwarding, copying or use of any of the 
information is strictly prohibited. Any dissemination or use of this 
information by a person other than the intended recipient is unauthorized and 
may be illegal. In this case, please immediately notify the sender and delete 
it from your syste

[R] ccomp Composition and ggtern plot...

2017-11-22 Thread Levent TERLEMEZ via R-help
Dear Users,

I would like to use compositions package with ggplot/ggtern, other composition 
classes of compositional package can be used with ggtern by converting to data 
frame but I could do anything with c(ount)comp class. Ggplot/ggtern can not 
recognise comp and also can not be converted to data frame. Is there any other 
way to do this?

Thank you in advance,

Levent TERLEMEZ.





Bu elektronik posta ve onunla iletilen bütün dosyalar sadece yukarıda isimleri 
belirtilen kişiler arasında özel haberleşme amacını taşımakta olup gönderici 
tarafından alınması amaçlanan yetkili gerçek ya da tüzel kişinin kullanımına 
aittir. Eğer bu elektronik posta size yanlışlıkla ulaşmışsa, elektronik 
postanın içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız 
kesinlikle yasaktır. Bu durumda, lütfen mesajı geri gönderiniz ve sisteminizden 
siliniz. Anadolu Üniversitesi bu mesajın içerdiği bilgilerin doğruluğu veya 
eksiksiz olduğu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu 
bilgilerin ne şekilde olursa olsun içeriğinden, iletilmesinden, alınmasından ve 
saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen kişiye 
aittir ve Anadolu Üniversitesinin görüşlerini yansıtmayabilir.

This electronic mail and any files transmitted with it are intended for the 
private use of the people named above. If you are not the intended recipient 
and received this message in error, forwarding, copying or use of any of the 
information is strictly prohibited. Any dissemination or use of this 
information by a person other than the intended recipient is unauthorized and 
may be illegal. In this case, please immediately notify the sender and delete 
it from your system. Anadolu University does not guarantee the accuracy or 
completeness of any information included in this message. Therefore, by any 
means Anadolu University is not responsible for the content of the message, and 
the transmission, reception, storage, and use of the information. The opinions 
expressed in this message only belong to the sender of it and may not reflect 
the opinions of Anadolu University.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.

[R] What is the problem now?

2015-01-05 Thread Levent TERLEMEZ
Hi Dear Users,

I abonden ggplot2 adventure for the moment because of urgent results (i will of 
course will do this with ggplot2 because I would like to use ggplot2 much more 
than standart plots). But this time I came across with a different problem.
Problem is different graphical outputs from screen and copy-paste. -3s to 3s 
texts at the desired points on the screen but only 3s text at the desired 
points on the copy-past to a word or another document.


dput for d.oran;

structure(list(Tarih = structure(c(12784, 12785, 12786, 12787,
12788), class = Date), EUROUSD = c(1.37820047639547, 1.37321712373714,
1.36448946153273, 1.35276621058894, 1.33879335902757), USDJPY = 
c(1.03465373983692,
1.02726827581633, 1.02488359667201, 1.02672163689113, 1.03386973180077
), EUROJPY = c(1.42596027714759, 1.41066238702292, 1.39844286695672,
1.38891433806688, 1.38413793103448)), .Names = c(Tarih, EUROUSD,
USDJPY, EUROJPY), row.names = c(NA, 5L), class = data.frame)


dput for d.oran.ist;
structure(list(x_bar = c(1.34056134982583, 0.990969887720573,
1.32651605042546, NA, NA), std_sap = c(0.0873935814603307, 0.137574609058213,
0.189820046956369, NA, NA)), .Names = c(x_bar, std_sap), row.names = 
c(EUROUSD,
USDJPY, EUROJPY, NA, NA.1), class = data.frame)


Both of these data frames are in function frames. And this my user function 
that produces these plots (it produces 3 plots for 3 exchange rates) and both 3 
plots do the same thing.


function(veri)
{
require(reshape2)

d.oran-data.frame(veri[,1],veri[,2]/veri[,4],veri[,4]/veri[,3],veri[,2]/veri[,3])
colnames(d.oran)-c(Tarih,EUROUSD,USDJPY,EUROJPY)
dput(d.oran[1:5,])
x_bar-colMeans(d.oran[,2:4])
std_sap-apply(d.oran[,2:4],2,sd)
d.oran.ist-data.frame(x_bar,std_sap)
colnames(d.oran.ist)-c(x_bar,std_sap)
dput(d.oran.ist[1:5,])
d.oran-melt(d.oran,id=Tarih)
d.oran$variable-factor(d.oran$variable)
#print(x_bar)
#print(std_sap)
print(d.oran.ist)
print(d.oran[1:5,])
renkler-c(red,blue,green,orange)
for(i in 1:3)
{
dev.new() # Here, I tried windows() too but nothing changed
gecici-subset(d.oran,variable==levels(d.oran$variable)[i])

plot(gecici$Tarih,gecici$value,main=levels(d.oran$variable)[i],type=l,ylim=c(d.oran.ist[i,1]-3*d.oran.ist[i,2]-.05,d.oran.ist[i,1]+3*d.oran.ist[i,2]+.05))

#segments(min(gecici$Tarih),d.oran.ist[i,1]+seq(-3,3,1)*d.oran.ist[i,2],max(gecici$Tarih),d.oran.ist[i,1]+seq(-3,3,1)*d.oran.ist[i,2])

abline(h=d.oran.ist[i,1]+seq(-3,3,1)*d.oran.ist[i,2],col=renkler[4-abs(seq(-3,3,1))],lty=dashed)
for(z in -3:3)
{
y-d.oran.ist[i,1]+z*d.oran.ist[i,2]
if(z!=0)

{text(min(gecici$Tarih),y,substitute(paste(z,sigma)),cex=.85,pos=3,offset=-.0001)}
#else
{text(min(gecici$Tarih),y,substitute(paste(mu)),cex=.85,pos=2,offset=1)}
}
#plot()
}
}


I really appreciate your valuable time make for me, and nice advices. Thanks to 
everybody for sharing experiences and knowledge,

Levent TERLEMEZ.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R] Add labels to my geom_hlines...

2014-12-29 Thread Levent TERLEMEZ
Dear Users,

Would you pls help me to write a proper geom_text addition to geom_hline of my 
ggplot2.

This is d.oran

   Tarih  EUROUSD   USDJPY  EUROJPY
1 2005-01-01 1.378200 1.034654 1.425960
2 2005-01-02 1.373217 1.027268 1.410662
3 2005-01-03 1.364489 1.024884 1.398443
4 2005-01-04 1.352766 1.026722 1.388914
5 2005-01-05 1.338793 1.033870 1.384138

this is d.oran.ist

  x_barstd_sap
EUROUSD 1.3405613 0.08739358
USDJPY  0.9909699 0.13757461
EUROJPY 1.3265161 0.18982005

and both of them are (in function) data frames. Here is my ggplot and i'd like 
to add texts to left edge of hlines like -3sigma, -2sigma,..., 3sigma.

Here is my ggplot line:

ggplot(data=d.oran)+geom_line(aes(x=Tarih,y=EUROUSD))+geom_hline(data=d.oran.ist,yintercept=x_bar[1]+c(-3:3)*std_sap[1],color=c(red,green,blue,black,blue,green,red),linetype=dashed,lwd=1)


Thanks in advance.
Levent TERLEMEZ.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, minimal, self-contained, reproducible code.


[R] Cycling and different xerror values in cp of rpart, which result should I trust?...

2014-12-01 Thread Levent TERLEMEZ
Dear Users,
Is it possible to get cycling and different xerror scores in cp of rpart while 
getting the same tree on every run (or am I missing something or understood 
wrong)? I build it with an old version of R in a Windows VM installed on a 
Intel based macbook and reuse the same codes with a newer version of R and 
required packages on an AMD pc installed with standalone Windows. Both Windows 
are 64bit, which result should I trust, the old one or new one, macbook or pc?

Thanks in advanced,
Levent TERLEMEZ.


[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] Cycling xerror values in cp of rpart...

2014-11-27 Thread Levent TERLEMEZ
Dear R Users,
Is it possible to get cycling xerror scores in cp of rpart while getting the 
same tree on every run (or am I missing something or understood wrong)? I build 
it with an old version of R in a Windows VM installed on a Intel based macbook 
and reuse the same codes with a newer version of R and required packages on an 
AMD pc installed with standalone windows.

Thanks in advanced,
Levent TERLEMEZ.

[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] Very very small problem...

2014-06-18 Thread Levent TERLEMEZ
Dear Users,


This, substitute(paste(z,sigma)), small code doesn¡¦t work properly with text() 
within a loop z in ¡V3:3, except if i don¡¦t use print(z) while plotting. What 
may be the problem? This code is used in a user defined function. It was 
running in older versions.
Thanks in advance.

plot(x,type=l,ylim=c(alt,ust))
for(z in -3:3)
{
if(abs(z)==3)
{
metin=substitute(paste(z,sigma));print(z) #if i don¡¦t use 
print(z), in plot, only 3£m is seen.
abline(h=mean(x)+z*sd(x),col=red)
text(15,mean(x)+z*sd(x)-.1,col=red,metin)
}
else if(abs(z)==2)
{
metin=substitute(paste(z,sigma));print(z)
abline(h=mean(x)+z*sd(x),col=blue)
text(15,mean(x)+z*sd(x)-.1,col=blue,metin)
}
else if(abs(z)==1)
{
metin-substitute(paste(z,sigma));print(z)
abline(h=mean(x)+z*sd(x),col=green)
text(15,mean(x)+z*sd(x)-.1,col=green,metin)
}
else
{
metin=substitute(paste(mu))
abline(h=mean(x)+z*sd(x))
text(15,mean(x)+z*sd(x)-.1,metin)
}
}

Levent TERLEMEZ


[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] cvm.test in CvM2SL2Test package and loops....

2014-03-01 Thread Levent TERLEMEZ
Dear Users,

I have a problem with cvm.test using with for loop. It makes R crash while 
calculating. In the function, x and y are lists, also for loops controls the 
columns that will be tested:

function (x,y)
{
cval=matrix(ncol=dim(x)[2],nrow=dim(x)[2])
for(i in 1:(ncol(x)-1))
{
a-x[,i]
#print('a')
#print(a)
for(j in (i+1):ncol(x))
{
b-y[,j]
#print('b')
#print(b)
cval[i,j]-cvmts.test(a,b)
#print(ab)
}
}
return(cval)
}

Thanks for your kind helps in advanced,
Levent TERLEMEZ.


[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] fancyRpartPlot and the title at the bottom of the plot....

2014-01-06 Thread Levent TERLEMEZ
Dear Users,

Is there way to avoid the useless title (Rattle, date-time and user 
imformation) at the bottom of the fancyRpartPlot. We already referencing it why 
should it be there?

Thanks,
Levent.

[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] Arules and different item columns with same item labelsŠ.

2012-05-01 Thread Levent TERLEMEZ
Dear Users,

I have data that have different data columns (hair color, eye color, etc. ) 
with same item labels and I do not want to recode them like haircolor=brown, 
etc. Is it possible to do it automatically?

Thanks right now for your tips and given directions.
--
Levent TERLEMEZ


[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] assignment operator - does not work in a function...

2011-10-31 Thread Levent TERLEMEZ
Dear Users,

I have a little problem with assignment operator. It's working from command 
prompt but does not work same as in the command prompt in the function. Am I 
missing or forgetting something? The function is (tried on both 2.13.1 and 
2.13.2) as below using arules and arulseViz packages:

kuralfonk
function()
{
require(arules)
require(arulesViz)
veri-read.transactions(c:/RVerileri/BitirmeVeri.csv,sep=;,col=1)   
#This statement does not add veri object to working area
#itemFrequencyPlot(veri,type=absolute)
#bringToTop(-1)
summary(veri) #But this statement gives the right answer
itemFrequency(veri,type=absolute) #And this statement does nothing, 
even the graph window does not open.
}

Thanks for your tips and corrections,
Levent.

[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.


[R] R 2.13.1 console echo problem or am I wrong?

2011-09-14 Thread Levent TERLEMEZ
Dear Users,

I was using 2.12.1 version for arules and arulesViz, but I encountered with a 
problem. I wrote a small function that can also plotting with arulesViz. The 
problem occures while plotting command is on, console does not print other 
commands' results. So I put off the plot command, but this time only the last 
command's result printed in the console and also - operator did not put the 
result in the ls() output (all these commands run properly from console but I 
do not want to write everytime I need). First I thought that it was becaue of 
version, so uninstalled 2.12.1 and installed 2.13.1 but changed anything. The 
function code is below and I am using both Windows 7 and R in 64 Bit (32 Bit R 
did the same thing). I could not use R for a few years because of personal 
reasons, so I could not follow the changes if there are that I should.

Thanks in advance for your replies.

The Function:
function()
{
require(arules)
require(arulesViz)
veri-read.transactions(c:/RVerileri/BitirmeVeri.csv,sep=;,col=1)
#After this, veri can not be seen in the ls() output
itemFrequencyPlot(veri,type=absolute) 
  #This works fine (if this command is deleted)
summary(veri)   
 #No output in console (No output in console)
itemFrequency(veri,type=absolute) 
   #No output in console (This works fine)
}


[[alternative HTML version deleted]]

__
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, minimal, self-contained, reproducible code.