# Goals: To write functions
#To write functions that send back multiple objects.
# FIRST LEARN ABOUT LISTS --
X = list(height=5.4, weight=54)
print("Use default printing --")
print(X)
print("Accessing individual elements --")
cat("Your height is ", X$height, " and your weight is ", X$weight, "\n")
# FUNCTIONS --
square <- function(x) {
在R中,1等于TRUE,0等于FALSE。以上等式中,符号的优先顺序为()、!、==。因些,等式中,首先计算(7==6),结果为FALSE;然后再进行!运算,结果为TRUE。TRUE再与1进行==计算,得到整个计算结果为TRUE。