Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
行分隔符是否为R隐式分隔符?_R - Fatal编程技术网

行分隔符是否为R隐式分隔符?

行分隔符是否为R隐式分隔符?,r,R,我正在通过数据营教程学习R。我注意到,在编写程序时,行中断似乎很重要。下面的代码返回一条错误消息,因为R似乎将“return(TRUE)”解释为print函数的某种参数 hello<-function(){print("hi there") return(TRUE)} hello如果一行上有两个表达式,则必须用分号分隔。hello如果一行上有两个表达式,则必须用分号分隔。hello hello<-function(){print("hi there") return(TRUE)}

我正在通过数据营教程学习R。我注意到,在编写程序时,行中断似乎很重要。下面的代码返回一条错误消息,因为R似乎将“return(TRUE)”解释为print函数的某种参数

hello<-function(){print("hi there") return(TRUE)}

hello如果一行上有两个表达式,则必须用分号分隔。
hello如果一行上有两个表达式,则必须用分号分隔。
hello
hello<-function(){print("hi there") 
return(TRUE)}