Displaying 20 results from an estimated 64 matches for "cadr".
Did you mean:
cada
1997 Nov 28
3
R-alpha: Problems with dimnames and names
...diff -ur R-0.50-a4/src/main/cov.c R-0.50-a4.patched/src/main/cov.c
--- R-0.50-a4/src/main/cov.c Sun Nov 24 23:43:05 1996
+++ R-0.50-a4.patched/src/main/cov.c Fri Nov 28 11:21:23 1997
@@ -390,7 +390,7 @@
}
if(isNull(y)) {
x = getAttrib(x, R_DimNamesSymbol);
- if(!isNull(x) && !isNull(CADR(x))) {
+ if(ncx > 1 && !isNull(x) && !isNull(CADR(x))) {
PROTECT(ind = allocList(2));
CAR(ind) = CADR(x);
CADR(ind) = CADR(x);
@@ -401,7 +401,7 @@
else {
x = getAttrib(x, R_DimNamesSymbol);
y = getAttrib(y, R_DimNamesSymbol);
- if((!isNull(x) && !isN...
2007 Jul 25
11
taskbaricon
Salut alex, j''ai un petit souci.
quand j''utilise "demotaskbaricon" avec traducteur-wxruby, que j''ouvre mon application(donc l''icone apparaît dans la barre de lancement rapide) et que je ferme mon application, l''icone disparaît tout de suite.
Mais quand je l''utilise avec l''exemple Wizard et que je ferme mon application
2008 Aug 14
3
extending the derivs table/fools rushing in
...ble at
http://www.zoology.ufl.edu/bolker/deriv_patch.txt .
I pretty much followed the framework of the other symbols;
here was my incantation
- } else if (CAR(expr) == PlogisSymbol) {
- ans = simplify(TimesSymbol,
- PP_S(TimesSymbol,
- PP_S2(ExpSymbol,
- PP_S2(MinusSymbol,CADR(expr))),
- PP_S(PowerSymbol,
- PP_S(PlusSymbol,
- Constant(1.),
- PP_S2(ExpSymbol,
- PP_S2(MinusSymbol,CADR(expr)))),
- Constant(-2.))),
- PP(D(CADR(expr),var)));
- UNPROTECT(8);
It seems to work:
> D(quote(plogis(a)),"a")
exp(...
2004 Jan 09
1
samba says "you have right" but I must not have right (Important - SECURITY ISSUE)
My Samba 3.0.1 is configured with LDAP SAM and ACL on XFS filesystem.
For a test, I added my user to the group "cadres". This group is in ACL
definition of my directory.
# file: Projets
# owner: root
# group: root
user::rwx
user:asi:rwx
group::rwx
group:administrateurs
group:cdir:r-x
group:jardin:r-x
group:cadres:r-x
mask::rwx
other::---
default:user::rwx
default:user:asi:rwx
default:group::rwx
default:grou...
2010 Jun 19
1
more powerful iconv
...= FALSE, isUTF8 = FALSE;
+ Rboolean isRawx = (TYPEOF(x) == RAWSXP);
- if(TYPEOF(x) != STRSXP)
- error(_("'x' must be a character vector"));
+ if(TYPEOF(x) != STRSXP && !isRawx)
+ error(_("'x' must be a character vector or raw"));
if(!isString(CADR(args)) || length(CADR(args)) != 1)
error(_("invalid '%s' argument"), "from");
if(!isString(CADDR(args)) || length(CADDR(args)) != 1)
error(_("invalid '%s' argument"), "to");
if(!isString(CADDDR(args)) || length(CADDDR(args)) !=...
2008 Feb 27
1
Warnings generated by log2()/log10() are really large/takes a long time to display
x <- rnorm(1e6);
y <- log(x); # or logb(x) or log1p(x)
w <- warnings();
print(object.size(w));
## [1] 480
str(w);
$ NaNs produced: language log(x)
- attr(*, "dots")= list()
- attr(*, "class")= chr "warnings"
y <- log2(x); # or log10(x)
w <- warnings();
print(object.size(w));
## [1] 8000536
str(w);
## List of 1
## $ NaNs produced: language
2011 Mar 23
2
Standalone C++ application for processing R parser output(SEXP)
...c language.
I tried using R CMD SHBIN to compile a C function that parses arbitrary R
expressions. But I think, the generated .so file can be used from within R
and not be called from other C or Ruby programs(I get linker errors).
My Idea is to use the SEXP processing functions/MACROS (CAR, CDR, CADR,
etc..) from within C code and transform it to our AST format. I tried
linking to libR.a and other lib*.so's when I compile the C code using gcc
but, it doesn't work.
I read that R exposes only small number of functions for library/package
writers and the compiled *.so can only from within...
2012 May 23
2
Expected behaviour of is.unsorted?
...is used)" which I don't understand. Where >= or > is
used by what, and where?
I understand why the first two are FALSE (1 item of anything must be
sorted). I don't understand the 3rd and 4th cases where length is 2:
do_isunsorted seems to call lang3(install(".gtn"), x, CADR(args))). Does
that fall back to TRUE for some reason?
Matthew
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United
Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=...
1999 Jan 27
0
load() patch
...36,7 +1136,7 @@
SEXP do_load(SEXP call, SEXP op, SEXP args, SEXP env)
{
- SEXP a, ans, e;
+ SEXP a, ans, e, aenv;
int i;
FILE *fp;
@@ -1144,10 +1144,17 @@
if (TYPEOF(CAR(args)) != STRSXP)
errorcall(call, "first argument must be a string\n");
- i = INTEGER(CADR(args))[0];
+ // i = INTEGER(CADR(args))[0]; // what is this for?
+
+ // GRW 1/26/99 GRW : added environment parameter so that the
+ // loaded objects can be placed where desired
+ aenv = CADR(args);
+ if (TYPEOF(aenv) != ENVSXP && aenv != R_NilValue)
+ error("invalid e...
2019 May 01
3
anyNA() performance on vectors of POSIXct
...nclass(x.posixct) ),
unit='ms')
static Rboolean anyNA(SEXP call, SEXP op, SEXP args, SEXP env)
{
SEXP x = CAR(args);
SEXPTYPE xT = TYPEOF(x);
Rboolean isList = (xT == VECSXP || xT == LISTSXP), recursive = FALSE;
if (isList && length(args) > 1) recursive = asLogical(CADR(args));
*if (OBJECT(x) || (isList && !recursive)) {*
SEXP e0 = PROTECT(lang2(install("is.na"), x));
SEXP e = PROTECT(lang2(install("any"), e0));
SEXP res = PROTECT(eval(e, env));
int ans = asLogical(res);
UNPROTECT(3);
return ans == 1; // so NA...
2020 Jan 20
1
Minor bug in error message in datetime.c
...?--- a/src/main/datetime.c
+++ b/src/main/datetime.c
@@ -1048,7 +1048,7 @@ SEXP attribute_hidden do_strptime(SEXP call, SEXP op, SEXP args, SEXP env)
if(!isString((x = CAR(args))))
error(_("invalid '%s' argument"), "x");
if(!isString((sformat = CADR(args))) || XLENGTH(sformat) == 0)
- error(_("invalid '%s' argument"), "x");
+ error(_("invalid '%s' argument"), "format");
One could spend quite some time figuring out what is wrong with his ?x?, when the problem is with ?form...
2006 Feb 22
2
How can I see how %*% is implemented?
I would like to see how the matrix multiplication operator %*% is implemented (because I want to see which external Fortran/C routines are used). How can I do so?
Best
S??ren
2013 Apr 17
1
stack imbalance in max.col for non-real matrices
...eventual
UNPROTECT. Pretty sure this would fix (but I haven't tested it):
Index: array.c
===================================================================
--- array.c (revision 61606)
+++ array.c (working copy)
@@ -1614,7 +1614,10 @@
SEXP m = CAR(args);
int method = asInteger(CADR(args));
int nr = nrows(m), nc = ncols(m), nprot = 1;
- if (TYPEOF(m) != REALSXP) PROTECT(m = coerceVector(m, REALSXP));
+ if (TYPEOF(m) != REALSXP) {
+ PROTECT(m = coerceVector(m, REALSXP));
+ nprot++;
+ }
SEXP ans = allocVector(INTSXP, nr);
PROTECT(ans);
R_ma...
2008 Aug 22
2
Sending "..." to a C external
...es the
ones being optimized.)
I got the "showArgs" code (from R-exts) to compile and install, but it only
gives me error messages when I run it. I think I'm supposed to pass it
different arguments from what I'm doing, but I have no idea which ones.
What exactly are CAR, CDR, and CADR anyway? Why did the R development team
choose this very un-C-like set of commands? They are not explained much in
R-exts.
Thanks in advance for any info.
John
[[alternative HTML version deleted]]
2019 Apr 05
2
patch to improve matrix conformability error message
...and (%d, %d)"),
+ nrx, ncx, nry, ncy);
}
else {
if (ncx != ncy)
- error(_("non-conformable arguments"));
+ error(_("non-conformable arguments of dimension (%d, %d) and (%d, %d)"),
+ nrx, ncx, nry, ncy);
}
if (isComplex(CAR(args)) || isComplex(CADR(args)))
--
2.19.1
2000 Jun 13
1
problem with aperm? (PR#568)
...ent tested as a vector. This happened both
within the apply() function and calling aperm() separately, even if I
explicitly used a numeric vector for the second argument. I then had a
look at the code for do_aperm(), but as I am unfamiliar with Scheme, had
to give up after trying to work out what CADR and SEXP were.
Jim
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r...
2007 Apr 16
0
[LLVMdev] "Name that compiler"
..., if the name
can communicate 'framework for fast', then the 'compiler' or 'code'
concept falls out naturally (within the target audience). Here are
some translations of several related phrases…
Kit rapide. Base rapide. Noyau rapide. Code rapide. Compilateur
rapide. Cadre rapide. (French)
Schneller Installationssatz. Schneller Kern. Schnelle Grundlage.
Schneller Code. Schneller Compiler. Schneller Rahmen. (German)
Corredo veloce. Fondamento veloce. Nucleo veloce. Codice veloce.
Compilatore veloce. Struttura veloce. (Italian)
Kit rápido. Fundación rápida. Base r...
2014 Oct 17
1
Making parent.env<- an error for package namespaces and package imports
...onmentIsLocked(env) && R_IsNamespaceEnv(env))
+ error(_("can not set the parent environment of a namespace"));
+ if (R_EnvironmentIsLocked(env) && R_IsImportsEnv(env))
+ error(_("can not set the parent environment of package imports"));
parent = CADR(args);
if (isNull(parent)) {
error(_("use of NULL environment is defunct"));
?
2016 Aug 15
3
LLVM 3.9 RC binaries should NOT disable assertions.
> I would argue that you should build the RC and the release the same way.
I've had to fix bugs were someone had an assert with a side-effect, and the
code with asserts turned off didn't work.
OK, so it's clearly important to provide and test against RC's in the
actual release configuration, especially since assertions can introduce
bugs on their own.
Arguably however
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...&& !utf8Valid(*e))
+ || (mbcslocale && !mbcsValid(*e))
+ ) enc = CE_BYTES;
+ SET_STRING_ELT(ans, i, mkCharCE(*e, enc));
+ }
#endif
} else {
PROTECT(ans = allocVector(STRSXP, i));
@@ -416,11 +424,14 @@
if (s == NULL)
SET_STRING_ELT(ans, j, STRING_ELT(CADR(args), 0));
else {
- SEXP tmp;
- if(known_to_be_latin1) tmp = mkCharCE(s, CE_LATIN1);
- else if(known_to_be_utf8) tmp = mkCharCE(s, CE_UTF8);
- else tmp = mkChar(s);
- SET_STRING_ELT(ans, j, tmp);
+ cetype_t enc = known_to_be_latin1 ? CE_LATIN1 :
+ known_to_be_utf8 ? CE_UTF8 :
+...