The R Project SVN R

Rev

Rev 41911 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 41911 Rev 42016
Line 3486... Line 3486...
3486
SEXP attribute_hidden do_dend(SEXP call, SEXP op, SEXP args, SEXP env)
3486
SEXP attribute_hidden do_dend(SEXP call, SEXP op, SEXP args, SEXP env)
3487
{
3487
{
3488
    double x, y;
3488
    double x, y;
3489
    int n;
3489
    int n;
3490
 
3490
 
3491
    SEXP originalArgs, dnd_llabels;
3491
    SEXP originalArgs, dnd_llabels, xpos;
3492
    DevDesc *dd;
3492
    DevDesc *dd;
3493
 
3493
 
3494
    dd = CurrentDevice();
3494
    dd = CurrentDevice();
3495
    GCheckState(dd);
3495
    GCheckState(dd);
3496
 
3496
 
Line 3518... Line 3518...
3518
    args = CDR(args);
3518
    args = CDR(args);
3519
 
3519
 
3520
    /* ord = order(x$order) */
3520
    /* ord = order(x$order) */
3521
    if (length(CAR(args)) != n+1)
3521
    if (length(CAR(args)) != n+1)
3522
	goto badargs;
3522
	goto badargs;
3523
    dnd_xpos = REAL(coerceVector(CAR(args),REALSXP));
3523
    PROTECT(xpos = coerceVector(CAR(args), REALSXP));
-
 
3524
    dnd_xpos = REAL(xpos);
3524
    args = CDR(args);
3525
    args = CDR(args);
3525
 
3526
 
3526
    /* hang */
3527
    /* hang */
3527
    dnd_hang = asReal(CAR(args));
3528
    dnd_hang = asReal(CAR(args));
3528
    if (!R_FINITE(dnd_hang))
3529
    if (!R_FINITE(dnd_hang))
Line 3551... Line 3552...
3551
    GMode(0, dd);
3552
    GMode(0, dd);
3552
    GRestorePars(dd);
3553
    GRestorePars(dd);
3553
    /* NOTE: only record operation if no "error"  */
3554
    /* NOTE: only record operation if no "error"  */
3554
    if (GRecording(call, dd))
3555
    if (GRecording(call, dd))
3555
	recordGraphicOperation(op, originalArgs, dd);
3556
	recordGraphicOperation(op, originalArgs, dd);
-
 
3557
    UNPROTECT(1);
3556
    return R_NilValue;
3558
    return R_NilValue;
3557
 
3559
 
3558
  badargs:
3560
  badargs:
3559
    error(_("invalid dendrogram input"));
3561
    error(_("invalid dendrogram input"));
3560
    return R_NilValue;/* never used; to keep -Wall happy */
3562
    return R_NilValue;/* never used; to keep -Wall happy */