Displaying 20 results from an estimated 20000 matches similar to: "integer vector to a string"
2002 Jan 16
4
faster vector subtraction??
hi
is there a faster way to do this?
i <- 1
for(x in vector1)
for(y in vector2) {
m[[i]] <- (x - y)
i <- i + 1
}
regards soren
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in
2002 Jul 06
2
emacs, ess, command completion?
I'm using
win XP
R 1.51 (Rterm)
emacs-20.7
ess-5.1.20
and everything except from command completion works
Is it possible to have this functionality using a windows enviroment?
thanks soren
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2004 Jun 27
2
subset drop unused levels
hi there
tried to use subset with drop=TRUE, but all the 'old' levels are preserved,
i.e. when calling e.g. ftable a lot of zeros are displayed
>x<-subset(LREG, (kir=='AA' | kir=='BB') & (type=='t1' | otype=='t2'),
drop=TRUE, select=c(event, kir, type))
> ftable(x)
i explicit have to call factor like
2004 Jan 19
1
ftable to LaTeX
hi there
is there a way to convert objects of class ftable into LaTex code
preserving the 'look' with row and column infomation?
xtable() {xtable} can't handle such objects and latex() {Hmisc} just texify
the number matrix,
without row/column information
regards soren
2006 May 16
1
R(DCOM) / StatConnector and PHP
hi
does anyone have knowledge on how to connected to StatConnector from PHP
I have tried:
new COM("STATCONNECTORSRVLib.StatConnector") or die("Unable to
instantiate StatConnector");
with no succes
regards soren
2004 Jan 08
1
multiple plot
hi there
i've got this litle strange problem working with multiple plots i one screen
the title dissapears when more than 4 images comes up
up to 4 plots the title it shows nicely
the display is set up like:
split.screen(figs=c(3,4), erase=TRUE)
some plots
close.screen(all=T)
title(main='TITLE 1')
what am i doing wrong here
regards soren
2001 Dec 06
2
Contrasts in lm
Dear all,
In SAS (GLM and MIXED) estimable functions (linear functions of the
parameters) can be specified in the ESTIMATE and CONTRAST statements.
Has anyone written a similar "utility" for use in connection with lm?
Thanks in advance
S?ren H?jsgaard
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2006 Jul 08
1
survfit, unused argument(s) (error ...)
Hi
It seems that survfit() doesn't accept the argumnet 'error' as below
>survfit(fit, error='greenwood')
Error in survfit.coxph(fit, error = "greenwood") :
unused argument(s) (error ...)
Isn't is allowed to do that for a coxph object?
Regards Soren
Windows XP, SP2
R 2.3.0
2004 Aug 17
2
table and getting rownames
hi there
say that i have this table
>x<-table(adoc, oarb)
>x
oarb
0 1
adoc
ab 1 0
am 5 1
ba 14 1
cc 271 3
ch 87 2
dz 362 6
fl 7 0
fs 84 2
is there an easy way to get the row names or row
2011 Feb 20
8
Generating uniformly distributed correlated data.
I wish to generate a vector of uniformly distributed data with a
defined correlation to another vector
The only function I have been able to find doing something similar is
corgen from the library ecodist.
The following code generates data with the desired correlation to the
vector x but the resulting vector y is normal and not uniform
distributed
library(ecodist)
x <- runif(10^5)
y
2006 Oct 05
3
How to get the function names
I've defined the function
getFunNames <- function(FUN){
if (!is.list(FUN))
fun.names <- paste(deparse(substitute(FUN)), collapse = " ")
else
fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a)))
fun.names
}
which gives what I want :
> getFunNames(mean)
[1] "mean"
> getFunNames(ff)
[1] "ff"
>
2006 Jan 13
2
Saving data in an R package - how to maintain that t avariable is a 'factor' when it is coded as 1, 2, 3...
I have a .txt file obtained by saving a data frame in which the first four columns are factors (but represented as 1,2,3 etc). The first four lines are
"Pig" "Evit" "Cu" "Litter" "Start" "Weight" "Feed" "Time"
"4601" "1" "1" "1" 26.5 26.5 NA 1
"4601" "1"
2006 Oct 30
2
which duplicated rows to delete
Hi
Say I've this vector with several duplicates
>x<-c(1,2,3,4,2,6,2,8,2,3)
>which(duplicated(x))
[1] 5 7 9 10 11
But what I realy want is somthing like:
List({2,5,7}, {3,10}, ...)
Then from each sublist I can specify which of the duplicate items to drop
res<-NULL
for(vec in myDuplicateList)
res<-rbind(res, subset(data[vec,], myCrit))
I'll get some of the way by
2005 Jun 20
2
Fwd: How to sample from a linear mixed model
Thanks. I wonder if there is a general way of extracting var(u) and var(e), which would be needed to simulate u and e. Clearly, one can get the estimated parameters, but is there a clever way of 'setting up' the matrices??
Best
S??ren
On 6/19/05, S??ren H??jsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
> I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has
2012 Sep 25
1
mapping data from table to .csv template
I have a .csv table named mailing.csv as below. It consist a receiver,
subject and sender.
Receiver subject sender
1 Adrian Cole RE: [WHIRR-117] Composable services Tom White
2 Adrian Cole RE: [WHIRR-117] Composable services Tom White
3 Adrian Cole RE: [WHIRR-117] Composable services Adrian Cole
4 Adrian Cole RE: [WHIRR-117]
2003 May 12
2
smbpasswd and RID/SID problems with LDAP
Problem number one:
-------------------
I'm running a few-hours-old CVS version of Samba 3.0 with LDAP as the
authentication backend, and I'm having some problems trying to set up
the LDAP accounts using "smbpasswd". I build the structure of the
LDAP database by importing a couple of LDIF's, and then I import the
following user account to create an administrative account
2010 Nov 26
3
Calling substitute(expr, list(a=1)) when expr <- expression(a+b+c)
# The result I am after is the result after a substitution in an expression, such as
substitute(expression(a+b+c), list(a=1))
expression(1 + b + c)
# However, the way I want to do it is for a an expression "stored as a variable" as
(expr <- expression(a+b+c))
expression(a + b + c)
# a) The following does not work
(expr2 <- substitute(expr, list(a=1)))
expr
# b) - whereas this
2007 Aug 22
2
Evaluating f(x(2,3)) on a function f<- function(a,b){a+b}
Dear list
I have a function and a vector, say
f <- function(a,b){a+b}
x <- c(2,3)
I want to "evaluate f on x" in the sense of computing f(x[1],x[2]). I would like it to be so that I can write f(x). (I know I can write a wrapper function g <- function(x){f(x[1],x[2])}, but this is not really what I am looking for). Is there a general way doing this (programmatically)?
2012 Sep 26
1
Write table with data in other .csv template
Hi,
I have a table with data, as below:
dput(table):
structure(list(Adrian.Cole = c(0L, 0L, 0L, 0L, 0L, 0L), Alison.Wong =
c(0L, 0L, 0L, 0L, 0L, 0L), Andrei.Savu = c(0L, 0L, 0L, 0L, 0L, 0L),
Bruno.Dumon = c(0L, 0L, 0L, 0L, 0L, 0L), Edward.J..Yoon = c(0L, 0L, 0L,
0L, 0L, 0L), Eugene.Koontz = c(0L, 0L, 0L, 0L, 0L,
0L), Jakob.Homan = c(0L, 0L, 0L, 0L, 0L, 0L), Kelvin.Kakugawa =
c(0L, 0L,
2005 Jul 31
3
Drawing a graph with vertices and edges using tcl/tk
Dear all; I would like to draw a graph with vertices and edges, and I guess tcl/tk would be appropriate. I don't know tcl/tk but have googled for a 10-page (or so) introduction to 'getting started with tcl/tk in R' but without any luck.
- Does anyone know of the existence of such a document or any other web-based material on the subject?
- Does anyone have an (informative) piece of