在新行中打印变量

时间:2017-09-21 09:08:33

标签: r markdown knitr

我正在列举例如:

test <- unique(df$sed)

"A"
"B"
"C"

为了将knitr引用到上面的变量,我正在使用:

r test

但是,问题在于它打印:A,B,C

我想打印:

A
B
C

2 个答案:

答案 0 :(得分:1)

设置块选项public function topupPost(Request $request) { $validator = [ 'topupAmount'=> 'required|integer|between:10,500', 'phonenumber'=> 'required|regex:/^05[602][0-9]{7}$/', ]; $inputs = $request->all(); Log::info($inputs); $validator = Validator::make($inputs, $validator); if($validator->fails()){ return Response::json([ 'error' => true, 'message' => $validator->messages(), 'code' => 400 ], 400); } elseif (Auth::check()) { return view('pages.checkout', compact('inputs')); } return Response::json([ 'error' => true, 'message' => "Please login first", 'code' => 401 ], 401); } ,例如

comment=""

答案 1 :(得分:0)

也许是这样的?

cat(paste(test,collapse = "\n"))