Re: [R] dataframe (matrix) multiplication

2005-10-14 Thread Peter Wolf
where is the problem? input: A-c(2,3,2); B-c(1,2,1); C-c(4,4,5); D-c(3,5,4) df-data.frame(A,B,C,D) c1-1:2; c2-3:4 df[,c1]*df[,c2] output: A B 1 8 3 2 12 10 3 10 4 Peter Wolf Christoph Scherber wrote: Dear R users, Suppose I have 2 parts of a dataframe, say ABCD 2143 3245 2154

Re: [R] hist(x, ...) with normal distribution curve

2005-09-27 Thread Peter Wolf
]+diff(par()$usr[3:4])*.017, boxwex=0.02*diff(par()$usr[3:4]),pch=8) Peter Wolf * __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] questions about boxplots

2005-09-27 Thread Peter Wolf
concerning question 1: -- labeling of outliers -- you can get the outliers by boxplot(...)$out try: set.seed(17) x-rexp(99) names(x)-paste(x,1:99) out-boxplot(x)$out text(rep(1.1,length(out)), out, names(out)) Peter Wolf Stephen D. Weigand wrote: Dear Yulei, On Sep 26, 2005, at 6:56 PM

Re: [R] R: extracting elements in a matrix

2005-09-22 Thread Peter Wolf
1.483691 $4 [1] 1.745427 $5 [1] 1.602120 Peter Wolf Frank Schmid wrote: Dear R-users For a given matrix of dimension, say (n,p), I'd like to extract for every column those elements that are bigger than twice the interquartile range of the corresponding column. Can I get these elements without using

Re: [R] bagplot - a rough R function

2005-09-22 Thread Peter Wolf
Martin Maechler wrote: Peter == Peter Wolf [EMAIL PROTECTED] on Wed, 21 Sep 2005 16:49:10 +0200 writes: Peter In the moment I am writing an R function for drawing Peter bagplots (two dimensional boxplots). Peter For some elements of the plot are found numerically

Re: [R] Add function to histogram?

2005-09-21 Thread Peter Wolf
do read the posting guide! http://www.R-project.org/posting-guide.html ??? dat-rnorm(100) hist(dat,prob=TRUE) x-seq(-3.5,3.5,length=100) y-dnorm(x) lines(x,y) have a look at: http://cran.at.r-project.org/doc/manuals/R-intro.pdf Peter Wolf __ R-help

[R] bagplot - a rough R function

2005-09-21 Thread Peter Wolf
/software/R-wtools/bagplot/bagplot.R ( R code ) http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/bagplot/bagplot.pdf (examples and description) Now I am looking for examples to test / to improve my function. Where can I get data sets and the corresponding correct bagplots? Thanks Peter Wolf

Re: [R] 'splice' two data frames

2005-08-25 Thread Peter Wolf
3 0.03 e 4 0.04 1 0.01 4 0.04 2 0.02 f 2 0.02 5 0.05 2 0.02 2 0.02 g 4 0.04 5 0.05 3 0.03 3 0.03 h 3 0.03 3 0.03 5 0.05 4 0.04 i 1 0.01 0 0.00 3 0.03 3 0.03 output-end Peter Wolf David Whiting wrote: Hi, I often need to take columns from two data.frames and 'splice' them

Re: [R] Converting characters to numbers in data frames

2005-08-25 Thread Peter Wolf
Try: NAMES=c(NRes.1.2., NRes.1.3., NRes.1.4., NRes.1.5., NRes.1.6.) pattern-NRes\.([0-9]*)\.([0-9]*)\. data.frame(x=sub(pattern,\\1,NAMES),y=sub(pattern,\\2,NAMES)) @ output-start Thu Aug 25 14:08:50 2005 x y 1 1 2 2 1 3 3 1 4 4 1 5 5 1 6 output-end Peter Wolf Anon. wrote: I'm sure I'm

Re: [R] Plotting a simple subset

