[R] lapply

roslinazairimah zakaria
Sun, 31 Jul 2016 02:53:40 -0000

Dear r-users,

I would like to use lapply for the following task:

## Kolmogorov-Smirnov
ks.test(stn_all[,1][stn_all[,1] > 0],stn_all_gen[,1][stn_all_gen[,1] > 0])
ks.test(stn_all[,2][stn_all[,2] > 0],stn_all_gen[,2][stn_all_gen[,2] > 0])
ks.test(stn_all[,3][stn_all[,3] > 0],stn_all_gen[,3][stn_all_gen[,3] > 0])
ks.test(stn_all[,4][stn_all[,4] > 0],stn_all_gen[,4][stn_all_gen[,4] > 0])
ks.test(stn_all[,5][stn_all[,5] > 0],stn_all_gen[,5][stn_all_gen[,5] > 0])
ks.test(stn_all[,6][stn_all[,6] > 0],stn_all_gen[,6][stn_all_gen[,6] > 0])

 I would like to conduct the Kolmogorov Smirnov goodness of fit tests.

Is it possible?


Thank you very much.
--
*Dr. Roslinazairimah Binti Zakaria*
*Tel: +609-5492370; Fax. No.+609-5492766*

*Email: roslinazairimah at ump.edu.my <roslinazairimah at ump.edu.my>;
roslinaump at gmail.com <roslinaump at gmail.com>*
Deputy Dean (Academic & Student Affairs)
Faculty of Industrial Sciences & Technology
University Malaysia Pahang
Lebuhraya Tun Razak, 26300 Gambang, Pahang, Malaysia

	[[alternative HTML version deleted]]