](x), type = "l")
> for(i in 2:5)
> lines(x, h[[i]](x), col = i)
Here is my (ugly?) suggestion:
f <- function(u) function(x) u * x^2
g <- function(u) function(x) u * log(x)
set.seed(3)
a <- runif(5)
h <- f(a[1])
for (
\xa4"
Encoding(foo2) <- "UTF-8"
foo2
# [1] ""
nchar(foo2)
# [1] 1
nchar(foo2, type = "bytes")
# [1] 2
nchar(foo2, type = "width")
# [1] 1
But, confusingly, encodeString() does not agree with print(), contrary
to the document '?encodeString
html
I'm not exactly sure of what you are trying to do, but here's a start:
foo <- xmlInternalTreeParse("yourfile.xml")
nodes <- getNodeSet(foo, "//node[@id]")
sapply(nodes, xmlGetAttr, "id")
sapply(nodes, xmlValue)
LC_NUMERIC=C
[3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
[5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8
[7] LC_PAPER=CLC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats grap
On 06/20/2012 05:36 PM, Mikko Korpela wrote:
> Hello list!
>
> Let's construct a matrix / data.frame with 0 columns, but > 0 rows, and
> non-NULL rownames. Then, call is.na() on both the data.frame and the
> matrix. We find that is.na.data.frame() gives an error. When
/FAQ/R-FAQ.html#Why-does-summary_0028_0029-report-strange-results-for-the-R_005e2-estimate-when-I-fit-a-linear-model-with-no-intercept_003f
--
Mikko Korpela
Aalto University School of Science
Department of Information and Computer Science
__
R-help@r-proj
ou actually accidentally iterate
over some data structures. For example, 'pk' inside the %dopar% loop is
a single element of the original 'pk' list (which may get overwritten,
depending on whether the loop is actually run in parallel). This is
probably not what you want.
- M
rs
are not exactly representable.
> options(digits = 22)
> print(max.num <- 2 ^ .Machine$double.digits)
[1] 9007199254740992
> (max.num) - (max.num - 1)
[1] 1
> (max.num + 1) - (max.num)
[1] 0
> (max.num + 2) - (max.num + 1)
[1] 2
> If I need to setup by myself what is the maximum
t; col.id<-function(x) any(grep("$",x))
> sapply(cand2,col.id)
>
> However, this returns TRUE for all columns (even those that do not contain
> the $).
>
> Any assistance is appreciated.
One option is to use fixed = TRUE in the call to grep(). See ?grep.
BR,
--
t, format="%d/%m/%Y")
[1] "1978-02-01"
> as.Date(dataset, format="%d/%m/%Y")
[1] "1978-02-01"
For converting "POSIXlt" or "Date" back to a character representation,
use as.character() or, for a customizable style, format().
> format(s
10 matches
Mail list logo