2005-07-08 Thread Peter Wolf
. Can I have multiple subsets? I.e. In Stata: if( x 5 y 3 ) Try: x-rnorm(20,0,5) y-2*x+rnorm(20) # plot without condition plot(x,y) # some conditions on x and y index- x5 y3 plot(x[index],y[index]) Peter Wolf TIA Michael

[R] [R-pkgs] New CRAN package relax: R Editor for Literate Analysis and lateX

2005-07-01 Thread Peter Wolf
to install the img-package for tcltk For further info see: http://www.wiwi.uni-bielefeld.de/~wolf/software/relax/relax.html maintainer: Hans Peter Wolf Department of Economics University of Bielefeld [EMAIL PROTECTED] R Editor for Literate Analysis and lateX --- the all-in-one editor

Re: [R] R demos

2005-06-28 Thread Peter Wolf
(){ # Mark Hempelmann / Peter Wolf par(bg=blue4, col=white, col.main=white, col.sub=white, font.sub=2, fg=white) # set colors and fonts samp - function(N,D) N*(1/4+D)/(1/4+D*N) z-outer(seq(1, 800, by=10), seq(.0025, 0.2, .0025)^2/1.96^2, samp) # create 3d matrix

Re: [R] r programming help

2005-06-22 Thread Peter Wolf
]*DRY[4]+WET[2]*DRY[3]+WET[3]*DRY[2]+WET[4]*DRY[1], WET[1]*DRY[5]+WET[2]*DRY[4]+WET[3]*DRY[3]+WET[4]*DRY[2]+WET[5]*DRY[1]) print(CYCLE.n) [1] NA 20 90 190 360 640 Peter Wolf Mohammad Ehsanul Karim wrote: Dear list, Is there anyway i can make the following formula short by r-programming

[R] Testing for warning inside functions

2005-05-18 Thread Peter Wolf
for any help. Peter Wolf For illustration purpose a simple example follows: you can get warnings after an error occured or after exiting from the function but not at once after x-matrix(1:3,2,2): options(warn=0) f-function(x){ x-matrix(1:3,2,2) print(0) warnings() # no warning

Re: [R] Testing for warning inside functions

2005-05-18 Thread Peter Wolf
Prof Brian Ripley wrote: On Wed, 18 May 2005, Peter Wolf wrote: I am looking for a way to get a warning message immediately after an evaluation within a function. To get error messages you can use geterrmessage(). Well, only in an error handler, as an error normally throws you out

Re: [R] hex format

2005-04-07 Thread Peter Wolf
chcode() to define hex.to.dec(), dec.to.hex() and sum.hex() to operate with hex numbers. Peter Wolf -- define chcode= chcode - function(b, base.in=2, base.out=10, digits=0123456789ABCDEF){ # change of number systems, pwolf 10/02 # e.g.: from 2 2 2 2

Re: [R] Hexidecimal conversion

2004-12-02 Thread Peter Wolf
) @ output-start decimal representation: 159 [1] 09F output-end Is chcode the function you are looking for? Peter Wolf Hanke, Alex wrote: Help I can produce the hexidecimal equivalent of a decimal number but I am having a hard time reversing the operation. I'm good for hex representations to 159 and am

Re: [R] how to get to interesting part of pattern match

2004-11-19 Thread Peter Wolf
/foo) output-start [1] foo output-end or try: strsplit(abc/foo,/)[[1]][2] output-start [1] foo output-end Peter Wolf __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

Re: [R] crossprod vs %*% timing

2004-10-06 Thread Peter Wolf
] 1.48 0.00 1.53 0.00 0.00 [1] 1.17 0.00 1.22 0.00 0.00 [1] 4.10 0.01 4.39 0.00 0.00 [1] 2.58 0.01 3.24 0.00 0.00 [1] 1.10 0.00 1.29 0.00 0.00 Wed Oct 6 11:26:38 2004 [1] -79.34809 -79.34809 -79.34809 -79.34809 -79.34809 -79.34809 output-end Peter Wolf Robin Hankin wrote: Hi the manpage says

Re: [R] multiple dimensional diag()

