Displaying 20 results from an estimated 1000 matches similar to: "Sweave'ing Danish characters"
2011 Jan 24
1
Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7
Dear list,
Please consider the following call of sort
> sort(c("a","f"))
[1] "a" "f"
> sort(c("f","a"))
[1] "a" "f"
>
> sort(c("aa","ff"))
[1] "ff" "aa"
> sort(c("ff","aa"))
[1] "ff" "aa"
The last two results look strange
2009 Feb 06
1
Introduction to maps (of Denmark)?
Dear R-listers,
I am using R for Windows Vista 64-bit. I have no experience working with
maps, but now I have to plot a map of Denmark in which each Danish
county is color-coded according to its incidence rate of a particular
disease. My problem is that I don't know where to start. I have read the
help files to packages like 'mapplot', and their examples indicate that
I am on the
2007 Mar 20
1
Error in nlme with factors in R 2.4.1
Hi,
the following R lines work fine in R 2.4.0, but not in R 2.4.1 or any devel versions of R
2.5.0 (see below for details).
library(drc) # to load the dataset 'PestSci'
library(nlme)
## Setting starting values
sv <- c(0.43355869, 2.49963220, 0.05861799, 1.73290589, 0.38153146, 0.24316978)
## No error
m1 <-
nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))),
fixed =
2007 Sep 12
1
plot vs curve
Dear list members,
is it intentional that:
curve(cos, xlim = c(-5, 5))
plot(cos, xlim = c(-5, 5))
produce different plots?
Shouldn't the 'xlim' argument in both cases set the 'from' and 'to' argument if they
aren't supplied (at least that's what I understood reading the help page for 'curve' and
'plot.function')?
Christian
>
2012 May 10
1
fda problems - version correct?
Dear friends - I am trying to understand fda and working with the 2009
book from Springer. I run the scripts directly from a new installed fda
library and include sessionInfo() below. This is from the script
fdarm-ch09.R - I seem to have got not fda_2.2.8 but 2.2.7 - is that
the problem? Where do I get .8 as I just reinstalled? Best wishes
Troels Ring, Nephrology
Aalborg, Denmark
>
2009 Feb 02
1
Assigning colnames in loop
Dear R-listers,
I am trying to assign colnames to a data frame within a loop, but I keep
getting a "target of assignment expands to non-language object"-error. I
need to split up a large dataset into about 20 smaller ones, and I would
like to assign colnames within the loop, so I won't have to type the
same thing 20 times over.
I have concocted this really goofy example which
2011 Sep 15
1
Can't get installing a package source (.tar.gz) from a web page to work...
I have created an R-package with datasets which I want my students to install (the package is not on CRAN).
1) I've put the package on the web in a directory called 'data' and I thought I could do:
> install.packages("http://gbi.agrsci.dk/statistics/courses/2011-ISMLS-course/data/LiSciData_0.0-03.tar.gz",repos=NULL,type="source")
Warning: invalid package
2008 Oct 02
1
possible bug in function 'var' in R 2.7.2?
Dear R-Help,
I have used R2.6.0 until I recently installed also R2.7.2 (see details below)
In R 2.6.0, the following script using the function 'var' (cor(stats)):
x.test <- c(NA, NA, NA, NA)
var(x.test, na.rm=T)
gives the output:
NA
In R2.7.2 the output of the same script generates an error message and stops R:
'Error in var(x.test, na.rm = T)
2017 Oct 11
6
changing "," to "." in data.frame
Dear friends - I have a data.frame with "," instead of "." and found the
discussion
http://r.789695.n4.nabble.com/How-to-replace-all-commas-with-semicolon-in-a-string-tt4721187.html#a4721192
so copying the code of Ulrik(I hope:-)) I tried
(making some data)
AX <-
2017 Oct 11
0
changing "," to "." in data.frame
And as follow up,
fff<-function(x) gsub(",", ".", x)
BX <- apply(apply(AX, 2, fff), 2, as.numeric)
this seems to be easier.
Cheers
Petr
S pozdravem | Best Regards
RNDr. Petr PIKAL
Vedouc? V?zkumu a v?voje | Research Manager
PRECHEZA a.s.
n?b?. Dr. Edvarda Bene?e 1170/24 | 750 02 P?erov | Czech Republic
Tel: +420 581 252 256 | GSM: +420 724 008 364
petr.pikal at
2008 Mar 28
1
Sweave - print \n ?
Hi,
this is probably quite stupid but I have no clue
what's wrong. Let's say I write the function
hline <- function() {
cat("\\hline \n")
}
and call hline() from within a Sweave chunk. Why is
there no carriage return after the \hline in the
resulting tex file?
if I call hline() hline() in the chunk, then I get
\hline \hline
in the tex code without a linebreak in
2011 Oct 28
1
xtable with \begin{tabular} and only.contents
I have found that I like having my captions and labels in my latex document
rather than having them contained in my xtable output file (I haven't fully
gone to sweave yet). I know I can do something like this by using the
'only.contents' argument in xtable. Unfortunately, the only.contents
argument also removes the \begin{tabular}{rrrrrr} & \end{tabular} (in the
example below) of
2015 Nov 25
2
stargazer
Estimados
Instale MiKTeX 2,9 y Texmaker y se mantiene el problema. ApreciarÃa la
ayuda de los conocedores
Saludos
Cuando quiero hacer una tabla con el paquete stargazer, esto es lo que sale
stargazer(attitude)
% Table created by stargazer v.5.2 by Marek Hlavac, Harvard University.
E-mail: hlavac at fas.harvard.edu
% Date and time: lu., nov. 16, 2015 - 10:55:58 \begin{table}[!htbp]
2010 Nov 22
1
Problem setting the number of digits in xtable
DEar list members,
I am currently using Sweave with LaTeX which is great.
I can use xtable for formatting outp of tables but I have a problem setting the number of decimals in xtables when used with dataframe.
I have found an example on the net ith matrix and it works.
For example this works :
> > tmp <- matrix(rnorm(9), 3, 3)
> > xtmp <- xtable(tmp)
> > digits(xtmp)
2008 Sep 24
1
paste in xtable
Dear R help:
I am trying to use paste(), within an ifelse() statement to insert latex
commands into an object that has been created using xtable(). I cannot
make the strings behave as I would like, the '\t' is creating a tab, the
usual method of '\\t' is not working either - nor is any series of
backslashes. The xtable object, I think, automatically alters the
strings. How
1999 Mar 20
1
How to get '\h' through print() or paste()?
Hello,
[really hoping not to ask something the 1001th time]
I need single backslashes printed for generating TeX-code.
That works:
> print("\begin{tabular}")
[1] "\begin{tabular}"
But \h seems to be interprated in some way:
> print('\hline')
[1] "hline"
Hm, trying to mask the backslash:
> print('\\hline')
[1]
2007 Jun 20
2
"xtable" results doesn't correspond to data.frame
Dear useRs,
Am trying to use xtable on the following data.frame and I don't get what I
expect:
example.table <- data.frame(rbind(
c("Gender"," "," "," "),
cbind(rep(" ",2),c("Male","Female"),c(3.0,4.0),c(3/7,4/7))
))
colnames(example.table) <- c(" "," ","number of
2011 Aug 17
1
Symbol Font Baseline, Cairo, Card Symbols
I think I found a bug in the Cairo library, plus weird behavior in
both the Cairo and the normal pdf device. The baseline of the spades
symbol seems to be off. This is easier to show than it is to explain.
The problem does not appear in the normal pdf device, which is why I
am guessing this is a Cairo bug. moreover, I cannot figure out why
three of the card symbols seem to be transparent, but
2015 Nov 16
2
stargazer
Estimados
Cuando quiero hacer una tabla con el paquete stargazer, esto es lo que me
sale, probablemente tengo que instalar algun programa
sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
[3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5]
2013 Mar 15
2
latex(test, collabel=) returns wrong latex code?
Hello:
I'm working with a 2-dimensional table that looks sort of like test below.
I'm trying to produce latex code that will add dimension names for both the rows and the columns.
In using the following code, latex chokes when I include collabel='Vote' but it's fine without it.
The code below prouces the latex code further below. I'm confused by this, because it looks