Re: [R] Is it possible to right align text in R graphics?
Hello Tall, sorry for late reply. I meant just the direction of the closing parentheses. This is the way it should be (and is on my linux system) : http://myup.ir/images/93380129091837074902.png This is the way it is (on windows system) http://myup.ir/images/40188837660458525731.png On 1/3/12, Tal Galili tal.gal...@gmail.com wrote: Hello Majid, When you say the text renders correctly on one but not the other, you mean the fonts, or the directionality? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Tue, Jan 3, 2012 at 8:14 AM, Majid Einian einia...@gmail.com wrote: Incidentally, gMail (on Windows) correctly rendered the Hebrew (Shalom Olam), so it would seem that this probably is a plotting issue rather than an OS issue I tested a Persian text with this kind of parentheses in linux and windows, and it seem it is indeed an OS issue. The text renders correct on my linux 2.6.32 i686 system with R 2.14.1 but incorrect on my windows 7 (6.1.7600) 32 bit system with R 2.14.0. -- Majid Einian, PhD Candidate in Economics, Graduate School of Management and Economics, Sharif University of Technology, Tehran, IRAN -- Majid Einian, PhD Candidate in Economics, Graduate School of Management and Economics, Sharif University of Technology, Tehran, IRAN __ 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.
Re: [R] Is it possible to right align text in R graphics?
Hello Majid, When you say the text renders correctly on one but not the other, you mean the fonts, or the directionality? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Tue, Jan 3, 2012 at 8:14 AM, Majid Einian einia...@gmail.com wrote: Incidentally, gMail (on Windows) correctly rendered the Hebrew (Shalom Olam), so it would seem that this probably is a plotting issue rather than an OS issue I tested a Persian text with this kind of parentheses in linux and windows, and it seem it is indeed an OS issue. The text renders correct on my linux 2.6.32 i686 system with R 2.14.1 but incorrect on my windows 7 (6.1.7600) 32 bit system with R 2.14.0. -- Majid Einian, PhD Candidate in Economics, Graduate School of Management and Economics, Sharif University of Technology, Tehran, IRAN [[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.
Re: [R] Is it possible to right align text in R graphics?
Thanks to an e-mail from David, I realized that non-Hebrew speakers will not be able to know how a proper right-to-left output should look like (sorry for not thinking about it myself...) Here is some example code of how the output should look like vs how it currently looks. This is shown only for the main parameter, but the same issue will come up when using ?title or ?text Two points to mention again: 1) This is not a huge problem for me personally, but I believe that in the long term, if such an issue can be fixed, it would have been nice. It will allow all of the right-to-left languages to use R for plotting in their own language (That included, for example, all of the Arabic world... http://en.wikipedia.org/wiki/Right-to-left ). 2) I fear that this type of issue needs to be handled by someone familiar with the guts of the R graphics code. I am not even sure if I should post this here or on the R-devel mailing list. Your advise will be very welcome. Here is the example code: par(mfrow = c(1,2)) plot(1:10, main = ש××× (×קס×), sub = The order of text is not right to left) plot(1:10, main = (ש××× (×קס×, sub = This is how the output should have looked like) # A more complex example: plot(1:10, main = ש××× (×קס×) ××××¢ ×¢× Subject 1, sub = The order of text is not right to left) plot(1:10, main = Subject 1 ש××× (×קס×) ××××¢ ×¢×, sub = This is how the output should have looked like) # An even more complex example: par(mfrow = c(1,1)) plot(1:10, main = ש××× (×קס×) ××××¢ ×¢× Subject 1 ××× ×§×¦×ª ××××¢ ×¢× subject 2, sub = The order of text is not right to left) # I am not sure how to fix this actually... Happy new year, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Dec 29, 2011 at 6:52 PM, Tal Galili tal.gal...@gmail.com wrote: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ש××× (×קס×)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[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.
Re: [R] Is it possible to right align text in R graphics?
And I forgot to include the link to the image, here it is: http://dl.dropbox.com/u/5371432/right-to-left-text%20example%202.png On Wed, Jan 4, 2012 at 12:30 AM, Tal Galili tal.gal...@gmail.com wrote: Thanks to an e-mail from David, I realized that non-Hebrew speakers will not be able to know how a proper right-to-left output should look like (sorry for not thinking about it myself...) Here is some example code of how the output should look like vs how it currently looks. This is shown only for the main parameter, but the same issue will come up when using ?title or ?text Two points to mention again: 1) This is not a huge problem for me personally, but I believe that in the long term, if such an issue can be fixed, it would have been nice. It will allow all of the right-to-left languages to use R for plotting in their own language (That included, for example, all of the Arabic world... http://en.wikipedia.org/wiki/Right-to-left ). 2) I fear that this type of issue needs to be handled by someone familiar with the guts of the R graphics code. I am not even sure if I should post this here or on the R-devel mailing list. Your advise will be very welcome. Here is the example code: par(mfrow = c(1,2)) plot(1:10, main = ש××× (×קס×), sub = The order of text is not right to left) plot(1:10, main = (ש××× (×קס×, sub = This is how the output should have looked like) # A more complex example: plot(1:10, main = ש××× (×קס×) ××××¢ ×¢× Subject 1, sub = The order of text is not right to left) plot(1:10, main = Subject 1 ש××× (×קס×) ××××¢ ×¢×, sub = This is how the output should have looked like) # An even more complex example: par(mfrow = c(1,1)) plot(1:10, main = ש××× (×קס×) ××××¢ ×¢× Subject 1 ××× ×§×¦×ª ××××¢ ×¢× subject 2, sub = The order of text is not right to left) # I am not sure how to fix this actually... Happy new year, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Dec 29, 2011 at 6:52 PM, Tal Galili tal.gal...@gmail.com wrote: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ש××× (×קס×)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[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.
Re: [R] Is it possible to right align text in R graphics?
FYI, if you're looking for the technical term for this type of text it's bidi: http://en.wikipedia.org/wiki/Bi-directional_text Hadley On Tue, Jan 3, 2012 at 4:32 PM, Tal Galili tal.gal...@gmail.com wrote: And I forgot to include the link to the image, here it is: http://dl.dropbox.com/u/5371432/right-to-left-text%20example%202.png On Wed, Jan 4, 2012 at 12:30 AM, Tal Galili tal.gal...@gmail.com wrote: Thanks to an e-mail from David, I realized that non-Hebrew speakers will not be able to know how a proper right-to-left output should look like (sorry for not thinking about it myself...) Here is some example code of how the output should look like vs how it currently looks. This is shown only for the main parameter, but the same issue will come up when using ?title or ?text Two points to mention again: 1) This is not a huge problem for me personally, but I believe that in the long term, if such an issue can be fixed, it would have been nice. It will allow all of the right-to-left languages to use R for plotting in their own language (That included, for example, all of the Arabic world... http://en.wikipedia.org/wiki/Right-to-left ). 2) I fear that this type of issue needs to be handled by someone familiar with the guts of the R graphics code. I am not even sure if I should post this here or on the R-devel mailing list. Your advise will be very welcome. Here is the example code: par(mfrow = c(1,2)) plot(1:10, main = שלום (טקסט), sub = The order of text is not right to left) plot(1:10, main = (שלום (טקסט, sub = This is how the output should have looked like) # A more complex example: plot(1:10, main = שלום (טקסט) מידע על Subject 1, sub = The order of text is not right to left) plot(1:10, main = Subject 1 שלום (טקסט) מידע על, sub = This is how the output should have looked like) # An even more complex example: par(mfrow = c(1,1)) plot(1:10, main = שלום (טקסט) מידע על Subject 1 וגם קצת מידע על subject 2, sub = The order of text is not right to left) # I am not sure how to fix this actually... Happy new year, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Dec 29, 2011 at 6:52 PM, Tal Galili tal.gal...@gmail.com wrote: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = שלום (טקסט)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[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. -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ __ 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.
Re: [R] Is it possible to right align text in R graphics?
On Jan 3, 2012, at 5:32 PM, Tal Galili wrote: And I forgot to include the link to the image, here it is: http://dl.dropbox.com/u/5371432/right-to-left-text%20example%202.png I'm assuming this should be compared to the second of your three examples. The aleph ( ש ) is on the left end of both titles. I did notice in the process of deleting some inserted Hebrew letters at the command line of the MacGUI that at one point the r-prompt () got swapped to the right end of the glyph sequence. It also appears that the Mac supports different inserion modes. Further testing shows that back-quoted Hebrew text will cause that right-positioning to occur: (But when I paste the formula into my mail the reversal diappears;) יים` ~ `שלוש` I also searched on reverse hebrew in RSiteSearch, finding your questions from last year. The test you offered ran without difficulty on a Mac (since the file at you website is still up). There is mention of a BiDi (bidirectional) class in package Unicode. And there is a help page for: http://finzi.psych.upenn.edu/R/library/RGtk2/html/pango-Bidirectional-Text.html sessionInfo() R version 2.14.0 Patched (2011-11-13 r57650) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 -- David. On Wed, Jan 4, 2012 at 12:30 AM, Tal Galili tal.gal...@gmail.com wrote: Thanks to an e-mail from David, I realized that non-Hebrew speakers will not be able to know how a proper right-to-left output should look like (sorry for not thinking about it myself...) Here is some example code of how the output should look like vs how it currently looks. This is shown only for the main parameter, but the same issue will come up when using ?title or ?text Two points to mention again: 1) This is not a huge problem for me personally, but I believe that in the long term, if such an issue can be fixed, it would have been nice. It will allow all of the right-to-left languages to use R for plotting in their own language (That included, for example, all of the Arabic world... http://en.wikipedia.org/wiki/Right-to-left ). 2) I fear that this type of issue needs to be handled by someone familiar with the guts of the R graphics code. I am not even sure if I should post this here or on the R-devel mailing list. Your advise will be very welcome. Here is the example code: par(mfrow = c(1,2)) plot(1:10, main = שלום (טקסט), sub = The order of text is not right to left) plot(1:10, main = (שלום (טקסט, sub = This is how the output should have looked like) # A more complex example: plot(1:10, main = שלום (טקסט) מידע על Subject 1, sub = The order of text is not right to left) plot(1:10, main = Subject 1 שלום (טקסט) מידע על, sub = This is how the output should have looked like) # An even more complex example: par(mfrow = c(1,1)) plot(1:10, main = שלום (טקסט) מידע על Subject 1 וגם קצת מידע על subject 2, sub = The order of text is not right to left) # I am not sure how to fix this actually... Happy new year, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Dec 29, 2011 at 6:52 PM, Tal Galili tal.gal...@gmail.com wrote: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = שלום (טקסט)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- David Winsemius, MD West Hartford, CT __ 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.
Re: [R] Is it possible to right align text in R graphics?
Incidentally, gMail (on Windows) correctly rendered the Hebrew (Shalom Olam), so it would seem that this probably is a plotting issue rather than an OS issue I tested a Persian text with this kind of parentheses in linux and windows, and it seem it is indeed an OS issue. The text renders correct on my linux 2.6.32 i686 system with R 2.14.1 but incorrect on my windows 7 (6.1.7600) 32 bit system with R 2.14.0. -- Majid Einian, PhD Candidate in Economics, Graduate School of Management and Economics, Sharif University of Technology, Tehran, IRAN [[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.
Re: [R] Is it possible to right align text in R graphics?
Hi Duncan, Thank you for your reply. I am also using Win 7. And I would be surprised if this would be different in any OS. I guess the answer is that there is no way for making text in a graph in R be right-to-left. Thanks again, and happy new year, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Sun, Jan 1, 2012 at 5:34 AM, Duncan Mackay mac...@northnet.com.auwrote: Hi Tal I think it might be an OS problem whether it is a graphics as well I do not know. I Just copied and pasted the line into R and it seems ok OS win 7 version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 14.1 year 2011 month 12 day22 svn rev57956 language R version.string R version 2.14.1 (2011-12-22) Regards Regards Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email: home mac...@northnet.com.au At 02:52 30/12/2011, you wrote: Content-Type: text/plain Content-Disposition: inline Content-length: 796 Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ש××× (×קס×)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--**--**--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --**--** --** [[alternative HTML version deleted]] __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[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.
Re: [R] Is it possible to right align text in R graphics?
I don't know any language other than English, much less one written right-to-left, but a quick search shows that the RGtk2 package includes some support for such things. My gut reaction is that right-to-left support would be highly device dependent, and since devices often interact closely with the OS, that support could well be affected by choice of and configuration of OS. I recommend that your keep your mind open, and when someone indicates that your example works for them and shows OS/R version information to go along with that result (as recommended in the posting guide), you probably should respond with similar information since it appears to be relevant. On Sun, 1 Jan 2012, Tal Galili wrote: Hi Duncan, Thank you for your reply. I am also using Win 7. And I would be surprised if this would be different in any OS. I guess the answer is that there is no way for making text in a graph in R be right-to-left. Thanks again, and happy new year, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Sun, Jan 1, 2012 at 5:34 AM, Duncan Mackay mac...@northnet.com.auwrote: Hi Tal I think it might be an OS problem whether it is a graphics as well I do not know. I Just copied and pasted the line into R and it seems ok OS win 7 version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 14.1 year 2011 month 12 day22 svn rev57956 language R version.string R version 2.14.1 (2011-12-22) Regards Regards Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email: home mac...@northnet.com.au At 02:52 30/12/2011, you wrote: Content-Type: text/plain Content-Disposition: inline Content-length: 796 Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ??? ()) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--**--**--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --**--** --** [[alternative HTML version deleted]] __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k __ 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.
Re: [R] Is it possible to right align text in R graphics?
Tal, Plese look at this thread https://stat.ethz.ch/pipermail/r-help/2011-October/292786.html right justify right-axis tick values in lattice and see if the function provided by David Winsemius will work for you. I included it in the HH package as HH:::panel.axis.right Rich On Sun, Jan 1, 2012 at 2:35 PM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote: I don't know any language other than English, much less one written right-to-left, but a quick search shows that the RGtk2 package includes some support for such things. My gut reaction is that right-to-left support would be highly device dependent, and since devices often interact closely with the OS, that support could well be affected by choice of and configuration of OS. I recommend that your keep your mind open, and when someone indicates that your example works for them and shows OS/R version information to go along with that result (as recommended in the posting guide), you probably should respond with similar information since it appears to be relevant. On Sun, 1 Jan 2012, Tal Galili wrote: Hi Duncan, Thank you for your reply. I am also using Win 7. And I would be surprised if this would be different in any OS. I guess the answer is that there is no way for making text in a graph in R be right-to-left. Thanks again, and happy new year, Tal Contact Details:--**--**--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --**--** --** On Sun, Jan 1, 2012 at 5:34 AM, Duncan Mackay mac...@northnet.com.au wrote: Hi Tal I think it might be an OS problem whether it is a graphics as well I do not know. I Just copied and pasted the line into R and it seems ok OS win 7 version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 14.1 year 2011 month 12 day22 svn rev57956 language R version.string R version 2.14.1 (2011-12-22) Regards Regards Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email: home mac...@northnet.com.au At 02:52 30/12/2011, you wrote: Content-Type: text/plain Content-Disposition: inline Content-length: 796 Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ??? ()) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--**--**--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --**--** -- [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-helphttps://stat.ethz.ch/mailman/**listinfo/r-help https://stat.**ethz.ch/mailman/listinfo/r-**helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/**http://www.r-project.org/** posting-guide.html http://www.R-project.org/**posting-guide.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-helphttps://stat.ethz.ch/mailman/**listinfo/r-help https://stat.**ethz.ch/mailman/listinfo/r-**helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/**http://www.r-project.org/** posting-guide.html http://www.R-project.org/**posting-guide.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] --**--** --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
Re: [R] Is it possible to right align text in R graphics?
Hi Tal I think it might be an OS problem whether it is a graphics as well I do not know. I Just copied and pasted the line into R and it seems ok OS win 7 version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 14.1 year 2011 month 12 day22 svn rev57956 language R version.string R version 2.14.1 (2011-12-22) Regards Regards Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email: home mac...@northnet.com.au At 02:52 30/12/2011, you wrote: Content-Type: text/plain Content-Disposition: inline Content-length: 796 Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ש××× (×קס×)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[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-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.
Re: [R] Is it possible to right align text in R graphics?
Hi Bert, Thank you for the idea - but this will only move the text to different sides of the text... Right-to-left languages are a known issue in open source projects (libreoffice, WordPress, etc...) Any advice on who should I contact regarding this? (Not that it is urgent for me, but long term - this is a relevant feature for using R for non English outputs) Happy new year everyone, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Fri, Dec 30, 2011 at 12:48 AM, Bert Gunter gunter.ber...@gene.comwrote: Tal: Does the adj argument for ?par (and also in text()) not do this for you? Incidentally, gMail (on Windows) correctly rendered the Hebrew (Shalom Olam), so it would seem that this probably is a plotting issue rather than an OS issue. However, I confess that my knees turn to jelly with discussions of locales and non-standard: fonts, so maybe I'm wrong about this. Cheers, Bert On Thu, Dec 29, 2011 at 2:18 PM, Tal Galili tal.gal...@gmail.com wrote: Thank you for the reply Jean, but no, it would not fix it :) plot(1:10, main=rev.string(ש××× (×¢×××))) What would fix it is if I had added a number after the parenthesis, but that is a hack, not a solution... plot(1:10, main=ש××× (×¢×××) 1) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Fri, Dec 30, 2011 at 12:12 AM, Jean V Adams jvad...@usgs.gov wrote: Tal Galili wrote on 12/29/2011 10:52:55 AM: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = éÃÅÃâ¢Ã (ÃËçáÃË)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- I'm not sure if this is what you're after, but this function reverses the string, character by character and swaps parentheses around. rev.string - function(x) { revx.indiv - rev(unlist(strsplit(x, ))) revx.indiv2 - revx.indiv revx.indiv2[revx.indiv==(] - ) revx.indiv2[revx.indiv==)] - ( paste(revx.indiv2, collapse=) } plot(1:10, main=rev.string(éÃ?Ã?à (Ã?çáÃ?))) Jean [[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. -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm [[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] Is it possible to right align text in R graphics?
Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ש××× (×קס×)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[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.
Re: [R] Is it possible to right align text in R graphics?
Tal Galili wrote on 12/29/2011 10:52:55 AM: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ש×?×?× (×?קס×?)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- I'm not sure if this is what you're after, but this function reverses the string, character by character and swaps parentheses around. rev.string - function(x) { revx.indiv - rev(unlist(strsplit(x, ))) revx.indiv2 - revx.indiv revx.indiv2[revx.indiv==(] - ) revx.indiv2[revx.indiv==)] - ( paste(revx.indiv2, collapse=) } plot(1:10, main=rev.string(ש×?×?× (×?קס×?))) Jean [[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.
Re: [R] Is it possible to right align text in R graphics?
Thank you for the reply Jean, but no, it would not fix it :) plot(1:10, main=rev.string(ש××× (×¢×××))) What would fix it is if I had added a number after the parenthesis, but that is a hack, not a solution... plot(1:10, main=ש××× (×¢×××) 1) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Fri, Dec 30, 2011 at 12:12 AM, Jean V Adams jvad...@usgs.gov wrote: Tal Galili wrote on 12/29/2011 10:52:55 AM: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = éÃÅÃâ¢Ã (ÃËçáÃË)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- I'm not sure if this is what you're after, but this function reverses the string, character by character and swaps parentheses around. rev.string - function(x) { revx.indiv - rev(unlist(strsplit(x, ))) revx.indiv2 - revx.indiv revx.indiv2[revx.indiv==(] - ) revx.indiv2[revx.indiv==)] - ( paste(revx.indiv2, collapse=) } plot(1:10, main=rev.string(éÃ?Ã?à (Ã?çáÃ?))) Jean [[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.
Re: [R] Is it possible to right align text in R graphics?
Tal: Does the adj argument for ?par (and also in text()) not do this for you? Incidentally, gMail (on Windows) correctly rendered the Hebrew (Shalom Olam), so it would seem that this probably is a plotting issue rather than an OS issue. However, I confess that my knees turn to jelly with discussions of locales and non-standard: fonts, so maybe I'm wrong about this. Cheers, Bert On Thu, Dec 29, 2011 at 2:18 PM, Tal Galili tal.gal...@gmail.com wrote: Thank you for the reply Jean, but no, it would not fix it :) plot(1:10, main=rev.string(שלום (עולם))) What would fix it is if I had added a number after the parenthesis, but that is a hack, not a solution... plot(1:10, main=שלום (עולם) 1) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Fri, Dec 30, 2011 at 12:12 AM, Jean V Adams jvad...@usgs.gov wrote: Tal Galili wrote on 12/29/2011 10:52:55 AM: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = ×©×œ×•× (טקסט)) Is there a way to make sure the text is displayed from right to left? Many thanks for any suggestions, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- I'm not sure if this is what you're after, but this function reverses the string, character by character and swaps parentheses around. rev.string - function(x) { revx.indiv - rev(unlist(strsplit(x, ))) revx.indiv2 - revx.indiv revx.indiv2[revx.indiv==(] - ) revx.indiv2[revx.indiv==)] - ( paste(revx.indiv2, collapse=) } plot(1:10, main=rev.string(ש×?×?× (×?קס×?))) Jean [[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. -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm __ 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.