Displaying 20 results from an estimated 80000 matches similar to: "Inconsistency in representation of variables"
2009 Jun 23
1
Documentation/software inconsistency in `:` and seq
In 2.8.1/Windows:
According to ? :
Details:
For numeric arguments 'from:to' is equivalent to 'seq(from, to)' ...
Value:
For numeric arguments, a numeric vector. This will be of type
'integer' if 'from' and 'to' are both integers and representable
in the integer type, otherwise of type 'numeric'....
The first claim
2008 Dec 08
4
R and Scheme
I've read in many places that R semantics are based on Scheme semantics. As
a long-time Lisp user and implementor, I've tried to make this more precise,
and this is what I've found so far. I've excluded trivial things that
aren't basic semantic issues: support for arbitrary-precision integers;
subscripting; general style; etc. I would appreciate corrections or
additions from
2009 Apr 01
2
Definition of = vs. <-
NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1}
which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax
(e.g. f(a=1), which is equivalent to
eval(structure(quote(f(1)),names=c('','a'))).
As far as I can tell from the documentation, assignment with = is precisely
equivalent to assignment with <-. Yet they call different primitives:
>
2009 Apr 01
2
Definition of = vs. <-
NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1}
which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax
(e.g. f(a=1), which is equivalent to
eval(structure(quote(f(1)),names=c('','a'))).
As far as I can tell from the documentation, assignment with = is precisely
equivalent to assignment with <-. Yet they call different primitives:
>
2010 Jan 22
4
Inconsistency in as.data.frame.table for stringsAsFactors
I noticed that in as.data.frame.table, the stringsAsFactors argument
defaults to TRUE, whereas in the other as.data.frame methods, it defaults to
default.stringsAsFactors().
The documentation and implementation agree on this, so this is not a bug.
However, I was wondering if this disparity was intended or if it might be
some sort of unintentional oversight. If it is intentional, I wonder what
2010 Dec 10
1
Stricter read.table?
read.table gives idiosyncratic results when the input is formatted
strangely, for example:
read.table(textConnection("a'b\nc'd\n"),header=FALSE,fill=TRUE,sep="",quote="'")
=> "c'd" "a'b" "c'd"
2008 Nov 29
2
Using grep() to subset lines of text
I have two vectors, a and b. b is a text file. I want to find in b those
elements of a which occur at the beginning of the line in b. I have the
following code, but it only returns a value for the first value in a, but I
want both. Any ideas please.
a = c(2,3)
b = NULL
b[1] = "aaa 2 aaa"
b[2] = "2 aaa"
b[3] = "3 aaa"
b[4] = "aaa 3 aaa"
2009 Sep 02
2
Documentation for is.atomic and is.recursive
The documentation for is.atomic and is.recursive is inconsistent with
their behavior in R 2.9.1 Windows.
? is.atomic
???? 'is.atomic' returns 'TRUE' if 'x' is an atomic vector (or 'NULL')
???? and 'FALSE' otherwise.
???? ...
???? 'is.atomic' is true for the atomic vector types ('"logical"',
???? '"integer"',
2009 Apr 01
2
Assignment to string
The documentation for assignment says:
In all the assignment operator expressions, 'x' can be a name or
an expression defining a part of an object to be replaced (e.g.,
'z[[1]]'). A syntactic name does not need to be quoted, though it
can be (preferably by backticks).
But the implementation allows assignment to a character string (i.e. not a
name), which it
2009 May 20
2
Class for time of day?
What is the recommended class for time of day (independent of calendar
date)?
And what is the recommended way to get the time of day from a POSIXct
object? (Not a string representation, but a computable representation.)
I have looked in the man page for DateTimeClasses, in the Time Series
Analysis Task View and in Spector's Data Manipulation book but haven't found
these. Clearly I can
2009 Jul 29
3
Object equality for S4 objects
To test two environments for object equality (Lisp EQ), I can use 'identity':
> e1 <- environment(local(function()x))
> e2 <- environment(local(function()x))
> identical(e1,e2) # compares object identity
[1] FALSE
> identical(as.list(e1),as.list(e2)) # compares values as name->value mapping
[1] TRUE # (is there a
2012 Oct 03
0
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
Andrey,
While I think that it will be relatively easy to have the intrinsics
serve as code-motion barriers for other code that might be threads
sensitive (like other external function calls), we would need to think
through exactly how this would work. The easiest thing would be to make
the intrinsics have having unmodeled side effects, although we might
want to do something more intelligent.
2009 Jan 26
1
Large regular expressions
Given a vector of reference strings Ref and a vector of test strings
Test, I would like to find elements of Test which do not contain
elements of Ref as \b-delimited substrings.
This can be done straightforwardly for length(Ref) < 6000 or so (R
2.8.1 Windows) by constructing a pattern like \b(a|b|c)\b, but not for
larger Refs (see below). The easy workaround for this is to split Ref
into
2014 Jun 23
1
Curious behavior of $ and lapply
There seems to be a funny interaction between lapply and "$" -- also, "$"
doesn't signal an error in some cases where "[[" does.
The $ operator accepts a string second argument in functional form:
> `$`(list(a=3,b=4),"b")
[1] 4
lapply(list(list(a=3,b=4)),function(x) `$`(x,"b"))
[[1]]
[1] 4
... but using an lapply "..."
2012 Oct 02
0
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
Not to distract, but the word, `procedurization' is not an English word.
It's just leaping out at me when it is either procedure(s) (noun) or
proceduralize (verb). Even processes would make sense. I couldn't help
myself because the word was distracting.
- Marc
P.S. Not that my vote counts, but I'm more in the camp of Hal whose
approach to tackling the parallelization
2012 Sep 28
0
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
Andrey,
I am very glad to see that you're interested in working on this! I
have a few comments:
As you may know, this is the third such proposal over the past two
months, one by me
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052472.html)
and the other, based somewhat on mine, by Sanjoy
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-September/053798.html)
In order for your
2008 Nov 14
1
Superimposing y-variables in Lattice formulas
Given a data frame of a categorical variable and two continuous
variables, I would like to display one continuous variable against the
other for each value of the categorical variable, all superimposed on
the same plot. For example:
data(Indometh); str(Indometh)
Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and
'data.frame': 66 obs. of 3
2009 Jan 25
3
Defining an iterator
Inspired by Rudolf Biczok's query of Fri, Jan 23, 2009 at 1:25 AM, I
tried to implement iteration in a generic way using S4. (Though I am
admittedly still struggling with learning S4.)
> setClass("foo",representation(bar="list"))
[1] "foo"
> x<-new("foo",bar=list(1,2,3))
Given this, I would not expect for(i in x)... to work, since R has no
way
2009 Mar 23
2
dput(as.list(function...)...) bug
Tested in R 2.8.1 Windows
> ff <- formals(function(x)1)
> ff1 <- as.list(function(x)1)[1]
# ff1 acts the same as ff in the examples below, but is a list rather
than a pairlist
> dput( ff , control=c("warnIncomplete"))
list(x = )
This string is not parsable, but dput does not give a warning as specified.
> dput( ff ,
2010 Jun 10
1
OWL ontologies in R?
Are there any R packages to import and use Web Ontology Language (OWL)
ontologies (represented in OWL/RDF or other form)?
Thanks,
-s
[[alternative HTML version deleted]]