search for: typeofs

Displaying 20 results from an estimated 1092 matches for "typeofs".

Did you mean: typeof
2014 Apr 02
3
Typeof for character vector in dataframe returns integer
Hi , I want to know is this behavior expected and why is that ? Need some help gender <- c("F", "M", "M", "F", "F", "M", "F", "F") > age <- c(23, 25, 27, 29, 31, 33, 35, 37) > df<- data.frame(gender,age) > typeof(df[[1]]) [1] "integer"
2004 Sep 08
4
factor always have type integer
typeof applied to a factor always seems to return "integer", independently of the type of the levels. This has a strange side effect. When a variable is "imported" into a data frame, its type changes. character variables automatically are converted to factors when imported into data frames. Here is an example: > v1<-1:3 >
2010 Feb 10
3
What is the difference between typeof and storage.mode?
S Programming by Venables and Ripley (2000) says on page 8, "R objects have another way to give information using the function \tttext{typeof}, which often gives the same information as \tttext{storage.mode}." It implies that there are some differences between typeof and storage.mode. However, according to ?typeof and ?storage.mode, it doesn't seem to be so. Could somebody let me
2013 Jan 22
1
c(), rbind and cbind functions - why type of resulting object is double
Hello Everyone, I am using R 2.15.0 and I came across this behaviour and I was wondering why I don't get an integer vector or and integer matrix with the following code: > z <- c(1, 2:0, 3, 4:8) > typeof(z) [1] "double" > z <- rbind(1, 2:0, 3, 4:8) Warning message: In rbind(1, 2:0, 3, 4:8) : number of columns of result is not a multiple of vector length (arg
2013 Mar 22
1
Why does typeof() modify an object's "named" field?
Hello, Doing typeof() on an object appears to reset the "named" field in its sxpinfo header to 2, which can change the way that subsequent subassignment operations are carried out: X <- 1:5e7 .Internal(inspect(X)) # @4eeb0008 13 INTSXP g0c7 [NAM(1)] (len=50000000, tl=0) 1,2,3,4,5,... system.time(X[1] <- 9L) # user system elapsed # 0 0 0 typeof(X)
2020 Jun 30
2
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
On Tue, Jun 30, 2020 at 7:39 PM Will Deacon <will at kernel.org> wrote: > +#define __READ_ONCE(x) \ > +({ \ > + int atomic = 1; \ > + union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \ > +
2020 Jun 30
2
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
On Tue, Jun 30, 2020 at 7:39 PM Will Deacon <will at kernel.org> wrote: > +#define __READ_ONCE(x) \ > +({ \ > + int atomic = 1; \ > + union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \ > +
2007 Aug 22
0
3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c test/trace
libswfdec/swfdec_as_array.c | 18 +--- libswfdec/swfdec_as_function.c | 3 test/trace/trace_properties.as | 165 +++++++++++++++++++++++++++++------------ 3 files changed, 129 insertions(+), 57 deletions(-) New commits: diff-tree adebed995585fa9f993062a75df17ff464113e93 (from 99c2574700ed7aaeef5cadbc45c7bfdd9ad7a6dd) Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Wed Aug
2011 Aug 07
2
[PATCH] kinit minor checkpatch cleanup
coding style fixes. FIXME: check that compiled bin the same1!! --- usr/kinit/initrd.c | 3 ++- usr/kinit/kinit.c | 12 ++++-------- usr/kinit/kinit.h | 20 ++++++++++---------- usr/kinit/name_to_dev.c | 6 +++--- usr/kinit/nfsroot.c | 5 ++--- 5 files changed, 21 insertions(+), 25 deletions(-) diff --git a/usr/kinit/initrd.c b/usr/kinit/initrd.c index
2016 Nov 25
2
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 01:40:44PM +0100, Peter Zijlstra wrote: > #define SINGLE_LOAD(x) \ > {( \ > compiletime_assert_atomic_type(typeof(x)); \ Should be: compiletime_assert_atomic_type(x); > WARN_SINGLE_COPY_ALIGNMENT(&(x)); \ > READ_ONCE(x); \ > }) > > #define SINGLE_STORE(x, v) \ > ({ \ >
2016 Nov 25
2
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 01:40:44PM +0100, Peter Zijlstra wrote: > #define SINGLE_LOAD(x) \ > {( \ > compiletime_assert_atomic_type(typeof(x)); \ Should be: compiletime_assert_atomic_type(x); > WARN_SINGLE_COPY_ALIGNMENT(&(x)); \ > READ_ONCE(x); \ > }) > > #define SINGLE_STORE(x, v) \ > ({ \ >
2010 Oct 06
3
Empty data frame does not maintain column type
Does anyone know why a data frame created with empty character columns converts them to integer columns? > df<-data.frame(a=character(0),b=character(0)) > df<-rbind(df,c("a","a")) > typeof(df[1,1]) [1] "integer" AsIs doesn't help: > df<-data.frame(a=I(character(0)),b=I(character(0))) > df<-rbind(df,I(c("a","a")))
2019 May 23
4
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
On Thu, 23 May 2019 08:10:44 -0700 Linus Torvalds <torvalds at linux-foundation.org> wrote: > On Thu, May 23, 2019 at 7:00 AM Steven Rostedt <rostedt at goodmis.org> wrote: > > > > +# define roundup_64(x, y) ( \ > > +{ \ > > + typeof(y) __y = y;
2012 May 22
2
how to remove the 'promise' attribute of an R object (.Random.seed)?
Hi, The problem arises when I lazyLoad() the .Random.seed from a previously saved database. To simplify the process of reproducing the problem, see the example below: ## this assignment may not really make sense, but illustrates the problem delayedAssign('.Random.seed', 1L) typeof(.Random.seed) # [1] "integer" rnorm(1) # Error in rnorm(1) : # .Random.seed is not an integer
2012 May 22
2
how to remove the 'promise' attribute of an R object (.Random.seed)?
Hi, The problem arises when I lazyLoad() the .Random.seed from a previously saved database. To simplify the process of reproducing the problem, see the example below: ## this assignment may not really make sense, but illustrates the problem delayedAssign('.Random.seed', 1L) typeof(.Random.seed) # [1] "integer" rnorm(1) # Error in rnorm(1) : # .Random.seed is not an integer
2015 Jun 01
2
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
I'm observing that base::sum(x, na.rm=FALSE) for typeof(x) == "double" is much more time consuming when there are missing values versus when there are not. I'm observing this on both Window and Linux, but it's quite surprising to me. Currently, my main suspect is settings in on how R was built. The second suspect is my brain. I hope that someone can clarify the below
2020 Aug 06
0
[vhost:vhost 32/65] drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16)((__u16)(__le16)(virtio_cread_v)))
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 1a86b377aa2147a7c866b03142e848c18e5f3cb8 commit: b025584098e621d88894d28e80af686958e273af [32/65] virtio_input: convert to LE accessors config: powerpc-randconfig-r031-20200805 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 076b120bebfd727b502208601012a44ab2e1028e)
2011 Feb 02
3
Applying multiple functions to one object
Dear list members, I recall seeing a convenience function for applying multiple functions to one object (i.e., almost the opposite of 'mapply?) somewhere. Example: If the function was named ?fun? the output of fun(3.14, mode, typeof, class) would be identical to the output of c(mode(3.14), typeof(3.14), class(3.14)) Is my memory failing me, or does such a function already exists in a
2008 May 19
6
obtaining table cell text data
I''m writing some code to subset a table based on the contents of particular columns. My event handler starts off like this: subsetChange: function(e) { var subset = $F(''subsetSelector''); var rows = $$(''.content-row''); rows.each(function(row) { var value = row.down(''.Platform_Category'').childNodes[0].data;
2014 Jan 03
2
class() on substitute(...) output?
Does it make sense to talk about the class of the output of substitute(...)? I'm puzzled by the following outputs: ee <- list( A = substitute( a <- 1 ), B = substitute({ a <- 1 }), C = substitute(( a <- 1 )), D = substitute( a == 1 ) ) > t(sapply(ee, FUN=function(e) { c(typeof=typeof(e), mode=mode(e), class=class(e)) })) typeof mode class A