y,X1,X2,X3 分别表示第 t 年各项税收收入(亿元),某国生产总值GDP(亿元),财政支出(亿元)和商品零售价格指数(%). (1) 建立线性模型: ① 自己编写函数: > library(openxlsx) > data = read.xlsx("22_data.xlsx",sheet = 1) > x = data[,-c(1,2)] > x = cbind(rep(1,17),x) > x_mat = as.matrix(x) > y
Graphical Parameters You can customize many features of your graphs (fonts, colors, axes, titles) through graphic options. One way is to specify these options in through the par( ) function. If you set parameter values here, the changes will be in ef
这个函数提取字符串的一部分. 语法 substring()函数的基本语法是: substring(x,first,last) 以下是所使用的参数的说明: x - 是字符向量输入. first - 是第一个字符要被提取的位置. last - 是最后一个字符要被提取的位置. 示例 # Extract characters from 5th to 7th position. result <- substring("Extract", 5, 7) print(result) 当我们上面
这些函数改变字符串的字符的大小写. 语法 toupper()和 tolower()函数的基本语法为: toupper(x) tolower(x) 以下是所使用的参数的说明: x - 向量输入. 示例 # Changing to Upper case. result <- toupper("Changing To Upper") print(result) # Changing to lower case. result <- tolower("Changing T