Displaying 20 results from an estimated 900 matches similar to: "Plotting question: Problem with strwidth in 2.7.1"
2008 Mar 28
1
How to schedule R scripts?
useRs,
Is there a way to schedule R scripts? I would like to run certain
scripts three times a day. I'm running R on Windows XP.
> sessionInfo()
R version 2.6.0 (2007-10-03)
i386-pc-mingw32
locale:
LC_COLLATE=Finnish_Finland.1252;LC_CTYPE=Finnish_Finland.1252;LC_MONETARY=Finnish_Finland.1252;LC_NUMERIC=C;LC_TIME=Finnish_Finland.1252
attached base packages:
[1] splines grid stats
2010 Feb 08
4
Problem with R on USB-drive
Hi,
I installed R on USB-drive, but when I run Rgui.exe from bin folder, I get
this error:
-----------------------
R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for
2008 Feb 21
1
Selecting timestamps
R-users,
I have two vectors (of timestamps)
d1 <- as.POSIXct(strptime("2.2.2002 07:00", format="%d.%m.%Y %H:%M"))
d2 <- as.POSIXct(strptime("4.2.2002 07:00", format="%d.%m.%Y %H:%M"))
seq1 <- seq(d1, d2, "hours")
seq1
d3 <- as.POSIXct(strptime("2.2.2002 15:22", format="%d.%m.%Y %H:%M"))
d4 <-
2009 Dec 31
3
XML and RCurl: problem with encoding (htmlTreeParse)
Hi,
I'm trying to get data from web page and modify it in R. I have a
problem with encoding. I'm not able to get
encoding right in htmlTreeParse command. See below
> library(RCurl)
> library(XML)
>
> site <- getURL("http://www.aarresaari.net/jobboard/jobs.html")
> txt <- readLines(tc <- textConnection(site)); close(tc)
> txt <- htmlTreeParse(txt,
2009 Oct 20
2
Problems importing Unix SAS .ssd04 file to R (Win)
Hello,
I'm trying to import a SAS file made using SAS on Unix. Currently I'm
using SAS on Windows and I'm trying to import that .ssd04 file to R.
The file name of the file is testfile.ssd04 and it is located in
'M:\sasuser'. I'm using Windows XP and R 2.91. Basically what I'm
doing is
############ r code ##############
> library(foreign)
> sashome <-
2018 Dec 08
2
Possible encoding bug in sub()
I noticed that sub() gives unexpected results for the following test
case. In the test case, the (initial) input is ASCII but the
replacements are UTF-8. The first sub() produces an UTF-8 result with
an "unknown" Encoding. This makes the result garbled in Windows (no
UTF-8 locale there). The second sub() produces a correct result,
although for some reason it is converted to the native
2010 Jul 23
1
model.tables call fails with "Error in inherits(object, "formula")"
Hello,
I noticed that model.tables fails when applied to an aov() fit if called
inside a function. The problem seems to occur when as.formula is used
inside a function on a string containing
"<formula> + Error( x / y )"
The reason I tried to use as.formula is to generate dynamic calls to aov().
Here is a minimal example illustrating the problem:
## Example
test <-
2009 Sep 17
1
RCurl and Google Scholar's EndNote references
Hi!
I've performed a Google Scholar Search using a query, let's say "Frank
Harrell", and parsed the links to the EndNote references from the resulting
HTML code. Now I'd like to download all the references automatically. For
this, I have tried to use RCurl, but I can't seem to get it working: I
always get error code "403 Forbidden" from the web server.
2018 Feb 07
1
Possible bug in package installation when R_ICU_LOCALE is set
On a Windows computer (other platforms not tested), installing a
package from source may fail if the environment variable R_ICU_LOCALE
is set, depending on the package and the locale.
For example, after setting R_ICU_LOCALE to "fi_FI",
install.packages("seriation", type = "source")
(package version 1.2-3) fails with the following error:
** preparing package for
2010 Apr 13
2
Help required with png graphic production as text has shadows?
I have produced a series of graphs with the png command, however when I have finally printed these out the black text appears to have a colour shadow with blue or red on either side of the letter.
I tried increasing my res to 1200 and this improved it somewhat, but the text is still not sharp and occassionally these "shadows" will still print.
I initially thought this was an issue with
2018 Apr 26
1
Possible bug in package installation when R_ICU_LOCALE is set
(Belated) thanks for the confirmation, Ista. I just reported this issue on the R bug tracker:
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17412
Best regards,
- Mikko
-----Alkuper?inen viesti-----
L?hett?j?: Ista Zahn [mailto:istazahn at gmail.com]
L?hetetty: 7. helmikuuta 2018 17:05
Vastaanottaja: Korpela Mikko (MML)
Kopio: r-devel at r-project.org
Aihe: Re: [Rd] Possible bug in
2007 Oct 30
3
strwidth of bold font
Hi!
Is there a way to get the string width of the bold typefaces?
like: strwidth("text", family = "serif", font = 2).
Thanks
Roland
2009 May 12
4
different results on linux and windows
Dear R experts,
we are preparing an R-package to compute the Oja Median which contains
some C++ code in which random numbers are needed. To generate the random
numbers we use the following Mersenne-Twister implementation:
// MersenneTwister.h
// Mersenne Twister random number generator -- a C++ class MTRand
// Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
// Richard J.
2009 Apr 29
1
RweaveHTML (R2HTML) Help
I have found Sweave() to be great for producing PDF documents. I have
been experimenting with RweaveHTML (from the R2HTML) package and have
had moderate success. My main issue has been that I simply want the R
output to be shown verbatim in the HTML document but RweaveHTML tends to
convert most output to a table, for example. So, is there a way to
force the RweaveHTML driver to simply provide
2002 Aug 14
1
strwidth
Dear plotting experts,
I need to determine the width of a string before plotting it to the
current device because I want to adjust `mai' to have
the necessary space available. It seems to me that this is an "hen and
egg" problem:
R> a <- "test"
R> strwidth(a)
Error in strwidth(a) : plot.new has not been called yet
# ok, I need an open device
R> plot(1:2,
2004 Nov 20
1
Error with strwidth after lattice graphic drawn
In
platform i386-pc-linux-gnu
arch i386
os linux-gnu
system i386, linux-gnu
status
major 2
minor 0.1
year 2004
month 11
day 15
language R
I'm getting an error when using strwidth after a lattice graphic is drawn:
library(lattice)
xyplot(runif(20) ~ runif(20))
strwidth('xxx')
Error in strwidth("xxx") : invalid graphics state
Any help
2008 Nov 14
0
Cross-validation
Hi,
I was trying to do cross-validation using the crossval function (bootstrap package), with the following code:
---------------------------------------------------------------------------------------------------------
theta.fit <- function(x,y){
model <- svm(x,y,kernel = "linear")
}
theta.predict <- function(fit,x){
prediction <- predict(fit,x)
2007 Nov 07
1
strwidth and strheight for rotated text
Dear All,
I would like to plot text with a box around it. I used strwidth and
strheight to compute the size of the box which is plotted with rect:
z <- rnorm(10)
# horizontal text works
plot(rnorm(10))
x1 <- 5
y1 <- 0
label <- "Label"
cha <- paste(" ", label, " ", sep = "")
xh <- strwidth(cha, cex = par("cex"))
yh <-
2009 Jan 05
1
strwidth to lines
Dear members,
Is there a way to turn a strwidth of a string into a number of lines
that ist needed to display the string when using par(mar = c(?,4,4,2))
####
x = 1:5
names(x) = c("ZZZZZ","ZZZZZzzzzz","ZZZlllll","TTTTT","Zzhtsddfg" )
par(mfrow = c(1,2))
par(mar = c(8,4,4,2))
barplot(x, las = 3, main = "8 is to much")
par(mar =
2007 Aug 30
1
Barplot2 using for loop, how to adjust margins?
Hi R-users,
I inted to make multiple plots using for loop. The question is how can
I adjust the left hand side margin of the plot according to the
names.arg argument in barplot2. In every plot I have different
annotations in the y axis and they vary in length. Now when I have
fixed margins
opar <- par(mar=c(3,15,0,2)...
I get the same margins in all of the plots. That leaves lots of white