search for: pathtoyourfile

Displaying 2 results from an estimated 2 matches for "pathtoyourfile".

2010 May 02
3
How could I use a function saved in one file ?
Dear All: I create a file named :"P_Value" with only one simple function: P_Value <- function( Table ) { S = fisher.test(Table, alternative = "two.sided"); return(S$p.value); } However, it seems that it's impossible to use this function directly, because no matter where I save this file, R always reports
2007 Apr 30
3
Read every second line from ASCII file
Dear all, I have an ASCII file where records are separated by a blank. I would like to read those data; however, only the data in rows 1, 3, 5, 7, ... are important; the other lines (2,4,6,8,....) contain no useful information for me. So far I used awk/gawk to do it: gawk '{if ((FNR % 2) != 0) {print $0}}' infile.txt > outfile.txt What is the recommended way to accomplish this in R?