2004-10-05 Thread Peter Wolf
10 1013 10 10 [6,] 10 10 10 1024 10 10 [7,] 10 10 10 10 10 1013 [8,] 10 10 10 10 10 1024 ... or integrate the loop into a.block.diag Peter Wolf best wishes Robin a.block.diag - function(a,b,pad=0) { ## a.block.daig

Re: [R] multiple dimensional diag()

2004-10-01 Thread Peter Wolf
. In case of x-array(1:8,rep(2,3)); y-array(-1,rep(2,3)) the function adiag will be a little bit faster. Peter Wolf Robin Hankin wrote: Hi I have two arbitrarily dimensioned arrays, a and b, with length(dim(a))==length(dim(b)). I want to form a sort of corner-to-corner version of abind

Re: [R] loops: pasting indexes in variables names

2004-09-22 Thread Peter Wolf
]] ) @ output-start Wed Sep 22 14:43:09 2004 [[1]] [1] -9 -18 -27 -36 [[2]] [1] 0 0 0 0 0 0 0 [[3]] [1] 20 20 20 20 20 output-end Peter Wolf __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] persiting complex R objects

2004-09-20 Thread Peter Wolf
(with ~ 2000 rows). The dimensions of the matrices are not all the same. My ideal would be a set of functions of the form obj - create() # computes the object save(obj,filename) obj - load(filename) Have a look at ? dump ? source Peter Wolf __ [EMAIL PROTECTED

Re: [R] efficient submatrix extraction

2004-09-16 Thread Peter Wolf
there are two main ideas to improve the efficiency: 1. the comparison with the limit can be done at first 2. a matrix with boxsize*boxsize rows can be defined so that you can apply function apply without using inner loops *= # parameters size-1024; limit-0.7 # some data set.seed(17);

Re: [R] reshaping some data

2004-09-14 Thread Peter Wolf
Try: x - data.frame(x1 = 1: 5, y11 = 1: 5, x2 = 6:10, y21 = 6:10, y22 = 11:15, x3 = 11:15, y31 = 16:20, x4 = 16:20, y41 = 21:25, y42 = 26:30, y43 = 31:35) df.names-names(x) ynames-df.names[grep(y,df.names)] xnames-substring(sub(y,x,ynames),1,2)

Re: [R] advanced dist

2004-06-02 Thread Peter Wolf
/posting-guide.html what about: mtdist- as.matrix(dist(Fbg['Test'])) dimnames(mtdist) - list( Fbg[ 'Family' ], Fbg[ 'Family' ] ) mtdist [ Fbg['Code']==m ,Fbg['Code']==t ] Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman

Re: [R] Making a ranking algorithm more efficient

2004-06-02 Thread Peter Wolf
,)outer(y,y,),2,sum) @ at last some polishing *= result-apply(outer(x,x,)outer(y,y,),2,sum)+1 names(result)-letters[1:8] result @ output-start Wed Jun 2 10:59:03 2004 a b c d e f g h 1 1 1 1 1 2 2 3 output-end in the case of more than 2 dimensions you have to add further outer-operations Peter Wolf

Re: [R] syntax error in function 'for'

2004-05-05 Thread Peter Wolf
package:base R Documentation Control Flow Description: ... Usage: if(cond) expr if(cond) cons.expr else alt.expr for(var in seq) expr ... Examples: for(i in 1:5) print(1:i) for(n in c(2,5,10,20,50)) { x - rnorm(n) cat(n,:, sum(x^2),\n) } Peter

Re: [R] syntax error in function 'for'

2004-05-05 Thread Peter Wolf
? Read the text of the warning again. Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Superposing data on boxplot

2004-05-04 Thread Peter Wolf
What about: y-rnorm(100);z-sample(1:7,100,T);boxplot(y~z);points(y~z) Peter Wolf Ted Harding wrote: Hi folks, I have a vaiable Y and an associated factor Z at several (13) levels. boxplot(Y~Z) produces a nice array of boxplots, one for each level of Z, and each duly labaelled with its level of Z

Re: [R] rbind with missing columns

