R တွင် italic font ကိုအသုံးပြုနည်း (ဥပမာများနှင့်အတူ)


R ကွက်များတွင် စာလုံးစောင်းစာလုံးတစ်ခုထုတ်လုပ်ရန် အောက်ပါအခြေခံအထားအသိုကိုသုံးနိုင်သည်။

 substitute(paste(italic(' this text is italic ')))

အောက်ပါဥပမာများသည် ဤ syntax ကိုလက်တွေ့တွင်မည်သို့အသုံးပြုရမည်ကိုပြသထားသည်။

ဥပမာ 1- ကွက်ကွက်ခေါင်းစဉ်ရှိ စာလုံးစောင်း

အောက်ပါကုဒ်သည် R ရှိကွက်တစ်ခု၏ခေါင်းစဉ်တွင် စာလုံးစောင်းစာလုံးကို မည်သို့အသုံးပြုရမည်ကို ပြသသည်-

 #define data
x <- c(1, 2, 3, 4, 4, 5, 6, 6, 7, 9)
y <- c(8, 8, 9, 10, 13, 12, 10, 11, 14, 17)

#create scatterplot with title in italics
plot(x, y, main = substitute(paste(italic(' Scatterplot of x vs. y ')))) 

R တွင် ကွက်ကွက်ခေါင်းစဉ်ရှိ စာလုံးစောင်း

ခေါင်းစဉ်အတွက်သာ စာလုံးအချို့အတွက် စာလုံးစောင်းစာလုံးကိုလည်း သတ်မှတ်နိုင်သည်ကို သတိပြုပါ-

 #create scatterplot with only some of title in italics
plot(x, y, main = substitute(paste(italic(' Scatterplot of '), ' x vs. y ')))

ဥပမာ 2- ကွက်ဝင်ရိုးအညွှန်းများပေါ်တွင် စာလုံးစောင်းလျားထိုးဖောင့်

အောက်ဖော်ပြပါ ကုဒ်သည် ကွက်ကွက်တစ်ခု၏ X နှင့် Y ဝင်ရိုးအညွှန်းများအတွက် စာလုံးစောင်းစာလုံးကို သတ်မှတ်နည်းကို ပြသည်-

 #define data
x <- c(1, 2, 3, 4, 4, 5, 6, 6, 7, 9)
y <- c(8, 8, 9, 10, 13, 12, 10, 11, 14, 17)

#create scatterplot with axes labels in italics
plot(x, y, xlab = substitute(paste(italic(' X Label '))),
           ylab = substitute(paste(italic(' Y Label '))))

ဥပမာ 3- လမ်းကြောင်းရှိ စာသားပါသော Italic ဖောင့်

အောက်ပါကုဒ်သည် လမ်းကြောင်းတစ်ခုအတွင်းရှိ စာသားဒြပ်စင်တစ်ခုအတွက် စာလုံးစောင်းပုံစံကို ထည့်သွင်းနည်းကို ပြသသည်-

 #define data
x <- c(1, 2, 3, 4, 4, 5, 6, 6, 7, 9)
y <- c(8, 8, 9, 10, 13, 12, 10, 11, 14, 17)

#create scatterplot
plot(x, y)

#add italic text at location x=3, y=16
text(3, 16, substitute(paste(italic(' This is some italic text ')))) 

ထပ်လောင်းအရင်းအမြစ်များ

အောက်ဖော်ပြပါ သင်ခန်းစာများသည် R တွင် အခြားဘုံလုပ်ဆောင်ချက်များကို မည်သို့လုပ်ဆောင်ရမည်ကို ရှင်းပြသည်-

R တွင်ကွက်ကွက်များပေါ်တွင် superscripts နှင့် subscript များထည့်နည်း
ggplot2 တွင် ဖောင့်အရွယ်အစားကို မည်သို့ပြောင်းလဲမည်နည်း။

မှတ်ချက်တစ်ခုထည့်ပါ။

သင့် email လိပ်စာကို ဖော်ပြမည် မဟုတ်ပါ။ လိုအပ်သော ကွက်လပ်များကို * ဖြင့်မှတ်သားထားသည်