Re: [R] How to reuse my self function?

2009-03-04 Thread Chang Jia-Ming
ments for test1 functions should be consider to be also > arguments of test2 function. > > > test2 <- function( test1arguments, test2arguments ){ > ... > value <- test1( test1arguments ) > ... > > } > > Regards > > > > 2009/3/4 Chang J

[R] How to reuse my self function?

2009-03-04 Thread Chang Jia-Ming
Dear all, I wrote a function test1 in test1.R. Right, I am writing another function test2 on test2.R and trying to use test1 function. How can I do? Is there any similar way like including test1.R in test2.R file? Thank You Very Much. Jia-Ming 張家銘 Jia-

[R] How to calculate the distance between two density functions

2008-12-05 Thread Chang Jia-Ming
Dear all, I wrote the following code to calculate the density functions for two data sets, respectively. den_str <-density(str_data$Similarity); den_non_str <-density(nonstr_data$Similarity); However, I would like to knowing the difference between den_str and den_non_str, that is, the di

Re: [R] the number of the arguments of function is not sure

2008-11-14 Thread Chang Jia-Ming
...) > par(mfrow = c(length(args), 1)) > lapply(args, plot) > } > plot_test(1:5) > plot_test(1:5, 5:1, 3:7) > > 2008/11/14 Chang Jia-Ming <[EMAIL PROTECTED]> > >> I want to write a function to plot a picture for each inputting file like >> the following ex

[R] the number of the arguments of function is not sure

2008-11-14 Thread Chang Jia-Ming
I want to write a function to plot a picture for each inputting file like the following example. plot_test <- function(f1,f2) { plot_file(f1); plot_file(f2); } However, the above function just could plot two input file. If the number of input file is not sure, it could be 2, 3 or more. plot_te

[R] the number of the arguments of function is not sure

2008-11-14 Thread Chang Jia-Ming
I want to write a function to plot a picture for each inputting file like the following example. plot_test <- function(f1,f2) { } However, -- Jia-Ming 張家銘 Jia-Ming Chang PhD Student Comparative Bioinformatics Group Bioinformatics and Genomics Programme