2004-04-30 Thread Peter Wolf
[,x] else NA)) names(x)-N result-rbind(result,x) } result } rbind.data.frame.NA(B,A,C) @ output-start Fri Apr 30 15:21:21 2004 a b 1 1 NA 2 2 NA 3 3 NA 11 1 4 21 2 5 31 3 6 12 NA 4 22 NA 5 32 NA 6 output-end Peter Wolf Duncan Murdoch wrote: On Fri, 30 Apr 2004 13:47:35

Re: [R] accessing information in lists

2004-04-29 Thread Peter Wolf
, parameter, etc. because there is a function t(). Peter Wolf Murray Keir wrote: I've created a dataframe containing multiple ACF lists through the command rev.acf-apply(rev.matrix, 2, acf, na.action=na.contiguous, lag.max=12, plot=FALSE) where rev.matrix is an n by t matrix containing n time series

Re: [R] GUI checkbox linked to entry

2004-04-29 Thread Peter Wolf
(){ on.off-tclvalue(cbValue) if(on.off==1) tkconfigure(en, state=normal) if(on.off==0) tkconfigure(en, state=disabled) print(on.off) } tkbind(top,1,set.entry.state) Do you know http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples? Peter Wolf

Re: [R] Tcl Tk table

2004-04-23 Thread Peter Wolf
need some additional features to be allowed to use the table-widget! you have to include: tclRequire(Tktable) ... and all is ok for 1.8.1 and I also hope for 1.9.0. see: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/tktable.html Peter Wolf

Re: [R] x-only zoom and pan?

2004-04-05 Thread Peter Wolf
Hallo here is a simple proposal using tcltk-sliders. Peter Wolf # step 1: define general slider function slider-function(refresh.code,names,minima,maxima,resolutions,starts,title=control,no=0, set.no.value=0){ # pw 03/2004 if(no!=0) return(as.numeric(tclvalue(get(paste(slider,no,sep

Re: [R] Zero Index Origin?

2004-04-02 Thread Peter Wolf
-- which increase the set of R programming pearls and will enrich the discussion in my lectures Peter Wolf Richard A. O'Keefe wrote: I asked where index origin 0 would help. (I am familiar with Dijkstra's article on why counting should start at 0 and agree whole-heartedly. I am also convinced

Re: [R] Zero Index Origin?

2004-03-31 Thread Peter Wolf
experiments have been to implement APL functions like take, drop, rotate, ... and now you are looking for a more elegant way to manage origin 0 than +QUAD.IO. Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] Zero Index Origin?

2004-03-31 Thread Peter Wolf
){ j-i-1 a[adapt(0)]-a[adapt(i)] while(a[adapt(j)]a[adapt(0)]){ a[adapt(j+1)]-a[adapt(j)] j-j-1 } a[adapt(j+1)]-a[adapt(0)] } return(a[-1]) } Peter Wolf __ [EMAIL PROTECTED] mailing list https

Re: [R] squashing some numbers

2004-03-22 Thread Peter Wolf
Peter Wolf Fred J. wrote: Hello I have a data frame with many col.s and rows V4 V5 V6 V7 3 4 5 6 1 4 4 1 2 4 4 1 4 0 5 1 since the data has the middle 2 rows with V5 and V6 are equal, I need to produce V4 V5 V6 V7 3 4 5 6 this line removed and the value V7 = 1

Re: [R] expanding some values in logical vector

2004-03-15 Thread Peter Wolf
/2) ind-outer(which(x),(-m):m,+) ind-ind[ind0 ind = length(x)] x[ind]-TRUE x } x-rep(FALSE,20); x[c(4,10,19)]-TRUE expand.true(x,span=5) [1] FALSE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE [13] FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE Peter Wolf Petr Pikal

Re: [R] Changingvalues in data frame

2004-03-11 Thread Peter Wolf
Frank Gerrit Zoellner wrote: Hi! I have a question concerning data frames and changing particular values in it. I have set up a data frame containing n rows of observations od dimension m, so in each row there is a vector of size m. Now I want to introduce a cut off to tha data. Therfore I

Re: [R] circular filter

