קידוד עברית ב-RSTUDIO

681 views
Skip to first unread message

דור לביא

unread,
Dec 19, 2015, 1:20:34 PM12/19/15
to Israel R User Group
שלום לכולם,

אתחיל עם פרטים טכנים
יש לי ווינדוס 10 באנגלית 
   0.99.489 גרסת RSTUDIO
R גרסת 3.2.3 
כמובן 64 BIT

יש לי בעיה עם הקידוד בעברית, הבעיה התחילה מכיוון שרכשתי מחשב חדש
נראה לי שהכי קל להסביר את הבעיה בתמונות אז בבקשה





































כאשר אני מסתכל על הנתונים הם בגיבריש אותו דבר קורא כשאני מנסה להדפיס אותם לדוגמא





























אז עשיתי
Sys.setlocale("LC_ALL", "hebrew")
ואז הסתדרה התצוגה אך ההדפסה בקונסול עדיין לא עובדת

אז המרתי את העמודות הרלוונטיות ע"י הפקודה הבאה
CombinePhase1$street <- enc2utf8(CombinePhase1$street)
ואז הסתדרה גם ההדפסה בקונסול

אחרי כל הסיפור הארוך הזה הבעיה שלי היא שאני צריך לכתוב את הפקודה
Sys.setlocale("LC_ALL", "hebrew")
בכל פעם שאני פותח את RSTUIO
האם יש דרך לשנות את ברירת המחדל?
או לחילופין דרך יותר מהירה לפתור את כל הבעיות שהזכרתי למעלה?

תודה מראש לכל העוזרים!

Erez Ben-Moshe

unread,
Dec 20, 2015, 1:10:38 AM12/20/15
to Israel R User Group
הייתה לי אותה בעיה והשורה הזו עזרה:


Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")

Tal Galili

unread,
Dec 20, 2015, 2:24:29 AM12/20/15
to israel-r-...@googlegroups.com
דרך יחסית זריזה להוסיף שורות שיופעלו בתחילת ההרצה של R זה דרך הפונקציה add_to_.First_in_Rprofile.site שבחבילה installr:
install.packages('installr')
library(installr)
add_to_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')
#check it was added:
is_in_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')


----------------Contact Details:-------------------------------------------------------
Contact me: Tal.G...@gmail.com
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)
----------------------------------------------------------------------------------------------


--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

דור לביא

unread,
Dec 20, 2015, 11:01:08 AM12/20/15
to Israel R User Group
,נשמעת כמו אחלה דרך, אך התקנתי את החבילה והיא אומרת לי שאין פקודה כזו זה הפלט המלא.ך
> library(installr)

Welcome to installr version 0.17.0

More information is available on the installr project website:

Suggestions and bug-reports can be submitted at: https://github.com/talgalili/installr/issues

To suppress this message use:
suppressPackageStartupMessages(library(installr))

> add_to_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')
Error: could not find function "add_to_.First_in_Rprofile.site"
 




To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.

דור לביא

unread,
Dec 20, 2015, 11:02:47 AM12/20/15
to Israel R User Group
כן כמו שכתבתי גם לי זה עזר חלקית, זה פשוט מציק לכתוב את הפקודה הזו כל פעם מחדש כשפותחים R אז אני מחפש דרך אוטומטית

Tal Galili

unread,
Dec 20, 2015, 1:36:10 PM12/20/15
to israel-r-...@googlegroups.com
טעות שלי, אני רואה שאין גישה ישירה לפונקציה שבחבילה (שכחתי שזו פונקציה פנימית שכתבתי). הנה קוד מעודכן שאמור לעבוד:

install.packages('installr')
library(installr)
installr:::add_to_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')
#check it was added:
installr:::is_in_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')






----------------Contact Details:-------------------------------------------------------
Contact me: Tal.G...@gmail.com
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)
----------------------------------------------------------------------------------------------


To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

דור לביא

unread,
Dec 22, 2015, 11:24:31 AM12/22/15
to Israel R User Group
אחלה!
עובד מעולה!!
אתה יכול להסביר לי מה ההבדל? או שאלה יותר מדויקת : מה המשמעות של 3 פעמים נקודותיים
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.

