Graham,
thanks for your reply. I have to admit that I was first sceptical
about Sweave, too. But it really works fine.
Considerung your problem -- if it isn't solved yet --, have you tried
to put the R verbatim text into a minipage? You would do Insert -->
Box (Minipage) and paste your code there. Might be worth a shot.
Best,
Christian
Am 27.02.2009 um 19:36 schrieb Graham Smith:
Christian,
Thanks for the reply.
At the moment I don't really have any method of working with Lyx and
R.
It just so happens that I have a half written document that I want to
move to Lyx.
I have briefly looked at Sweave in the past and have completely failed
to grasp the concept, so left it as something to come back to later,
which I intend doing
The reason for saying I wasn't interested in Sweave at the moment was
because the document I am working with and all the R code is already
in
Word.
I shall have a look at the links you have sent and see if it makes
more
sense to me than it did before.
Graham
Christian Liesen wrote:
> Hi,
>
> I use LyX and R with Sweave and it works fine.
>
> If I get you correctly what you do is produce some output in R, then
> copy it from Word to LyX and convert it to verbatim? So the question
> then would really be how to prevent verbatim text from running of
the
> page / aligning it.
>
> IMHO, your best option would be to use Sweave. If you're a
> Windows-User, there are excellent instructions provided by Murat
> Yildizoglu at
> http://yildizoglu.blogspot.com/2009/02/lyx-and-sweave-under-windows-xp.htmlIf
> you're on a Mac, the hardest part is to find the directory with
> sweave.sty and copy it to your ~/Library/texmf/tex/latex Folder, add
> some layout files to your Application Support/LyX-xx and then run
> texhash, reconfigure and you should be good to go. This stuff is
> around, as is explained in e.g.
> http://www.r-project.org/doc/Rnews/Rnews_2008-1.pdf, but I think
I'll
> put it on the wiki.
>
> Okay, okay, you said you're not interested in Sweave at the moment.
> But who knows.
>
> -- Christian
>
>
> Am 27.02.2009 um 16:18 schrieb Graham Smith:
>
>> I am trying to put together some instructions/handouts for R using
>> Lyx 1.6.1, and the output from R is giving some grief.
>>
>> The two key issues are:
>>
>> 1. output running off the right hand edge of the page e.g a list of
>> values for a variable
>> 2. Alignment of output so column headings are aligned with the
column
>> of values
>>
>> With Word , this can be done with tabs and a hard return.
>>
>> I thought that by highlighting the output in Lyx and then turning
it
>> into verbatim text by clicking on the TEX icon, I could then
manually
>> align and break lines of text. But I can't.
>>
>> Do I need to use Latex commands in the TEX box I have just created
>> (which seems fair enough, I just need to find out what they are) or
>> is there a better way of doing this.
>>
>> I don't really want to go down the road of trying to learn Sweave
at
>> the moment, and indeed at the moment all the R output has been
>> imported from Word.
>>
>> Can anyone give some pointers on best practice for this, or point
me
>> towards an FAQ.
>>
>> Many thanks,
>>
>> Graham
>>
>> --
>> Graham M Smith
>>
>>
>>
>
--
Graham M Smith
[email protected]
Station Cottage, Station Road
Binegar, Somerset
BA3 4UQ