2004-02-25 Thread Peter Wolf
,]111111111 [6,]011111110 [7,]011111110 [8,]001111100 [9,]000010000 Peter Wolf

Re: [R] circular filter

2004-02-24 Thread Peter Wolf
0 Peter Wolf Christof Bigler wrote: I try to find a circular filter that I can export to be used in a spatial software. Assuming, we have a matrix, representing 9x9 regularly spaced points

Re: [R] How to repeat a procedure

2004-02-18 Thread Peter Wolf
Haiyan Chen wrote: Hello, 1. After I generate a 100x50 matrix by x3-matrix(0,100,50);for (i in 1:100) {x1-rpois(50, mu[i]);x2-x1; x2[runif(50).01]-0; x3[i,]-x2}, 2. I want to calculate means and sample variances of each row and create a new matrix 100x2; Try: mean.var-function(n=10, m=5){

Re: [R] (no subject) -- integer to binary

2004-02-05 Thread Peter Wolf
[EMAIL PROTECTED] wrote: Hello, Splus contains the function intbin(x,l). This function allows to make a conversion from an integer x to a binary of length l. for example intbin(3,2) returns 11 intbin(3,3) returns 011 Do you know how to do it in R ? Thank you meriema

Re: [R] R: plotting multiple functions

2004-02-03 Thread Peter Wolf
allan clark wrote: Hi all Another simple question. I would like to plot three graphs one the same plot with different colours. Say red, blue and black. Here are the functions. r1-1+5*cos(2*pi*seq(1:100)/20)+rnorm(100) r2-1+7*sin(2*pi*seq(1:100)/20)+rnorm(100)

Re: [R] How to generate a report with graphics and tables?

2004-01-29 Thread Peter Wolf
: http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/formfill/ff.html or http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/formfill/ff.rd Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] subset select within a function

2004-01-21 Thread Peter Wolf
juli g. pausas wrote: Dear all, I'd like to subset a df within a function, and use select for choosing the variable. Something like (simplified example): mydf - data.frame(a= 0:9, b= 10:19) ttt - function(vv) { tmpdf - subset(mydf, select= vv) mean(tmpdf$vv) } ttt(mydf$b) But this is not

Re: [R] 3-dimensional looping Q.

2004-01-08 Thread Peter Wolf
) })) print(all(round(100*rslpy)==round(100*rData))) @ output-start [1] 1.49 0.00 1.49 0.00 0.00 [1] 0.92 0.00 0.92 0.00 0.00 [1] TRUE output-end Peter Wolf Uwe Ligges wrote: Maurice McHugh wrote: Hello everyone- I have a 3-d array with the 1st dimension being monthly mean data that I would like

Re: [R] assign

2004-01-07 Thread Peter Wolf
Perez Martin, Agustin wrote: DeaR useRs: I would like to assign a values in an object using a loop 'for'. This is a reduce example of my problem, my real problem is a few complicated: for (j in 1:10) { x.j-rnorm(100) } I want to create 10 objects as x.1, x.2, ... , x.9, x.10 with values

Re: [R] for loop over dataframe without indices

2003-12-19 Thread Peter Wolf
, not very nice Peter Wolf Gabor Grothendieck wrote: Based on an off list email conversation, I had I am concerned that my original email was not sufficiently clear. Recall that I wanted to use a for loop to iterate over the rows of a dataframe without using indices. Its easy to do this over

