Hi,
Try this:
order(A)[!duplicated(sort(A))]
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and
Sorry,
How about this?
invisible(capture.output(source(...)))
# or
sink("/dev/null")
source(...)
sink()
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEA
Use triple colon operator:
gplots:::balloonplot.default
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
Hi,
Yes you can. As William says, the 'seq_len' approach seems to be better.
'head' function is the wrapper for 'seq_len' approach and slower.
I didn't know that '-length(x)' approach is slow for long vectors
Hi,
try below:
x <- c(1:20)
y <- c(1, 5, 10, 14)
x[ c( (y[1]+2):(y[2]-1), (y[2]+2):(y[3]-1), (y[3]+2):(y[4]-1) ) ]
x[unlist(lapply(1:(length(y) - 1), function (i) (y[i] + 2) : (y[i + 1] - 1)))]
x[unlist(mapply(seq, y[-length(y)] + 2, y[-1] - 1, SIMPLIFY = FALSE))]
--
Noia Rai
Hi,
?cat
Read item sep in argument section.
And try:
cat("X = ", B, sep = "")
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
Hi,
You missed a close bracket.
node4:{
...
nodeDef:{
node4:{
...
# need a close bracket here
}
},
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hi,
Do you try 'RSiteSearch("Branch Bound")'?
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.or
tions elapsed relative
## 1 f1() 100 2.917 30.385417
## 2 f2() 100 0.448 4.67
## 3 f3() 100 32.439 337.906250
## 4 f4() 100 3.635 37.864583
## 5 f5() 100 0.096 1.00
--
Noia Raindrops
noia.raindr...@gmail.com
__
xx should become \"xxx\".\"xxx\"\".\"xxx\"
x <- gsub("([[:alpha:]]+)_([[:alpha:]]+)\\.([[:alpha:]]+)",
"\"\\1\".\"\\2\".\"\\3\"", x)
--
Noia Raindrops
noia.raindr...@gmail.com
___
Hello,
Add 'envir' arugment:
load(workspace_name, envir = globalenv())
# or
load(workspace_name, envir = parent.frame())
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
(text = sprintf("e^%d", axTicks(2))),
las = 1)
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guid
cannot open the connection\n"
## attr(,"class")
## [1] "try-error"
## attr(,"condition")
##
# or
for (i in 1:length(url)) res[[i]] <- tryCatch(readLines(url[i]), error =
function (e) conditionMessage(e))
res[[2]]
## [1] "cannot open the connection"
nt.
test <- function () source("test.R", local = FALSE)
# test.R is evaluated in global environment.
test <- function () source("test.R", local = environment())
# environment() returns the envrionment of 'test' function.
test <- function () source("test.R&q
;- regmatches(a, regexpr("[1-9][0-9]*\\.", a))
End <- regmatches(a, regexpr("\\.[0-9]*[1-9]", a))
Front
## [1] "1020."
End
## [1] ".9092"
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.or
Try this:
table(nDeaths = rep(0:4, c(109, 65, 22, 3, 1)))
## or
as.table(array(c(109L, 65L, 22L, 3L, 1L), dimnames = list(nDeaths = 0:4)))
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
Use backreference:
as.numeric(gsub("^(.*)-$", "-\\1", as.character(temp)))
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
pland 12-16 PZ
## 5 Loamy Upland 16-20 PZ
--
Noia Raindrops
noia.raindr...@gmail.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/
== as.character(dat$b)
## [1] TRUE FALSE TRUE
dat <- cbind(data.frame(x = 1:3), a = c("a", "b", "c"), b = c("a", "a", "c"),
stringsAsFactors = FALSE)
str(dat)
## 'data.frame': 3 obs. of 3 variables:
## $ x: int 1 2 3
## $ a:
19 matches
Mail list logo