similar to: Sweave (R?) font encoding problems

Displaying 20 results from an estimated 1200 matches similar to: "Sweave (R?) font encoding problems"

2009 Apr 16
2
there are fontencoding problem in Sweave
I want write article by russian language using Sweave. For cyrillic text LaTeX use T2A encoding \usepackage[T2A]{fontenc} But in Sweave.sty we find: \RequirePackage[T1]{fontenc} It is source of critical problem. For example Rnw file $ cat estimation.Rnw \documentclass[A4paper]{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[russian,english]{babel}
2004 Dec 20
3
Sweave and LaTeX beamer class
Hi, has anyonne experienced problems between the LaTeX beamer class and Sweave? The following code does not work properly: ################################# \documentclass{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{ngerman} \begin{document} \frame{ \frametitle{test} test <<>>= 1+1 @ } \end{document} ################################# Below is the
2010 Aug 19
1
texi2dvi: option "clean" also deletes the generated pdf file
Dear expeRts, below are two examples of using texi2dvi. The problem becomes clear from the second example: on cleaning, texi2dvi also deletes the generated .pdf file. Is there a solution? Cheers, Marius ## Example 1: texi2dvi cleans fine, without deleting the generated .pdf require(tools) sink(file="myLaTeXFile1.tex") cat("\\documentclass{article}\n")
2009 Sep 03
1
Sweavelistingutil: Encoding problems
Hello, I am not sure whether this is a bug or lack of R experience. However, I am using your Sweavelistingutil package, which is very nice. Obviously I use it to create LaTeX files. These are encoded in utf8. However, when I use the Sweavelistingutil is uses some funky character for "`" and "'" that is not recognized. Here is an example from my tex-file: ,---- |
2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
Dear expeRts, What's a 'good' (nice-looking, easy-to-read) setup for the LaTeX package 'listings' to display R code? The two versions below are partly inspired by the settings of the package SweaveListingUtils and http://r.789695.n4.nabble.com/R-How-to-format-R-code-in-LaTex-documents-td816055.html Any suggestions, comments, or improvements are welcome. Cheers, Marius ###
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
Hello, Well, try it: p <- .Machine$double.eps^seq(0.5, 1, by = 0.05) z <- qnorm(p/2) pnorm(z) # [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12 # [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15 6.731134e-16 #[11] 1.110223e-16 p/2 # [1] 7.450581e-09 1.228888e-09 2.026908e-10 3.343152e-11 5.514145e-12 # [6] 9.094947e-13 1.500107e-13 2.474254e-14 4.080996e-15
2019 Jun 21
4
Calculation of e^{z^2/2} for a normal deviate z
You may want to look into using the log option to qnorm e.g., in round figures: > log(1e-300) [1] -690.7755 > qnorm(-691, log=TRUE) [1] -37.05315 > exp(37^2/2) [1] 1.881797e+297 > exp(-37^2/2) [1] 5.314068e-298 Notice that floating point representation cuts out at 1e+/-308 or so. If you want to go outside that range, you may need explicit manipulation of the log values. qnorm()
2020 Aug 10
1
Typos in file.path documentation.
Hello, R 4.0.2 on Ubuntu 20.04, sessionInfo() below. I believe there are two typos in ?file.path, section Value, 2nd paragraph. 1. There is a close parenthesis missing after Encoding, as it is reading is a bit confusing, I had to backtrack and repeat. 2. I'm not a native language speaker but before a consonant it's 'a', not 'an', right? an component should be a
2005 Apr 27
1
Recursive calculation of a series of values
Dear R-users, I'm felling kind of blocked on a quite simple problem and I wonder if someone could give me a help with it. My problem: x[0] = 100 x[1] = (1+v[1])*x[0] x[2] = (1+v[2])*x[1] ... i.e. x[i] = (1+v[i])*x[i-1] and x[0]=k Given a set of v values I wanted to obtain the corresponding x values in an efficient way (i.e. without a for loop). For instance, if x[0] = 100 and v =
2005 Apr 27
2
its package: inexplicable date-shifting ?!
Can someone please explain to me why the dates get shifted by one day when I create an its ( irregular time-series ) object from a matrix for which I've assigned row names. E.g. in the example run below, why does the its object have dates one-shifted from my original dates? > install.packages('its') > install.packages('Hmisc') > require(its) > m <-
2008 Jun 27
1
Sweave: controlling pointsize (pdf)
Hello, Is there a way to control pointsize of pdf:s produced by Sweave? I would like to have the same pointsize from (not a working example) pdf(file="C:/temp/example.pdf", width=7, height=7, bg="white", pointsize=10) plot(1:10) etc.. dev.off() as \documentclass[a4paper]{article} \usepackage[latin1]{inputenc} \usepackage[finnish]{babel} \usepackage[T1]{fontenc}
2018 Jun 22
1
Bug in as.Date or strptime?
Hello, This just came up in SO, sessionInfo() at the end. https://stackoverflow.com/questions/50988018/seeking-explanation-for-as-date-function-in-r?noredirect=1#comment88971055_50988018 # example 1 # not even the month is right as.Date(x = 1, format = '%j', origin= '2015-01-01') #[1] "2018-07-21" # example 2a # nonsense output as.Date(x = 1, origin=
2001 Oct 23
2
Parsing of HTML files in R
Is there any package similar to the XML package that is able to "extract" relevant information from HTML files. Namely, I'm interested in obtained data that is represented as a HTML table, into some R-type structure. Thank you. -- Luis Torgo FEP/LIACC, University of Porto Phone : (+351) 22 607 88 30 Machine Learning Group Fax : (+351) 22 600 36 54 R. Campo
2020 Sep 09
1
more Matrix weirdness
Am I being too optimistic in expecting this (mixing and matching matrices and Matrices) to work? If x is a matrix and m is a Matrix, replacing a commensurately sized sub-matrix of x with m throws "number of items to replace is not a multiple of replacement length" ... x <- matrix(0,nrow=3,ncol=10, dimnames=list(letters[1:3],LETTERS[1:10])) rr <-
2020 Oct 31
2
strptime() keeps emitting warnings after establishing a handler with tryCatch()
Dear list members, I have come about a peculiar behavior in R (4.0.2) which I would describe as a bug. On macOS, where `strptime()` raises a warning for invalid timezone identifiers, the following code will continue to raise the original warning with every subsequent call to `strptime()`: ``` # attach a handler for warnings for this call only: tryCatch(strptime('2020-10-31 18:30', format
2019 Feb 28
2
Exit status of Rscript
Current R release (3.5.2) and devel return a 0 exit status on error, while prior versions returned a non-zero exit status. On Linux and MacOs, the following line returns TRUE for R-3.5.2 and R-devel, and FALSE for R-3.5.1 and R-3.5.0: system2("Rscript", c("-e", shQuote("stop('foo')"))) == 0 I didn't find this in the NEWS, so I believe this is a bug.
2019 May 30
2
use of buffers in sprintf and snprintf
Hi again, I realised it is useful to replicate the warnings locally without relying on CRAN automatic check; instead of R(-devel) CMD check --as-cran package_version.tar.gz one can use R CMD check --configure-args="" and in my case the WARNINGS were initially given with https://www.stats.ox.ac.uk/pub/bdr/gcc9/README.txt and those specification might as well used in --configure-args
2019 Feb 01
3
nlminb with constraints failing on some platforms
Hello, R 3.5.2 on ubuntu 18.04. sessionInfo() at the end. Works with me, same results, cannot reproduce the error. f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) str(opt) xhat <- rep(1, 10) all.equal(opt$par, xhat, tol=0) # good: 5.53 e-7 #[1] "Mean relative difference: 5.534757e-07" all.equal(opt$objective,
2011 Apr 09
1
Trouble with Sweave and Beamer
Dear All, I am running Debian testing on my box and I installed latex and R from the standard repositories. I am trying my hands at sweave, but somehow I am experiencing problems (I am trying to use beamer and Sweave). Please see the snippet at the end of the email and saved as report.Rnw. When I run the command $ R CMD Sweave report.Rnw Writing to file report.tex Processing code chunks ...
2019 Jun 23
2
Calculation of e^{z^2/2} for a normal deviate z
I agree with many the sentiments about the wisdom of computing very small p-values (although the example below may win some kind of a prize: I've seen people talking about p-values of the order of 10^(-2000), but never 10^(-(10^8)) !). That said, there are a several tricks for getting more reasonable sums of very small probabilities. The first is to scale the p-values by dividing the