kitr problem after R update.
I had thought that I had apa6 working nicely (I think I was wrong) and decided to have a go at comgining it with knitr. I successfully embedded an inline statement, then created both a table and a figure. (see attached file). Both were running fine untill I updated R yesterday I'm suddenly getting the error It seems you are using the Sweave-specific sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')' This gives the error : john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw') bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw'' I got this with a slightly larger file where I was working with the document class apa6 and knitr so for simplicity I striped my example down to this so it appears it is knitr error and not something I have done playing with settings to get apa6 and biblatex to work What stupid error am I making now? Or do I just have to update things? If this is the wrong mailing list can anyone point me in the right direction? Thanks LyX 2.0.4 R info R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.2.0 directlabels_2.9 RColorBrewer_1.0-5 gridExtra_0.9.1 [5] stringr_0.6.2 scales_0.2.3 plyr_1.8 reshape2_1.2.2 [9] ggplot2_0.9.3 loaded via a namespace (and not attached): [1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.1 gtable_0.1.2 [5] labeling_0.1 MASS_7.3-23 munsell_0.4 proto_0.3-10 [9] tools_2.15.2 basic.knitr.attempt1.lyx Description: application/lyx
Re: Can LyX rename array environments?
On 2013-01-26, Scott Kostyshak wrote: On Tue, Jan 22, 2013 at 1:26 PM, Ben M. maresr12t...@gmail.com wrote: Hi! I have a friend who saw me using LyX, and decided to try it. She imported one of her papers with a collaborator. They use shortcuts like \ba for \begin{align*}. Consequently, all her arrays show up with ERT. Is there any hope of getting LyX to recognize such shortcuts, and then to use them? (She wants to continue using the macros to avoid inconveniencing her collaborators.) I think there are two issues here: 1. Importing 2. Using (and exporting) Issue 1 seems like a valid request to me and could be filed as an enhancement request here: http://www.lyx.org/trac I don't think hardcoding things like \ba - \begin{align*} is sensible. Rather, such local customizations should be made known to tex2lyx in a configuration file. AFAIK, there is already some sort of support in tex2lyx for such cases. Issue 2 is understandable but I doubt that this will be implemented. This is just my personal guess though. You are welcome to file this enhancement request also. Using and exporting could in principle be achieved with a custom layout. However, using macros instead of environments might be tricky. Günter
Re: kitr problem after R update.
Please see the NEWS for knitr 1.0 (now 1.0.5): https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-10 Sweave2knitr() is a function in knitr instead of an executable in your Ubuntu system: http://yihui.name/knitr/demo/sweave/ In your case, the chunk options height=4cm, width=4cm are invalid; please read the documentation for chunk options: http://yihui.name/knitr/options On one hand, there are no options called height and width (only fig.height/fig.width or out.height/out.width); on the other, 4cm is not a valid R object. To René Mayer: you also had problems after upgrading knitr, but you did not show me examples, so I have to guess - maybe you had some non-ASCII characters in your document, and knitr 1.0 added encoding support; I have submitted a patch to LyX accordingly: http://www.lyx.org/trac/ticket/8504 For now, you can download the new lyxknitr.R from https://raw.github.com/yihui/lyx/master/scripts/lyxknitr.R and put it under ~/lyx/scripts/. After LyX 2.0.6 is out, you will not need it. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Jan 26, 2013 at 9:35 AM, John Kane jrkrid...@yahoo.ca wrote: I had thought that I had apa6 working nicely (I think I was wrong) and decided to have a go at comgining it with knitr. I successfully embedded an inline statement, then created both a table and a figure. (see attached file). Both were running fine untill I updated R yesterday I'm suddenly getting the error It seems you are using the Sweave-specific sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')' This gives the error : john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw') bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw'' I got this with a slightly larger file where I was working with the document class apa6 and knitr so for simplicity I striped my example down to this so it appears it is knitr error and not something I have done playing with settings to get apa6 and biblatex to work What stupid error am I making now? Or do I just have to update things? If this is the wrong mailing list can anyone point me in the right direction? Thanks LyX 2.0.4 R info R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.2.0directlabels_2.9 RColorBrewer_1.0-5 gridExtra_0.9.1 [5] stringr_0.6.2 scales_0.2.3 plyr_1.8 reshape2_1.2.2 [9] ggplot2_0.9.3 loaded via a namespace (and not attached): [1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.1 gtable_0.1.2 [5] labeling_0.1 MASS_7.3-23 munsell_0.4 proto_0.3-10 [9] tools_2.15.2
Re: creating a quiz /multiple choice questions with Lyx
On Wed, Jan 23, 2013 at 2:24 PM, Vivek vivek.sha...@va.gov wrote: I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek This has been discussed on the list before. The best answer I have seen (in my humble opinion) is to use branches. This (quizzes/mult. choice questions) was one of the primary reasons they were introduced (see http://wiki.lyx.org/LyX/NewInLyX14#toc6 and http://wiki.lyx.org/LyX/NewInLyX20#branches ). For documentation, see the LyX User's Guide, Section 6.8. Jacob
kitr problem after R update.
I had thought that I had apa6 working nicely (I think I was wrong) and decided to have a go at comgining it with knitr. I successfully embedded an inline statement, then created both a table and a figure. (see attached file). Both were running fine untill I updated R yesterday I'm suddenly getting the error It seems you are using the Sweave-specific sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')' This gives the error : john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw') bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw'' I got this with a slightly larger file where I was working with the document class apa6 and knitr so for simplicity I striped my example down to this so it appears it is knitr error and not something I have done playing with settings to get apa6 and biblatex to work What stupid error am I making now? Or do I just have to update things? If this is the wrong mailing list can anyone point me in the right direction? Thanks LyX 2.0.4 R info R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.2.0 directlabels_2.9 RColorBrewer_1.0-5 gridExtra_0.9.1 [5] stringr_0.6.2 scales_0.2.3 plyr_1.8 reshape2_1.2.2 [9] ggplot2_0.9.3 loaded via a namespace (and not attached): [1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.1 gtable_0.1.2 [5] labeling_0.1 MASS_7.3-23 munsell_0.4 proto_0.3-10 [9] tools_2.15.2 basic.knitr.attempt1.lyx Description: application/lyx
Re: Can LyX rename array environments?
On 2013-01-26, Scott Kostyshak wrote: On Tue, Jan 22, 2013 at 1:26 PM, Ben M. maresr12t...@gmail.com wrote: Hi! I have a friend who saw me using LyX, and decided to try it. She imported one of her papers with a collaborator. They use shortcuts like \ba for \begin{align*}. Consequently, all her arrays show up with ERT. Is there any hope of getting LyX to recognize such shortcuts, and then to use them? (She wants to continue using the macros to avoid inconveniencing her collaborators.) I think there are two issues here: 1. Importing 2. Using (and exporting) Issue 1 seems like a valid request to me and could be filed as an enhancement request here: http://www.lyx.org/trac I don't think hardcoding things like \ba - \begin{align*} is sensible. Rather, such local customizations should be made known to tex2lyx in a configuration file. AFAIK, there is already some sort of support in tex2lyx for such cases. Issue 2 is understandable but I doubt that this will be implemented. This is just my personal guess though. You are welcome to file this enhancement request also. Using and exporting could in principle be achieved with a custom layout. However, using macros instead of environments might be tricky. Günter
Re: kitr problem after R update.
Please see the NEWS for knitr 1.0 (now 1.0.5): https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-10 Sweave2knitr() is a function in knitr instead of an executable in your Ubuntu system: http://yihui.name/knitr/demo/sweave/ In your case, the chunk options height=4cm, width=4cm are invalid; please read the documentation for chunk options: http://yihui.name/knitr/options On one hand, there are no options called height and width (only fig.height/fig.width or out.height/out.width); on the other, 4cm is not a valid R object. To René Mayer: you also had problems after upgrading knitr, but you did not show me examples, so I have to guess - maybe you had some non-ASCII characters in your document, and knitr 1.0 added encoding support; I have submitted a patch to LyX accordingly: http://www.lyx.org/trac/ticket/8504 For now, you can download the new lyxknitr.R from https://raw.github.com/yihui/lyx/master/scripts/lyxknitr.R and put it under ~/lyx/scripts/. After LyX 2.0.6 is out, you will not need it. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Jan 26, 2013 at 9:35 AM, John Kane jrkrid...@yahoo.ca wrote: I had thought that I had apa6 working nicely (I think I was wrong) and decided to have a go at comgining it with knitr. I successfully embedded an inline statement, then created both a table and a figure. (see attached file). Both were running fine untill I updated R yesterday I'm suddenly getting the error It seems you are using the Sweave-specific sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')' This gives the error : john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw') bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw'' I got this with a slightly larger file where I was working with the document class apa6 and knitr so for simplicity I striped my example down to this so it appears it is knitr error and not something I have done playing with settings to get apa6 and biblatex to work What stupid error am I making now? Or do I just have to update things? If this is the wrong mailing list can anyone point me in the right direction? Thanks LyX 2.0.4 R info R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.2.0directlabels_2.9 RColorBrewer_1.0-5 gridExtra_0.9.1 [5] stringr_0.6.2 scales_0.2.3 plyr_1.8 reshape2_1.2.2 [9] ggplot2_0.9.3 loaded via a namespace (and not attached): [1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.1 gtable_0.1.2 [5] labeling_0.1 MASS_7.3-23 munsell_0.4 proto_0.3-10 [9] tools_2.15.2
Re: creating a quiz /multiple choice questions with Lyx
On Wed, Jan 23, 2013 at 2:24 PM, Vivek vivek.sha...@va.gov wrote: I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek This has been discussed on the list before. The best answer I have seen (in my humble opinion) is to use branches. This (quizzes/mult. choice questions) was one of the primary reasons they were introduced (see http://wiki.lyx.org/LyX/NewInLyX14#toc6 and http://wiki.lyx.org/LyX/NewInLyX20#branches ). For documentation, see the LyX User's Guide, Section 6.8. Jacob
kitr problem after R update.
I had thought that I had apa6 working nicely (I think I was wrong) and decided to have a go at comgining it with knitr. I successfully embedded an inline statement, then created both a table and a figure. (see attached file). Both were running fine untill I updated R yesterday I'm suddenly getting the error "It seems you are using the Sweave-specific sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')' This gives the error : john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw') bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw'' I got this with a slightly larger file where I was working with the document class apa6 and knitr so for simplicity I striped my example down to this so it appears it is knitr error and not something I have done playing with settings to get apa6 and biblatex to work What stupid error am I making now? Or do I just have to update things? If this is the wrong mailing list can anyone point me in the right direction? Thanks LyX 2.0.4 R info R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.2.0 directlabels_2.9 RColorBrewer_1.0-5 gridExtra_0.9.1 [5] stringr_0.6.2 scales_0.2.3 plyr_1.8 reshape2_1.2.2 [9] ggplot2_0.9.3 loaded via a namespace (and not attached): [1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.1 gtable_0.1.2 [5] labeling_0.1 MASS_7.3-23 munsell_0.4 proto_0.3-10 [9] tools_2.15.2 basic.knitr.attempt1.lyx Description: application/lyx
Re: Can LyX rename array environments?
On 2013-01-26, Scott Kostyshak wrote: > On Tue, Jan 22, 2013 at 1:26 PM, Ben M.wrote: >> Hi! I have a friend who saw me using LyX, and decided to try it. She >> imported one of her papers with a collaborator. They use shortcuts like \ba >> for \begin{align*}. Consequently, all her arrays show up with ERT. Is >> there any hope of getting LyX to recognize such shortcuts, and then to use >> them? (She wants to continue using the macros to avoid inconveniencing her >> collaborators.) > I think there are two issues here: > 1. Importing > 2. Using (and exporting) > Issue 1 seems like a valid request to me and could be filed as an > enhancement request here: http://www.lyx.org/trac I don't think hardcoding things like \ba -> \begin{align*} is sensible. Rather, such local customizations should be made known to tex2lyx in a configuration file. AFAIK, there is already some sort of support in tex2lyx for such cases. > Issue 2 is understandable but I doubt that this will be implemented. > This is just my personal guess though. You are welcome to file this > enhancement request also. Using and exporting could in principle be achieved with a custom layout. However, using macros instead of environments might be tricky. Günter
Re: kitr problem after R update.
Please see the NEWS for knitr 1.0 (now 1.0.5): https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-10 Sweave2knitr() is a function in knitr instead of an executable in your Ubuntu system: http://yihui.name/knitr/demo/sweave/ In your case, the chunk options "height=4cm, width=4cm" are invalid; please read the documentation for chunk options: http://yihui.name/knitr/options On one hand, there are no options called height and width (only fig.height/fig.width or out.height/out.width); on the other, 4cm is not a valid R object. To René Mayer: you also had problems after upgrading knitr, but you did not show me examples, so I have to guess - maybe you had some non-ASCII characters in your document, and knitr 1.0 added encoding support; I have submitted a patch to LyX accordingly: http://www.lyx.org/trac/ticket/8504 For now, you can download the new lyxknitr.R from https://raw.github.com/yihui/lyx/master/scripts/lyxknitr.R and put it under ~/lyx/scripts/. After LyX 2.0.6 is out, you will not need it. Regards, Yihui -- Yihui XiePhone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Jan 26, 2013 at 9:35 AM, John Kane wrote: > I had thought that I had apa6 working nicely (I think I was wrong) and > decided to have a go at comgining it with knitr. > > I successfully embedded an inline statement, then created both a table and a > figure. (see attached file). > Both were running fine untill I updated R yesterday > > I'm suddenly getting the error "It seems you are using the Sweave-specific > sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')' > > This gives the error : > john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw') > bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw'' > > I got this with a slightly larger file where I was working with the document > class apa6 and knitr so for simplicity I striped my example down to this so > it appears it is knitr error and not something I have done playing with > settings to get apa6 and biblatex to work > > What stupid error am I making now? Or do I just have to update things? > > If this is the wrong mailing list can anyone point me in the right > direction? > Thanks > > LyX 2.0.4 > > R info > R version 2.15.2 (2012-10-26) > Platform: i686-pc-linux-gnu (32-bit) > > locale: > [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8 > [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] lubridate_1.2.0directlabels_2.9 RColorBrewer_1.0-5 gridExtra_0.9.1 > [5] stringr_0.6.2 scales_0.2.3 plyr_1.8 reshape2_1.2.2 > [9] ggplot2_0.9.3 > > loaded via a namespace (and not attached): > [1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.1 gtable_0.1.2 > [5] labeling_0.1 MASS_7.3-23 munsell_0.4 proto_0.3-10 > [9] tools_2.15.2 >
Re: creating a quiz /multiple choice questions with Lyx
On Wed, Jan 23, 2013 at 2:24 PM, Vivekwrote: > I would like to create a MCQ list at the end of a presentation with > ability to > display correct answers/ and a score at end of the test. > > Is it possible to do so in lyx? or Latex is the way to go. > > Lyx and latex gurus help me. > > Vivek > > This has been discussed on the list before. The best answer I have seen (in my humble opinion) is to use branches. This (quizzes/mult. choice questions) was one of the primary reasons they were introduced (see http://wiki.lyx.org/LyX/NewInLyX14#toc6 and http://wiki.lyx.org/LyX/NewInLyX20#branches ). For documentation, see the LyX User's Guide, Section 6.8. Jacob