Displaying 20 results from an estimated 400 matches similar to: "alternative to rbind within a loop"
2009 Mar 10
4
puzzled by math on date-time objects
Hi,
I don't understand the following. When I create a small artificial set
of date information in class POSIXct, I can calculate the mean and the
median:
a = as.POSIXct(Sys.time())
a = a + 60*0:10; a
[1] "2009-03-10 11:30:16 EDT" "2009-03-10 11:31:16 EDT" "2009-03-10
11:32:16 EDT"
[4] "2009-03-10 11:33:16 EDT" "2009-03-10 11:34:16
2007 Oct 27
1
having problems re-ordering a dataframe
Dear R users,
I need to reorder a dataframe using 3 variables for the determine the
sorting order.
When I create a simple dataframe to test the method, things work as I
expected:
a1 <- rep(1:10, each=8)
a2 <- rep(rep(1:2, each=4), 10)
a3 <- rep(c(1:4),20)
(a <- data.frame(a1, a2, a3))
for each combination of a1 and a2, a3 is increasing
t <- order(a$a1, a$a2, rev(a$a3))
b
2012 Apr 17
1
puzzling Date math result
Hi,
I cannot make a reproducible example easily for my problem, so I'll
describe it as best as I can.
I merged 2 dataframes but was surprised when one line on the x
dataframe did not get a match in the y dataframe, because I knew such
a match existed. There was only one "by" variable in the merge, in
Date format:
in x:
$ p?riode : Date, format: "2009-06-09"
2007 Aug 27
1
R 2.5.1 - Rscript through tee
Hi, people.
I met a little problem for which someone might have a solution. Let's
say I have an executable file (named "pp.R") with this contents:
#!/usr/bin/Rscript
options(echo=TRUE)
a <- 1
Sys.sleep(3)
a <- 2
If I execute "./pp.R" at the shell prompt, the output shows the timely
progress of the script as expected. If I use "./pp.R | tee
2008 Feb 14
1
Small encoding question
Dear developeRs,
Compilation of the latest version (0.9-5) of my actuar package fails
with r-release MacOS_X ix86 on CRAN; see
http://www.R-project.org/nosvn/R.check/r-release-macosx-ix86/actuar-00check.html
All errors come from accented letters in comments in latin-1 encoded
files (except hierarc.R which is in UTF-8, my bad). Encoding is
declared as latin-1 in DESCRIPTION.
The package
2006 Feb 23
1
Tiny documentation error for ?options (PR#8633)
Hi, people. The output produced by "?options" contains:
'expressions': sets a limit on the number of nested expressions
that will be evaluated. Valid values are 25...500000 with
default 1000. [...]
and a bit further down:
The 'factory-fresh' default settings of some of these options are
[...]
'expressions'
2006 May 15
2
Truncated labels in hist (PR#8864)
Hi, people. Executing the following command:
hist(rpois(100,5), labels=TRUE)
yields a graphic in which some labels are truncated (on an X11 device).
The truncated labels are those over the highest bars. The hist function
should ideally manage enough room for the labels, automatically.
(Specifying ylim solves my problem, but yet, hist could be frienlier.)
--please do not edit the
2009 Nov 24
1
Encoding problems.
Hello,
I use:
R version 2.9.2 (2009-08-24)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
on Ubuntu 9.10, I usually run R from ESS (5.4 on current Unbuntu) from
Emacs-22.2.1. But I also tried the following from the console and it
gave the same results.
I have a data file containing lots of European characters, French,
German, Italian and so on. I can read it
2006 Feb 01
1
Difficulty with qqline in logarithmic context
Hi, R friends. I had some difficulty with the following code:
qqnorm(freq, log='y')
qqline(freq)
as the line drawn was seemingly random. The exact data I used appears
below. After wandering a bit within the source code for "abline",
I figured out I should rather write:
qqnorm(freq, log='y')
par(ylog=FALSE)
qqline(log10(freq))
par(ylog=TRUE)
2001 Feb 16
1
different_languages_problem
Hi,
what to do with this?
thanks in advance
[serge@rex serge]$ wine write.exe
Invoking /opt/wine/bin/wine.bin write.exe ...
For language 'fr' several language ids were found:
fr_FR - 040C; fr_BE - 080C; fr_CA - 0C0C; fr_CH - 100C; fr_LU - 140C;
Instead of using first in the list, suggest to define
your LANG environment variable like this: LANG=fr_FR
Wine exited with a successful status
2017 Apr 28
2
Unable to add a particular member to group (Samba 4.6.3)
On Fri, 28 Apr 2017 11:01:14 -0400
Luc Lalonde <Luc.Lalonde at polymtl.ca> wrote:
> Hello Rowland,
>
> Is this what you mean?
>
> [root at roquefort ~]# echo $LANG
> fr_CA.utf8
>
What I was trying to get at is, does your username have any of those
funny marks above some of the letters (you can tell I am English, I
don't know the correct name for them because we
2006 May 27
0
Correction to ?alist (PR#8904)
Hi, people. ?alist says:
'alist' is like 'list', except in the handling of tagged arguments
with no value.
As written, this description is misleading. For example:
> list(e=3+5)
$e
[1] 8
> alist(e=3+5)
$e
3 + 5
We are not in the situation of tagged arguments with no value, and then,
clearly, 'list' and 'alist' behave
2006 Jun 03
0
Irregularity in stem() display (PR#8934)
Hi, R people.
Consider the following small R session:
======================================================================>
> a <- c(8.48, 9.58, 9.96)
> stem(a)
The decimal point is at the |
8 |
8 | 5
9 |
9 | 6
10 | 0
> stem(round(a,1))
The decimal point is at the |
8 | 5
9 |
9 | 6
10 | 0
2005 Jan 06
6
"labels" attached to variable names
Hi,
Can we attach a more descriptive "label" (I may use the wrong
terminology, which would explain why I found nothing on the FAQ) to
variable names, and later have an easy way to switch to these labels in
plots? I fear this is not possible and one must enter this by hand as
ylab and xlab when making plots.
Thanks in advance,
Denis Chabot
2006 Feb 22
1
Spurious output white line in R script (PR#8631)
I noticed that R scripts produce a spurious white line after output.
For example, the following shell script,
#!/bin/sh
R --slave --vanilla <<EOF
cat("Hello\n")
EOF
when made executable under the name ``hello`` along the search path, behaves
like this:
$ hello | od -bc
0000000 110 145 154 154 157 012 012
H e l l o \n \n
0000007
The second newline is
2008 Apr 15
0
Small memory leak in plot on OS X (PR#11170)
Full_Name: Arnaud Bergeron
Version: 2.6.2
OS: Mac OS X 10.5.2
Submission from: (NULL) (69.157.224.197)
When I run the following loop
repeat { plot(seq(5), seq(5)) }
the memory consumed by the process goes up by a small amout each time. I tried
this with the quartz() and pdf() output devices. Only a single output device is
created by the process and is repeatedly overwritten by plot().
Also
2006 Mar 28
1
Error once having applied (PR#8718)
Hi, people. Here is a transcript of a "R --vanilla" session:
======================================================================>
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1 (2005-12-20 r36812)
ISBN 3-900051-07-0
R est un logiciel libre livr?? sans AUCUNE GARANTIE.
Vous pouvez le redistribuer sous certaines conditions.
Tapez 'license()'
2006 Jun 04
4
xy.coords(MATRIX) bug in code or documentation (PR#8937)
Hi, people.
xy.coords() does not behave like its documentation says, when given some
matrices. ?xy.coords says:
If 'y' is 'NULL' and 'x' is a [...] formula [...] list [...]
time series [...] matrix with two columns [...]
In any other case, the 'x' argument is coerced to a vector and
returned as *y* component [...]
Now, consider this short
2005 Feb 04
5
2 small problems: integer division and the nature of NA
Hi,
I'm wondering why
48 %/% 2 gives 24
but
4.8 %/% 0.2 gives 23...
I'm not trying to round up here, but to find out how many times
something fits into something else, and the answer should have been the
same for both examples, no?
On a different topic, I like the behavior of NAs better in R than in
SAS (at least they are not considered the smallest value for a
variable), but at the
2009 Aug 05
2
reading and frequency analysis of Spanish text
For an historical paper I'm working on, I have some Spanish plaintext,
presently in the form of a Word .doc
file,
http://euclid.psych.yorku.ca/SCS/Gallery/images/Private/Langren/Verdadera-spanish-stripped.doc
and also some ciphered text from the same original source. The ultimate
goal is to use some
frequency analysis of letters and word lengths in the plaintext to help
decode the