Please See in Console
1.
Result is correct
2.
Result is correct
3.
Result is not correct.
String Manipulation
1.Check Information of any variable
use for check value of variable whether string or others. Why we need to check value of variable .Every programmer that learned R-programming, know that we use variable in R
by assign value not define type like other programming (c ,C++, C#, Java...). To understand well please see examples below:
1.2/function as.character(str)
use for convert value of variable that is not string to string. Above example variable "st2" store value that have type as Number not character so if you want to convert it strin you use function as.character(str). please sea example below:
1.3/function nchar(str)
used for count number of string variable. please see example below
No comments:
Post a Comment