Displaying 20 results from an estimated 34 matches for "ccbr".
Did you mean:
ccb
2010 Nov 08
7
How to rbind list of vectors with unequal vector lengths?
Hi,
How to rbind these vectors from a list?:
> l <- list(a = c(1, 2), b = c(1, 2, 3))
> l
$a
[1] 1 2
$b
[1] 1 2 3
> do.call(rbind, l)
[,1] [,2] [,3]
a 1 2 1
b 1 2 3
Warning message:
In function (..., deparse.level = 1) :
number of columns of result is not a multiple of vector length (arg 1)
>
-J
2007 Dec 11
2
range( <dates>, na.rm = TRUE ) (PR#10508)
...is playing tricks with the PR# again. Attempting to
refile so that we can kill PR#10509)
Peter Dalgaard wrote:
> Kurt.Hornik at wu-wien.ac.at wrote:
> =20
>> ------- Start of forwarded message -------
>> Date: Tue, 13 Nov 2007 21:44:57 +0100
>> To: Steve Mongin <sjm at ccbr.umn.edu>
>> Cc: cran at r-project.org
>> Subject: Re: range( <dates>, na.rm =3D TRUE )
>> In-Reply-To: <200711062044.OAA14064 at minnow.ccbr.umn.edu>
>> Reply-To: Kurt.Hornik at wu-wien.ac.at
>> From: Kurt Hornik <Kurt.Hornik at wu-wien.ac.at>
>...
2007 Dec 11
1
[Kurt.Hornik@wu-wien.ac.at: Re: range( <dates>, na.rm = TRUE )] (PR#10508)
------- Start of forwarded message -------
Date: Tue, 13 Nov 2007 21:44:57 +0100
To: Steve Mongin <sjm at ccbr.umn.edu>
Cc: cran at r-project.org
Subject: Re: range( <dates>, na.rm = TRUE )
In-Reply-To: <200711062044.OAA14064 at minnow.ccbr.umn.edu>
Reply-To: Kurt.Hornik at wu-wien.ac.at
From: Kurt Hornik <Kurt.Hornik at wu-wien.ac.at>
X-AntiVirus: checked by AntiVir MailGate (version:...
2010 Aug 18
1
Problem using 'get'
...rea
R then outputs the list of Area measurements for image 3.
However if I type:
> get("datasplit$\"3\"$Area")
or
>get('datasplit$"3"$Area')
R returns errors saying the object does not exist.
Any help is appreciated,
JT
Johnny Tkach, PhD
Donnelly CCBR, Rm. 1230
Department of Biochemistry
University of Toronto
2007 Dec 11
0
[Kurt.Hornik@wu-wien.ac.at: Re: range( <dates>, na.rm = (PR#10509)
Kurt.Hornik at wu-wien.ac.at wrote:
> ------- Start of forwarded message -------
> Date: Tue, 13 Nov 2007 21:44:57 +0100
> To: Steve Mongin <sjm at ccbr.umn.edu>
> Cc: cran at r-project.org
> Subject: Re: range( <dates>, na.rm =3D TRUE )
> In-Reply-To: <200711062044.OAA14064 at minnow.ccbr.umn.edu>
> Reply-To: Kurt.Hornik at wu-wien.ac.at
> From: Kurt Hornik <Kurt.Hornik at wu-wien.ac.at>
> X-AntiVirus: checke...
2010 May 23
4
creating a reverse geometric sequence
Hello,
Can anyone think of a non-iterative way to generate a decreasing geometric
sequence in R?
For example, for a hypothetical function dg, I would like:
> dg(20)
[1] 20 10 5 2 1
where I am using integer division by 2 to get each subsequent value in the
sequence.
There is of course:
dg <- function(x) {
res <- integer()
while(x >= 1) {
res <- c(res, x)
x
2010 Sep 18
3
How to check the available of a package on R repo
Hi folks,
Debian 504 64-bit
What is the correct syntax to check the available of a package on R repo?
> available.packages("emacs", "OS_type=linux")
Warning: unable to access index for repository emacs
Package Version Priority Depends Imports LinkingTo Suggests Enhances
OS_type License File Repository
> available.packages("emacs")
Warning: unable
2010 Aug 11
4
Arbitrary number of covariates in a formula
Hello!
I have something like this:
test1 <- data.frame(intx=c(4,3,1,1,2,2,3),
status=c(1,1,1,0,1,1,0),
x1=c(0,2,1,1,1,0,0),
x2=c(1,1,0,0,2,2,0),
sex=c(0,0,0,0,1,1,1))
and I can easily fit a cox model:
library(survival)
coxph(Surv(intx,status) ~ x1 + x2 + strata(sex),test1)
However, I want to
2010 Feb 16
3
Keyboard
All,
I installed R-2.10.1 with Readline=no. Now for some reason R does not recognize some key strokes like the directional arrows.
I am not sure if Readline is the problem or not.
I have tried .Cofigure with Readline = yes but it doesn't fix the problem nor do I really know if readline is the problem to start with.
Has anybody else run into similar problems?
Thanks,
Steve
[[alternative
2010 May 23
3
Selecting first 7 elements
Hi,
I have a list of 100, each list has 20 elements, and I would like to
select the first 7 elements in each list.
Let's take the alphabet as an example.
x <- lapply(1:100, function(i) sample(LETTERS))
I tried x[[1:7]], but it doesn't work. Can anyone enlighten me on how
to do such selections?
Thank you.
Kang Min
2010 May 31
0
Put two plots side by side
...newpage()
pushViewport(viewport(layout=grid.layout(1,2)))
print(p, vp=vport(1,1))
print(p1, vp=vport(1,2))
?
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
----- Original Message ----
> From: Erik Iverson <eriki at ccbr.umn.edu>
> To: Peng Yu <pengyu.ut at gmail.com>
> Cc: ggplot2 <ggplot2 at googlegroups.com>
> Sent: Sun, May 30, 2010 7:45:22 PM
> Subject: Re: Put two plots side by side
>
>
>
> I want to put the above two plots side by side (essentially,
> to mimic
&g...
2010 Oct 05
4
R editor in ubuntu!
Hello R-Users!
I am looking for an editor to be able to execute commands into R in Linux ubuntu. Is there any suggestion?
Thanks.
[[alternative HTML version deleted]]
2010 Jun 16
3
Function argument as string
Hi,
Suppose a write a function
a_fn<-function(arg1)
{
return(table(arg1));
}
I have a column called AGE. Now I call the function c = a_fn(AGE);
When a_fn is called, AGE is received in arg1. My question is, how do I
access the actual name of the argument arg1? i.e, inside the
function, i need to know that the actual name of arg1 is "AGE" in this
case.
Thanks in advance,
2011 Mar 23
3
Compare three or more values?
Is there a less cryptic way to compare three or more values?
allTheSame<-c("red","red","red","red")
notAllTheSame<-c(132,132,132,999)
all.identical <- function(vectorToTest){
cIdentical=sum(vectorToTest %in% vectorToTest[1])
return(cIdentical==length(vectorToTest))
}
all.identical(allTheSame)
all.identical(notAllTheSame)
Thanks in
2010 Feb 14
4
Feature Request: Multiline Comments
Hello,
Is it possible to extend the R lexer/parser to include multiline comments like
/*
acomment
*/
?
This way I can integrate emacs org-mode with my R code, so that I can
have a table of contents,
section folding, html-output of source etc.
e.g
/*
* Display Code
*/
#+BEGIN_SRC R
foo <- function(...){
stuff
}
#+end_src
and so on .
Thanks
Saptarshi
2010 Jul 16
4
how to comment off sections
Hello,
Is there an way to easy comment of sections of code? I was thinking
something along the lines of
\dontrun{
codeline 1
....
codeline k
}
but that could be used in regular script files. When I am still
working on a script, I often want to being using what is done, but I
would like the parts I am still working on not to be run when I use
source() on the file. I can set everything off
2011 May 04
3
SAPPLY function XXXX
Hello everyone,
I am attempting to write a function to count the number of non-missing
values of each column in a data frame using the sapply function. I have the
following code which is receiving the error message below.
> n.valid<-sapply(data1,sum(!is.na))
Error in !is.na : invalid argument type
Ultimately, I would like for this to be 1 conponent in a larger function
that will produce
2010 Apr 30
3
replace elements in a list
Dear all, I have a list like this: l <- list(list(a=1,b=NULL), list(a=2,b=2))
I want to find out the elements with value of NULL and replace them with NA.
The actual case has a very long list, so manually find out and replace
them is not an option.
I can use for loop to do this, but I want to know if there is
vectorized way (or other ways) to do it?
Thanks
--
Wincent Rong-gui HUANG
Doctoral
2010 Jun 15
3
How to see how a function is written
Hello,
If I want to see how, say, apply function is written, how would I be
able to do that?
Just typing "apply" at the prompt does not work.
Thank you for help!
Sergey
2010 Oct 25
2
Question on passing the subset argument to an lm wrapper
Hello,
How would you go about handling the following situation?
This is on R 2.12.0 on Ubuntu 32-bit.
I have a wrapper function to lm. I want to pass in a
subset argument. First, I just thought I'd use "...".
## make example reproducible
set.seed(123)
df1 <- data.frame(age = rnorm(100, 50, 10),
bmi = rnorm(100, 30, sd = 2))
## create a wrapper using