Re: [R] `bivariate apply'

2003-12-16 Thread Peter Wolf
-cbind(as.vector(cl),as.vector(t(cl))) res-apply(cl,1,function(xx)fun(x[,xx[1]],x[,xx[2]])) matrix(res,ncol(x),ncol(x)) } Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] Flury faces.

2003-12-15 Thread Peter Wolf
-bielefeld.de/~wolf/software/R-wtools/faces/faces.pdf Some random faces: http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/faces/p20618291De3NA.jpg Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] convert data

2003-12-05 Thread Peter Wolf
y - c( OLDa, ALL, OLDc, OLDa, OLDb, NEW, OLDb, OLDa, ALL,...) el - c(OLDa, OLDb, OLDc, NEW, ALL) match(y,el) [1] 1 5 3 1 2 4 2 1 5 NA Peter Wolf --- Peter Dalgaard wrote: Muhammad Subianto [EMAIL PROTECTED] writes: Dear R-helper, I have a data set like

Re: [R] GUI's for R

2003-12-05 Thread Peter Wolf
(window and linux) from http://www.wiwi.uni-bielefeld.de/~wolf/software/revweb/rtrevive.exe after installation the package, you have to type: library(rtrevive) rwined() Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman

Re: [R] BEGINNER: please help me to write my VERY simple function

2003-10-21 Thread Peter Wolf
Michele Grassi wrote: Hi. 1)I have two variables: call a-c(e.g.0,3,6,7...) b-c(e.g.6,8,3,4...) I want to create a third vector z wich contain the pairs values z-c(0,6,3,8,6,3,7,4and so on for each pairs (a,b)). There is a specific function? How can i write my own

Re: [R] report generator a la epiinfo

2003-10-21 Thread Peter Wolf
one is given by my R function ff. ff allows you to substitute expressions by evaluated results in a raw report. See: http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/formfill/ff.html or http://www.wiwi.uni-bielefeld.de/~wolf/software/R-wtools/formfill/ff.rd Peter Wolf

Re: [R] Save object R with tkgetSaveFile

2003-09-19 Thread Peter Wolf
=as.character(a)) Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] extracting columns with NA's

2003-09-19 Thread Peter Wolf
-help Try: x-matrix(1:16,4,4) x[col(x)=row(x)]-NA x[,! apply(x,2,function(x) all(is.na(x))) ] [,1] [,2] [,3] [1,] NA NA NA [2,]2 NA NA [3,]37 NA [4,]48 12 Peter Wolf __ [EMAIL PROTECTED] mailing list https

Re: [R] subscripts in lists

2003-08-14 Thread Peter Wolf
. Peter Wolf Department of economics University of Bielefeld [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] reverse array indexing

2003-08-03 Thread Peter Wolf
-bielefeld.de/~wolf/software/R-wtools/decodeencode.rev Peter Wolf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] Stem and leaf display?

2003-07-17 Thread Peter Wolf
,2) # # style: = UREDA= UREDA like stem ( m = 2, 5 ) # ## #Author: # # Peter Wolf 05/2003

Re: [R] How can I do a spinning plot in R?

2003-06-23 Thread Peter Wolf
Some days ago I wrote a function for rotating a cloud of points. To control the rotation a simple Tcl/Tk-widget is used. Here you can find the R code: http://www.wiwi.uni-bielefeld.de/~wolf/software/spin3R/spin3R.sch Peter Wolf, [EMAIL PROTECTED] Richard A. O'Keefe wrote: I have found

Re:[R] Combining the components of a character vector

2003-04-04 Thread Peter Wolf
--- Peter Wolf, Statistik/Informatik, Fak.f.Wiwi, Uni Bielefeld [EMAIL PROTECTED], http://www.wiwi.uni-bielefeld.de/~wolf/wolf.html --- [[alternate HTML version

Re: [R] dataframes (The message that once had a suspicious header)

2003-03-20 Thread Peter Wolf
F4 [5,] A D F5 [6,] A D F6 merge(t1,t2,1:2) V1 V2 V3.x V3.y 1 A C E1 F1 2 A C E1 F2 3 A D E2 F5 4 A D E2 F6 5 B C E3 F3 6 B C E3 F4 --- Peter Wolf __ [EMAIL PROTECTED] mailing list https

Re: [R] inserting elements in a list

2003-02-18 Thread Peter Wolf
4 10045 1005 # pw 02/2003 if(is.logical(pos.insert)){ pos.insert - pos.insert[pos.insert]/length(pos.insert) + cumsum(!pos.insert)[pos.insert] } x-c(x,x.insert)[order(c(seq(x),pos.insert))] return(x) } Peter Wolf -- Dr. Agustin Lobo wrote