简体   繁体   English

控制台输出与针织 pdf 输出不匹配

[英]Console output not matching knitted pdf output

I used this code:我使用了这个代码:

for (i in 1:length(y.unique)){
    cat(y.unique[i],"\n")
}

and got this console output:并得到这个控制台输出:

land_q2土地_q2
land_q3土地_q3
land_q5土地_q5
land_q6土地_q6
land_q7土地_q7
land_q14土地_q14
land_q15土地_q15
land_q16 (just a sample of the output). land_q16(只是输出的一个样本)。 This is how I would like my knitted pdf output to display as.这就是我希望我的编织 pdf 输出显示为的方式。

BUT when knitted I have this output:但是编织时我有这个输出:

land_q2 land_q3 land_q5 land_q6 land_q7 land_q8 land_q9 land_q10 land_q11 land_q12 land_q13 land_q14 land_q15 land_q16 land_q18 land_q19 land_q20 land_q22 land_q23 land_q25 land_q28 land_q29 land_q30 land_q3 etc etc land_q2land_q3land_q5land_q6land_q7land_q8land_q9land_q10land_q11land_q12land_q13land_q14land_q15land_q16land_q18land_q19land_q20land_q22land_q23land_q25land_q3land_q23land_q25land_q3land_q29

any coding suggestions?任何编码建议? or explanations to the discrepancy?或对差异的解释? Any help is appreciated!任何帮助表示赞赏!

I don't know why, but by adding a space before the next line insert the format changes.我不知道为什么,但是通过在下一行插入格式更改之前添加一个空格。 Both here and in my knitted pdf.在这里和我的编织 pdf 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM