Displaying 20 results from an estimated 20000 matches similar to: "Problem with R on USB-drive"
2008 Jun 30
2
Plotting question: Problem with strwidth in 2.7.1
R users,
I have a problem with function strwidth in 2.7.1. I'm trying to set
the plot margins in a way that horizontal
column labels will fit to the graph. tmp.t is a list of data.frame
objects. This code works well in 2.6.0.
...snip..
library(gplots)
for (i in names(tmp.t)) {
bmp(filename=paste(i, "_", Sys.Date(), ".bmp", sep=""),
width=1038,
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
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,
2008 Jul 04
1
Hmisc latex: table column width
R users,
I'm trying to set a column width to one of the columns in a latex
table (using Hsmic package, latex function). My intention is to get
\begin{tabular}{lp{1.2in}llllll}\hline\hline
Here's an example
####### R code #########
DF <- data.frame(Titanic)
DF$long <- paste("This is a veeeeeeeeeeryyyyyyyyyy long line")
DF <- DF[, names(DF)[c(6,1:5)]]
library(Hmisc)
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
2009 Sep 08
7
Data separated by spaces, getting data into R using field lengths
I have a text file similar to this (separated by spaces):
x <- "DF12 This is an example 1 This
DF12 This is an 1232 This is
DF14 This is 12334 This is an
DF15 This 23 This is an example
"
and I know the field lengths of each variable (there is 5 variables in
this data set), which are:
varlength <- c(2, 2, 18, 5, 18)
How can I import this kind of data into R, using the varlength
2008 Feb 21
4
How to get names of a list into df:s?
R users,
I have a simple lapply question.
g <- list(a=1:3, b=4:6, c=7:9)
g <- lapply(g, function(x) as.data.frame(x))
lapply(g, function(x) cbind(x, var1 = rep(names(g), each=nrow(x))[1:nrow(x)]))
I get
$a
x var1
1 1 a
2 2 a
3 3 a
$b
x var1
1 4 a
2 5 a
3 6 a
$c
x var1
1 7 a
2 8 a
3 9 a
And I would like to have
$a
x var1
1 1 a
2 2 a
3 3 a
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 04
1
Problem with .libPaths & Rterm.exe (under Vista)
Dear list,
I?m using R embedded in another program (coded in tcl/tk) under Windows
Vista. In this context I don?t launch Rgui.exe but rather Rtem.exe.
Now I have a problem finding libraries not specifically installed as
administrator (and which are not in the path ?program files? but in
Contacts\Documents of the current user). To be precise, the user
launching my tcl/tk program can?t find
2008 Aug 20
2
Random sequence of days?
Dear list,
I tried to find a solution for this problem from the archives but
couldn't find any. I would like sample sequence of ten days from
vector d
d <- seq(as.Date("2007-02-12"), as.Date("2008-08-18"), by="days")
so that the days follow each other (sample(d, 10) is not the
appropriate solution). Any ideas?
Best regards,
Lauri
2008 Jan 14
6
Ceiling to the nearest ten?
R-users,
Is there a function for ceiling to the nearest ten?
a <- 1:10*4
a
[1] 4 8 12 16 20 24 28 32 36 40
The resulting vector should look like this ("ceiling to the nearest ten")
[1] 10 10 20 20 20 30 30 40 40 40
Thanks in advance
Lauri
2007 Sep 10
3
plot legend: combining filled boxes and lines
Hello,
I have difficulties combining boxes and lines in plot legend. I
searched previous R-posts and found this (with no solution):
http://tolstoy.newcastle.edu.au/R/help/06/07/30248.html. Is there a
way to avoid boxes behind the line legends?
x1 <- rnorm(100)
x2 <- rnorm(100, 2)
hist(x1, main = "", col = "orange",ylab = "density", xlab = "x", freq
=
2007 May 18
4
Simple programming question
Hi R-users,
I have a simple question for R heavy users. If I have a data frame like this
dfr <- data.frame(id=1:16, categ=rep(LETTERS[1:4], 4),
var3=c(8,7,6,6,5,4,5,4,3,4,3,2,3,2,1,1))
dfr <- dfr[order(dfr$categ),]
and I want to score values or points in variable named "var3" following this
kind of logic:
1. the highest value of var3 within category (variable named
2007 Mar 20
6
Select the last two rows by id group
Hi R-users,
Following this post http://tolstoy.newcastle.edu.au/R/help/06/06/28965.html ,
how do I get last two rows (or six or ten) by id group out of the data
frame? Here the example gives just the last row.
Sincere thanks,
Lauri
[[alternative HTML version deleted]]
2007 Aug 07
4
Number of days in each month
Hi R-users,
What is the best way to achieve a table which contains all days and months
between years 2007-2020? I would like to calculate number of days in each
month within those years (to data frame).
Regards,
Lauri
[[alternative HTML version deleted]]