Tal Galili

unread,
Dec 24, 2015, 2:46:24 PM12/24/15
to israel-r-...@googlegroups.com
כשבונים חבילה אפשר להחליט איזה פונקציות נגישות למשתמש ואיזה פונקציות הן פנימיות לחבילה.
הסימון :::
נותן לך גישה לפונקציה שנמצאת בתוך חבילה גם אם הן פנימיות.



----------------Contact Details:-------------------------------------------------------
Contact me: Tal.G...@gmail.com
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)
----------------------------------------------------------------------------------------------


אחלה!
עובד מעולה!!
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

ygu...@gmail.com

unread,
Jun 23, 2016, 2:03:37 AM6/23/16
to Israel R User Group

 שלום ,

יש לי את הבעיה של קריאת קבצים עם טקסט בעברית, כאשר במקום הטקסט אני מקבל "ג'יבריש". אני עובד ב- Windows, ומשתמש ב- MS R Open Rgui 3.2.5, Rstudio 0.99.896. ניסיתי את כל הדברים שהוזכרו בפורום זה, זה לא עוזר.

הורדתי installr והרצתי:

installr:::add_to_.First_in_Rprofile.site(‘Sys.setlocale(category = “LC_ALL”, locale = “Hebrew_Israel.1255”)’)

קיבלתי הודעת שגיה:

error in file(con, “w”): cannot open the connection

 

האם יש הצעות מה לעשות?

 

בתודה מראש,

 

יורי גובמן

אחלה!
עובד מעולה!!
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.

ygu...@gmail.com

unread,
Jun 23, 2016, 2:27:20 AM6/23/16
to Israel R User Group
עדכון - הצלחתי להריץ, לא עוזר 

Jonathan Rosenblatt

unread,
Jun 29, 2016, 12:18:39 PM6/29/16
to israel-r-user-group
קודם כל כדאי לבודד את הבעייה: האם הבעייה היא בייצוג הפנימי של המידע, או בהצגה שלו.
לצורך כך מציע ש:
- תתבונן הקובת המקורי לוודא שהוא אכן תקין.
- תייבא ותייצא את הקובץ. אם הוא נראה תקין הרי שהבעייה בהצגה שלו ב- R, ולא בייצוג המידע בזיכרון. 
- אם לא נראה תקין, הרי שהבעייה בהגדרות הייבוא (read.table?)

אחלה!
עובד מעולה!!
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Jonathan Rosenblatt
Dept. of Industrial Engineering and Management
Ben Gurion University of the Negev

Yury Gubman

unread,
Jun 29, 2016, 3:51:16 PM6/29/16
to israel-r-...@googlegroups.com
תודה,

על מנת לסדר היה צריך להריץ את הקוד של טל ב- Rgui 3.2.5 ולא ב- R-Studio
עדיין נשארה בעיה של הצגת תוכן, אבל הטקסט נשמר נכון וניתן לבצע עיבודים. 

בברכה,
יורי

Dr. Yury Gubman

Project Manager, Statistics

Jerusalem, Israel

Tel. +972-54-5717409

Mail: ygu...@gmail.com


--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/Luhy1eb5QOA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-g...@googlegroups.com.

haba...@gmail.com

unread,
Aug 21, 2016, 5:24:05 AM8/21/16
to Israel R User Group
היי,
הרצנו את הקוד הבא: (מה שטל אמר)
install.packages('installr')
library(installr)
installr:::add_to_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')
#check it was added:
installr:::is_in_.First_in_Rprofile.site('Sys.setlocale(category = "LC_ALL", locale = "Hebrew_Israel.1255")')
:וקיבלנו את השגיאה הבאה

Error in file(con, "w") : cannot open the connection
In addition: Warning message:
In file(con, "w") :
  cannot open file 'C:/PROGRA~1/R/R-33~1.1/etc/Rprofile.site': Permission denied
?למישהו יש עוד רעיון
.תודה

Reply all
Reply to author
Forward
0 new messages