The R Project SVN R

Rev

Rev 28261 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28261 Rev 28362
Line 3416... Line 3416...
3416
#include <Rinternals.h>
3416
#include <Rinternals.h>
3417
 
3417
 
3418
@group
3418
@group
3419
SEXP out(SEXP x, SEXP y)
3419
SEXP out(SEXP x, SEXP y)
3420
@{
3420
@{
3421
  int i, j, nx, ny;
3421
  R_len_t i, j, nx, ny;
3422
  double tmp;
3422
  double tmp;
3423
  SEXP ans, dim, dimnames;
3423
  SEXP ans, dim, dimnames;
3424
@end group
3424
@end group
3425
 
3425
 
3426
@group
3426
@group
Line 3712... Line 3712...
3712
#include <R.h>
3712
#include <R.h>
3713
#include <Rinternals.h>
3713
#include <Rinternals.h>
3714
 
3714
 
3715
SEXP convolve2(SEXP a, SEXP b)
3715
SEXP convolve2(SEXP a, SEXP b)
3716
@{
3716
@{
3717
  int i, j, na, nb, nab;
3717
  R_len_t i, j, na, nb, nab;
3718
  double *xa, *xb, *xab;
3718
  double *xa, *xb, *xab;
3719
  SEXP ab;
3719
  SEXP ab;
3720
 
3720
 
3721
  PROTECT(a = coerceVector(a, REALSXP));
3721
  PROTECT(a = coerceVector(a, REALSXP));
3722
  PROTECT(b = coerceVector(b, REALSXP));
3722
  PROTECT(b = coerceVector(b, REALSXP));
Line 3952... Line 3952...
3952
 
3952
 
3953
@smallexample
3953
@smallexample
3954
@group
3954
@group
3955
SEXP lapply(SEXP list, SEXP expr, SEXP rho)
3955
SEXP lapply(SEXP list, SEXP expr, SEXP rho)
3956
@{
3956
@{
3957
  int i, n = length(list);
3957
  R_len_t i, n = length(list);
3958
  SEXP ans;
3958
  SEXP ans;
3959
 
3959
 
3960
  if(!isNewList(list)) error("`list' must be a list");
3960
  if(!isNewList(list)) error("`list' must be a list");
3961
  if(!isEnvironment(rho)) error("`rho' should be an environment");
3961
  if(!isEnvironment(rho)) error("`rho' should be an environment");
3962
  PROTECT(ans = allocVector(VECSXP, n));
3962
  PROTECT(ans = allocVector(VECSXP, n));
Line 3979... Line 3979...
3979
 
3979
 
3980
@smallexample
3980
@smallexample
3981
@group
3981
@group
3982
SEXP lapply2(SEXP list, SEXP fn, SEXP rho)
3982
SEXP lapply2(SEXP list, SEXP fn, SEXP rho)
3983
@{
3983
@{
3984
  int i, n = length(list);
3984
  R_len_t i, n = length(list);
3985
  SEXP R_fcall, ans;
3985
  SEXP R_fcall, ans;
3986
 
3986
 
3987
  if(!isNewList(list)) error("`list' must be a list");
3987
  if(!isNewList(list)) error("`list' must be a list");
3988
  if(!isFunction(fn)) error("`fn' must be a function");
3988
  if(!isFunction(fn)) error("`fn' must be a function");
3989
  if(!isEnvironment(rho)) error("`rho' should be an environment");
3989
  if(!isEnvironment(rho)) error("`rho' should be an environment");