הוספת מרכאות - בתוך טקסט

147 views
Skip to first unread message

Tom Haber

unread,
Nov 12, 2015, 7:18:27 AM11/12/15
to Israel R User Group

שלום לכולם  ,

אני מנסה ליצור מחרוזת כך שבתוך המחרוזת יהיה לי מרכאות, 

למשל אני מעוניין לעשות :    "("TEXT(M555,"mm/dd/yyyy" 

כל שהמראות מבחוץ מסמלות כמובן את המחרוזת ואני מעוניין שבתוך המחרוזת על חלק מסוים יהיה גם מרכאות , במקרה כאן מעוניין שיהיה על mm/dd/yyyy

האם מישהו יודע איך עושים את ב-R בבקשה , אני גם בעצם מאחד גם שני מחרוזת נפרדים למחרזות אחת, המחרוזת הראשונה היא   ",TEXT(M555"  והמחרוזת השנייה היא " "(mm/dd/yyyy" "

ניסיתי גם לעשות על ידי \ ולא הצליח לי

תודה רבה ,

Tal Galili

unread,
Nov 12, 2015, 7:22:21 AM11/12/15
to israel-r-...@googlegroups.com
תשתמש בגרש אחד שיעטוף את הטקסט עם הגירשיים. 
השילוב יאפשר לך לעשות את זה. 

Sent from a smart-phone
--
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.

Tom Haber

unread,
Nov 12, 2015, 7:30:05 AM11/12/15
to Israel R User Group

תודה על המענה המהיר , אבל זה משהו שגם ניסיתי ולא עובד , הגרש אחד שעוטף בעצם יוצר לנו את הסימן של לוכסן \
 

האם יש דרך אחרת ?  
 

Ariel Telpaz

unread,
Nov 12, 2015, 7:37:12 AM11/12/15
to Israel R User Group
הפתרון של טל אמור לעבוד. בשביל לראות את המחרוזת תשתמש ב()cat (ולא בprint) ואז הוא יראה לך אותה בלי הלוכסנים. 


בתאריך יום חמישי, 12 בנובמבר 2015 בשעה 14:30:05 UTC+2, מאת Tom Haber:

Tom Haber

unread,
Nov 12, 2015, 9:55:22 AM11/12/15
to Israel R User Group
תודה רבה על המענה ,

בהקשר של התשובה עם cat ,  האם יש אפשרות ליצור משתנה חדש נגיד x מפונקצית cat ?

כלומר שתוצאת cat תהיה משתנה חדש , 
 
 

Tal Galili

unread,
Nov 12, 2015, 9:56:33 AM11/12/15
to israel-r-...@googlegroups.com
תום, לא כל כך ברור לי לאן אתה שואף.
בכל מקרה, שים לב שיש הבדל בין איך שהאובייקט נשמר ב-R לבין איך שהוא מודפס על המסך.



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


--

amit gal

unread,
Nov 12, 2015, 10:40:23 AM11/12/15
to israel-r-...@googlegroups.com

שים לוכסן הפוך לפני כל גרשיים פניציים. אמור לעבוד.

Ariel Telpaz

unread,
Nov 12, 2015, 11:09:03 AM11/12/15
to israel-r-...@googlegroups.com

אולי נוכל יותר לעזור אם תגיד  מה המטרה שלך

בתאריך 12 בנוב' 2015 16:55,‏ "Tom Haber" <tomha...@gmail.com> כתב:
תודה רבה על המענה ,

בהקשר של התשובה עם cat ,  האם יש אפשרות ליצור משתנה חדש נגיד x מפונקצית cat ?

כלומר שתוצאת cat תהיה משתנה חדש , 
 
 

--

Tom Haber

unread,
Nov 12, 2015, 12:11:18 PM11/12/15
to Israel R User Group
המטרה הסופית שלי היא ליצור וקטור של תצפיות כמו :
=if(not(isblank(M1)),TEXT(M1, "mm/dd/yyyy" ),)
=if(not(isblank(M2)),TEXT(M2, "mm/dd/yyyy" ),) 
=if(not(isblank(M3)),TEXT(M3, "mm/dd/yyyy" ),)

וכך הלאה , מה עצות שלכם בנוגע לפונקצית cat הצלחתי ליצור את המחרוזת הזאת, אך זה מודפס למסך ללא מרכאות על כל המחרזות

השאלה היא האם ניתן ליצור וקטור ולמעשה איך ניתן להכניס ערך שהתקבל מפונקצית cat לתוך משתנה

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

Yoni Sidi

unread,
Nov 12, 2015, 1:18:36 PM11/12/15
to Israel R User Group
is this for excel cell formula's or to paste in vb?

Tom Haber

unread,
Nov 12, 2015, 1:20:21 PM11/12/15
to israel-r-...@googlegroups.com

משהו כזה..

בסופו של דבר זה וקטור שהוא חלק מסט נתונים שאחר כך אשמור כאקסל ואעלה לגוגל שיטס.

בתאריך 12 בנוב׳ 2015 8:18 PM,‏ "Yoni Sidi" <yon...@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/L-reXB8dwJA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-g...@googlegroups.com.

Yoni Sidi

unread,
Nov 12, 2015, 1:22:53 PM11/12/15
to Israel R User Group
so what is the whole example? 

so we can help you faster
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.

Tom Haber

unread,
Nov 12, 2015, 1:25:16 PM11/12/15
to israel-r-...@googlegroups.com

הסתדרתי עם הכל.
אם רק אצליח להכניס את המחרוזת שאני מקבל מפונקצית cat למשתנה אסיים..משם זה לא בעיה להצליח.
ניסיתי לשמור כקובץ טסט תחת הפקודה  cat ולהעלות שוב אבל לא יצא לי בשלמותו

בתאריך 12 בנוב׳ 2015 8:22 PM,‏ "Yoni Sidi" <yon...@gmail.com> כתב:
To unsubscribe from this group and all its topics, 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 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/L-reXB8dwJA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-g...@googlegroups.com.

Yoni Sidi

unread,
Nov 12, 2015, 1:38:19 PM11/12/15
to Israel R User Group
is this what you are trying to do?

> data.frame(x=paste0('=if(not(isblank(M',seq(1,3),')),TEXT(M',seq(1,3),',"mm/dd/yyyy"),)'))

                                             x
1 =if(not(isblank(M1)),TEXT(M1,"mm/dd/yyyy"),)
2 =if(not(isblank(M2)),TEXT(M2,"mm/dd/yyyy"),)
3 =if(not(isblank(M3)),TEXT(M3,"mm/dd/yyyy"),)



On Thursday, November 12, 2015 at 8:25:16 PM UTC+2, Tom Haber wrote:

הסתדרתי עם הכל.
אם רק אצליח להכניס את המחרוזת שאני מקבל מפונקצית cat למשתנה אסיים..משם זה לא בעיה להצליח.
ניסיתי לשמור כקובץ טסט תחת הפקודה  cat ולהעלות שוב אבל לא יצא לי בשלמותו

בתאריך 12 בנוב׳ 2015 8:22 PM,‏ "Yoni Sidi" <yon...@gmail.com> כתב:
so what is the whole example? 

so we can help you faster

On Thursday, November 12, 2015 at 8:20:21 PM UTC+2, Tom Haber wrote:

משהו כזה..

בסופו של דבר זה וקטור שהוא חלק מסט נתונים שאחר כך אשמור כאקסל ואעלה לגוגל שיטס.

בתאריך 12 בנוב׳ 2015 8:18 PM,‏ "Yoni Sidi" <yon...@gmail.com> כתב:
is this for excel cell formula's or to paste in vb?

On Thursday, November 12, 2015 at 7:11:18 PM UTC+2, Tom Haber wrote:
המטרה הסופית שלי היא ליצור וקטור של תצפיות כמו :
=if(not(isblank(M1)),TEXT(M1, "mm/dd/yyyy" ),)
=if(not(isblank(M2)),TEXT(M2, "mm/dd/yyyy" ),) 
=if(not(isblank(M3)),TEXT(M3, "mm/dd/yyyy" ),)

וכך הלאה , מה עצות שלכם בנוגע לפונקצית cat הצלחתי ליצור את המחרוזת הזאת, אך זה מודפס למסך ללא מרכאות על כל המחרזות

השאלה היא האם ניתן ליצור וקטור ולמעשה איך ניתן להכניס ערך שהתקבל מפונקצית cat לתוך משתנה

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

--
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/L-reXB8dwJA/unsubscribe.
To unsubscribe from this group and all its topics, 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 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/L-reXB8dwJA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.

Tom Haber

unread,
Nov 12, 2015, 1:46:22 PM11/12/15
to israel-r-...@googlegroups.com

כן משהו כזה

רק שבמקום להשתמש בseq רצתי על לולאה כמספר שורות שיש לי בסט נתונים.

בתאריך 12 בנוב׳ 2015 8:38 PM,‏ "Yoni Sidi" <yon...@gmail.com> כתב:
To unsubscribe from this group and all its topics, 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 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/L-reXB8dwJA/unsubscribe.
To unsubscribe from this group and all its topics, 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 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/L-reXB8dwJA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-g...@googlegroups.com.

Yoni Sidi

unread,
Nov 12, 2015, 2:18:10 PM11/12/15
to Israel R User Group
replace seq with your data vector. paste loops it for you.

Tom Haber

unread,
Nov 12, 2015, 2:28:26 PM11/12/15
to israel-r-...@googlegroups.com

Cool thank you ;)

בתאריך 12 בנוב׳ 2015 21:18,‏ "Yoni Sidi" <yon...@gmail.com> כתב:
replace seq with your data vector. paste loops it for you.

Reply all
Reply to author
Forward
0 new messages