У меня есть фрейм данных, который содержит описания вопросов опроса, которые могут быть довольно длинными.Я пытаюсь найти способ аккуратно напечатать их.Вот пример:
foo <- data.frame(v1 = 1:5,
v2 = rep(c("This is a really long description of a survey question that gives a bunch of information about the question and can be very long blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah"), 5),
v3 = 6:10)
Я бы хотел, чтобы напечатанный вывод выглядел примерно так:
v1 v2 v3
1 1 This is a really long description of 6
a survey question that gives a bunch
of information about the question and
can be very long blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
2 2 This is a really long description of 7
a survey question that gives a bunch
of information about the question and
can be very long blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
3 3 This is a really long description of 8
a survey question that gives a bunch
of information about the question and
can be very long blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
4 4 This is a really long description of 9
a survey question that gives a bunch
of information about the question and
can be very long blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
5 5 This is a really long description of 10
a survey question that gives a bunch
of information about the question and
can be very long blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah