Kirk Ammerman
Kirk Ammerman

Reputation: 19

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
land_q3
land_q5
land_q6
land_q7
land_q14
land_q15
land_q16 (just a sample of the output). This is how I would like my knitted pdf output to display as.

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

any coding suggestions? or explanations to the discrepancy? Any help is appreciated!

Upvotes: 0

Views: 29

Answers (1)

Kirk Ammerman
Kirk Ammerman

Reputation: 19

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.

Upvotes: 1

Related Questions