In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "what are the constant knowledge points of R language". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "what are the constant knowledge points of R language" can help you solve the problem.
The basic data types of r language are numeric, logical (true, false), text (string). Missing values are supported and there are special plural types.
Constants are values written directly in the program.
Numerical constants include integer, single precision, double precision and so on, which generally do not need to be distinguished. Such as 123, 123.45,-123.45,-0.012, 123,-1.2e-2, etc. To indicate that 123 is an integer, it can be written as 123l.
Character-type constants are surrounded by two double apostrophes or two single apostrophes, such as "li ming" or'li ming'. The character type supports Chinese, such as "Li Ming" or "Li Ming". The main Chinese codes in China are gbk coding and utf-8 coding, and sometimes they encounter the problem of garbled codes caused by coding errors. R programs under ms windows generally use gbk coding, but rstudio software uses utf-8 coding. In r software, strings are generally saved using utf-8 coding.
Logical constants are only true and false.
The missing value is represented by na. Missing values are often encountered in statistical calculation, indicating that records are lost, cannot be used because of errors, there is no data on holidays, and so on. In addition to numeric values, logical and character types can also have missing values, and the white space values of character types are not automatically identified as missing values and need to be specified by themselves. R supports a special info value, which is a real value that represents positive infinity and is not a missing value.
Complex constant writing methods such as 2.2 + 3.5i, 1i, etc.
Knowledge point expansion:
Constant
The constants in r are basically divided into four types: logical, numerical, character and factor. Here is the command to generate the factor:
X
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.