Displaying 20 results from an estimated 2000 matches similar to: "Paths in knitr"
2017 Jun 12
0
Paths in knitr
Will there be anything wrong if you do not set these options?
Regards,
Yihui
--
https://yihui.name
On Mon, Jun 12, 2017 at 2:24 AM, <G.Maubach at weinwolf.de> wrote:
> Hi Yihui,
> Hi Duncan,
>
> I corrected my typo. Unfortunately knitr did not find my plots in the
> directory where they reside which is different from the Rmd document.
>
> The documentation of knitr
2017 Jun 08
3
Paths in knitr
Hi All,
I have to compile a report for the management and decided to use RMarkdown
and knitr. I compiled all needed plots (using separate R scripts) before
compiling the report, thus all plots reside in my graphics directory. The
RMarkdown report needs to access these files. I have defined
```{r setup, include = FALSE}
knitr::opts_knit$set(
echo = FALSE,
xtable.type = "html",
2017 Jun 09
0
Paths in knitr
I'd say it is an expert-only option. If you do not understand what it
means, I strongly recommend you not to set it.
Similarly, you set the root_dir option and I don't know why you did it, but
it is a typo anyway (should be root.dir).
Regards,
Yihui
--
https://yihui.name
On Fri, Jun 9, 2017 at 4:50 AM, <G.Maubach at gmx.de> wrote:
> Hi Yi,
>
> many thanks for your reply.
2016 Apr 27
1
Antwort: RE: Missing Values in Logical Expressions
Hi Petr,
Hi Jim,
many thanks for your help. Today I constructed a sample dataset and tested
your suggestions. Everything worked OK.
Then I took the code and testet on the original data. And - it worked OK
this morning also.
I went back to my script of Thuesday and ran it again. OK. Then I used my
script of Monday and ran it.. OK.
I have no idea what was wrong yesterday. To see that there is
2016 Apr 28
0
Antwort: RE: Interdependencies of variable types, logical expressions and NA
Hi
your initial ds
> str(ds)
'data.frame': 2 obs. of 3 variables:
$ var1: num 1 1
$ var2: logi TRUE FALSE
$ var3: logi NA NA
first result
> str(ds)
'data.frame': 2 obs. of 6 variables:
$ var1 : num 1 1
$ var2 : logi TRUE FALSE
$ var3 : logi NA NA
$ value_and_logical: logi TRUE TRUE
$ logical_and_na : logi TRUE NA
2016 Apr 26
0
Missing Values in Logical Expressions
Hm
Based on Jim's data your construction gives me correct result.
> Umsatz_2011<-c(1,2,3,4,5,NA,7,8,NA,10)
> Kunde_2011<-rep(0:1,5)
> Check_Kunde_2011 <- ifelse(is.na(Umsatz_2011) == TRUE & Kunde_2011 == 1, 1, 0)
> Check_Kunde_2011 <- factor(Check_Kunde_2011, levels = c(1,0), labels = c("Check", "OK"))
> table(Check_Kunde_2011)
2016 Apr 26
3
Missing Values in Logical Expressions
Hi All,
I need to evaluate missing values in my data. I am able to filter these
values and do simple statistics on it. But I do need new variables based
on variables with missing values in my dataset:
Check_Kunde_2011 <- ifelse(is.na(Umsatz_2011) == TRUE & Kunde_2011 == 1,
1, 0)
Check_Kunde_2011 <- factor(Check_Kunde_2011, levels = c(1,0), labels =
c("Check",
2017 Jun 07
2
purrr::pmap does not work
Hi All,
I try to do a scatterplot for a bunch of variables. I plot a dependent
variable against a bunch of independent variables:
-- cut --
graphics::plot(
v01_r01 ~ v08_01_up11,
data = dataset,
xlab = "Dependent",
ylab = "Independent #1"
)
-- cut --
It is tedious to repeat the statement for all independent variables. Found
an alternative, i.e. :
-- cut --
mu
2016 Apr 20
2
Merging Data Sets with Full Outer Join
Hi All,
I would like to match some datasets. Both deliver variables AND cases
which might or might not be present in all datasets:
This sequence
Kunden <- Kunden_2011
Kunden <- merge(Kunden, Kunden_2012,
by.x = "Debitor", by.y = "Debitor")
Kunden <- merge(Kunden, Kunden_2013,
by.x = "Debitor", by.y = "Debitor")
2013 Jul 18
1
Looking for knitr example for beginner (NO RStudio)
Hi everyone,
I am using package knitr, FIRST TIME. I don't have access to RStudio.
Read through Yihui's page, didn't find it helpful. Stuck on terms
Rnw, GFM (GitHub Flavored Markdown). Never used Sweave, so the
reference is not helping.
Is there a simple step-by-step example WITHOUT RStudio?
My question:
What is the procedure? The documentation explains the functions, but
does
2013 Jan 04
1
Bug in R CMD check for \ in Rd?
Hi,
I have a function knit_expand() and its source/Rd are below:
https://github.com/yihui/knitr/blob/master/R/template.R#L43-L44
https://github.com/yihui/knitr/blob/master/man/knit_expand.Rd
When I run R CMD check on the package I get this warning (with both R
2.15.2 and R-devel):
* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object
2013 Sep 02
1
Sweave: printing an underscore in the output from an R command
I am working with Sweave and would like to print out into my latex document the result of the R command
version$platform
So what I first tried in my .Rnw document was \Sexpr{print(version$platform)}.
However, the output from this command is the string "x86_64-apple-darwin10.8.0" (without the quotes). This contains an underscore, which is a special character in tex and so I get an error
2012 May 09
1
Sweave, beamer and alert within code chunks
Hi all,
Using Beamer, in order to highlight a piece of R code I do something
like this - note the "\structure" and "\alert" commands:
\begin{semiverbatim}
> mleOut <- \structure{dlmMLE}(Nile,
+ parm = c(0.2, 120), # initial values for optimizer
+ lower = c(1e-7, 0)) \alert<2>{# V must be positive}
> mleOut$convergence
2012 Dec 26
2
Problem with large/small numbers in knitr
I have problems with very large numbers using knitr. In the following, my a
and b are extremely small and ssrr and ssru are extremely large. Knitr
delivers error messages. Scaling ssrr and ssru by 1000 resolved the problem:
ssrr <-ssrr/1000 ; ssru<-ssru/1000
Any clue as to how I might resolve the problem?
BTW, the same program does run in another computer. I am wondering whether
my
2012 Nov 08
2
Controlling R fonts through LaTeX
Dear help list
Does anybody know if it is possible to somehow tell R to let LaTeX handle
the fonts for postscript plots produced by R?
It is for a thesis and I have MANY figures. These are created by R scripts
dynamically as the document is compiled, using
the Make system. I see that I can `manually' specify the font family each
time I call the postscript device, but I am looking
for a
2013 Jan 28
1
Setting inline hook to a function identical to default in knitr turns of exponential formatting
Hello List,
while dealing with a questin of 'xiaodao' (
http://r.789695.n4.nabble.com/Problem-with-large-small-numbers-in-knitr-tp4653986.html)
I noticed that copying the default inline hook function obtained by
knit_hooks$get("inline")
into a knit_hook$set(inline = <...>) call turns off exponential
fomatting in the resulting .tex file.
I used a stripped version of
2013 Oct 03
1
Error in "Writing R Extensions"
In Section 1.4.2 of "Writing R Extensions"
%\VignetteEngine{knitr::knitr}
should be
%\VignetteEngine{knitr::knit}
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Is this sort of thing best reported here, or is a huge report in order?
John Maindonald email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473 fax
2014 Dec 19
1
UTF8 markdown vignette
On 18/12/2014, 12:17 AM, Yihui Xie wrote:
> For the record, I saw a change had been made in R-devel:
> https://github.com/wch/r-source/commit/d53b098 (Thanks, Duncan)
> Meanwhile, I also made a change in knitr to assume UTF-8 unless R
> passes an encoding to the vignette engine:
> https://github.com/yihui/knitr/commit/23c6c8e2 Both will solve the
> original problem, but
2013 Jan 10
1
help with knit_hooks
Dear R-listers,
does anybody can suggest some manual where I can learn more about how the
hooks in knitr work?
I am trying to enclose the output of an R command in the Latex verbatim
environment.
I defined a hook as follows:
knit_hooks$set(fsverb = function(x, options) {
paste("\\begin(verbatim)\n", x, "\\end(verbatim)\n", sep = "")
}
then I set a chunk as
2015 May 24
1
NEWS.md support on CRAN
That is more or less what I had been doing for a long time (having
both NEWS.md and NEWS), but decided not to do it any more last year.
In fact, you can easily convert NEWS.md to a NEWS file that R's news()
can understand, e.g.
https://github.com/yihui/knitr/blob/947ad5fc94/Makefile#L8-L10 (if
your NEWS.md is like this
https://raw.githubusercontent.com/yihui/knitr/947ad5fc94/NEWS.md)
I