Displaying 20 results from an estimated 600 matches similar to: "why function 'sum' within 'aggregate' need an 'index'?"
2007 Sep 20
2
Plotmath issue superscript "-"
Dear List,
I'm trying to typeset some chemical ions in axis labels. These have both
super and subscript components, and for some, I need a superscript "-".
In LaTeX I might use $NO_3^-$ to do the typesetting, but I'm having a
problem getting the correct invocation for expression:
> expression(NO^{-}[3])
Error: syntax error, unexpected '}' in
2006 Dec 24
1
how to do the "double substitute" in a loop?
Hi, people
I am just new to R, when writing my loop functions, I meet a problem.
There are some data frames, their names is randomized, ( e.g. a1,b3,c7,
etc), what should I write it when I want to see them printed together in a
loop function? I have tried :
> for ( df in 'a1','b3','c7') {
+ print(print(df))
+ }
the
2009 Jan 22
1
Is there any function can be used to compare two probit models made from same data?
hi, people
How can we compare two probit models brought out from the same data?
Let me use the example used in "An Introduction to R".
"Consider a small, artificial example, from Silvey (1970).
On the Aegean island of Kalythos the male inhabitants suffer from a
congenital eye disease, the effects of which become more marked with
increasing age. Samples of islander males
2007 Jul 31
2
Q: obtaining non-transparent background in png
I am not understanding something about generating PNG plots.
I have tried several ways to obtain something other than a transparent
background, but nothing I've done seems to change the background.
For example:
dev.print(png, width=800, height=600, bg='red', filename='example.png')
which I thought would give a red background, simply gives the same
transparent background I
2007 Aug 03
0
correct Rd markup for \value{}
Dear DevelopeRs
Several functions in a package of mine have complex returned objects
that are lists within the returned list. I wish to document each of the
components of these sublists.
If I do this within a \value{} section and nest \item within an existing
\item, I get indented R-help sections in the standard help view (eg as
shown by ?foo in Linux), but not in the PDF.
For example:
2006 Dec 27
3
how to transform string to variable name in a fuction?
there is a data frame, like this:
> df
aa bb
1 a 20.27802
2 b 22.10664
3 c 21.33470
4 a 22.32898
5 b 19.73760
6 c 20.38979
.....(suppressed)
what I want to do is to copy the data frame's rows into different data frames according to the levels of 'aa' column,
> df.a <- df[df[,1]=='a',] ; df.b <- df[df[,1]=='b',] ; ....
2006 Dec 27
0
R-help Digest, Vol 46, Issue 27
On Wednesday 27 December 2006 06:00, r-help-request at stat.math.ethz.ch wrote:
> jingjiangyan
I agree, you can use 'assign'. To be more explicit, you could use the
following function.
jingjiangyan <-
function(formula, data)
{
m <- match.call()
"%,%" <- function(x,y)paste(x,y,sep="")
d.nm <- as.character(m$data)
y.nm <-
2011 Sep 26
1
producing an aggregate table of top 3 by cost
Help-Rs
As someone who is newer to R and trying to make the transition from Access into R, there is a frequetnly used function that I'd like to try and duplicate in the R world. It involved creating an aggregate table of the top (n) orders for an item by sum of cost over a select period of time.
So, take the following example :
group <- c(rep(1,10), rep(2,10), rep(3,10))
product
2004 Nov 15
2
argument rationalization
Hi
I am writing a bunch of functions that take two, three or four
arguments. These functions operate on vectors of the same length;
but I want the function
to behave sensibly if one or more arguments are scalars. "+" does
this for two arguments:
"+"(1:10,3) # interpreted as "+"(1:10,rep(3,10))
But my functions can take more arguments. Say f() takes three:
2009 May 15
3
[Bug 1598] New: ssh hangs up on exit
https://bugzilla.mindrot.org/show_bug.cgi?id=1598
Summary: ssh hangs up on exit
Product: Portable OpenSSH
Version: 4.3p2
Platform: All
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: ssh
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: beststory at yandex.ru
2008 Feb 05
1
Inconsistent lattice scales$x$at,label behaviour for POSIXct
I have encountered the following behaviour in lattice in 2.6.1 (and
2.4.0) which differs depending upon the type you use. I believe the
numeric behaviour to be correct, and the POSIXct behaviour to be in
error.
When the x data and x axis in a lattice graph are POSIXct, and when
using scales$x$at and scales$x$labels to add custom labels:
If the first visible at value is not the first
2013 Jan 09
2
Using objects within functions in formulas
Dear all,
I'm looking to create a formula within a function to pass to glmer()
and I'm having a problem that the following example will illustrate:
library(lme4)
y1 = rnorm(10)
x1 = data.frame(x11=rnorm(10), x12=rnorm(10), x13=rnorm(10))
x1 = data.matrix(x1)
w1 = data.frame(w11=sample(1:3,10, replace=TRUE), w12=sample(1:3,10,
replace=TRUE), w13=sample(1:3,10, replace=TRUE))
test1 <-
2016 May 04
1
[PATCH] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
Using /proc/cpuinfo to get processors count is more portable.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
tools/virtio/ringtest/run-on-all.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtio/ringtest/run-on-all.sh b/tools/virtio/ringtest/run-on-all.sh
index
2016 May 04
2
[PATCH v2] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
Using lscpu to get processors count is more portable.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
v2: use lspcu instead of /proc/cpuinfo as per Cornelia's suggestion
tools/virtio/ringtest/run-on-all.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
2016 May 04
2
[PATCH v2] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
Using lscpu to get processors count is more portable.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
v2: use lspcu instead of /proc/cpuinfo as per Cornelia's suggestion
tools/virtio/ringtest/run-on-all.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
2016 May 04
4
[PATCH v3] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
Using lscpu to get processors count is more portable.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
v3: simplify by using lscpu -p=cpu
v2: use lspcu instead of /proc/cpuinfo as per Cornelia's suggestion
tools/virtio/ringtest/run-on-all.sh | 4 ++--
1 file changed, 2 insertions(+), 2
2016 May 04
4
[PATCH v3] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
Using lscpu to get processors count is more portable.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
v3: simplify by using lscpu -p=cpu
v2: use lspcu instead of /proc/cpuinfo as per Cornelia's suggestion
tools/virtio/ringtest/run-on-all.sh | 4 ++--
1 file changed, 2 insertions(+), 2
2011 Dec 03
1
Reading multiple text files and then combining into a dataframe
I have a multiple text files, separated by a single space, that I need to
combine into a single data.frame. Below is the track I'm on using
list.files to capture the names of the files and then lapply with
read.table. But I run into problems making a usable dataframe out of the
data.
#Creating example data in similar format to data I have
sub <- rep(1,10)
trial <- seq(1,10,1)
size
2016 May 04
0
[PATCH] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
On Wed, 4 May 2016 09:12:56 +0300
Mike Rapoport <rppt at linux.vnet.ibm.com> wrote:
> /dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
> Using /proc/cpuinfo to get processors count is more portable.
>
> Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
> ---
> tools/virtio/ringtest/run-on-all.sh | 4 ++--
> 1 file changed, 2
2016 May 04
0
[PATCH v2] tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu
On Wed, 4 May 2016 10:59:53 +0300
Mike Rapoport <rppt at linux.vnet.ibm.com> wrote:
> /dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
> Using lscpu to get processors count is more portable.
>
> Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
> ---
> v2: use lspcu instead of /proc/cpuinfo as per Cornelia's suggestion
>