search for: raf1729

Displaying 7 results from an estimated 7 matches for "raf1729".

Did you mean: r201729
2003 Apr 29
2
Remove leading brackets in print?
Hi, I can't seem to get an answer for this by searching through the R-help archives: How does one remove leading brackets in print? For example, >print( 3 ) >[1] 3 Would it be possible to get rid of the "[1]"? Of course the effect is the same without "print", as in, >3 >[1] 3 but I would only be interested in omitting brackets in printing, if that's
2003 Apr 30
5
Scanning data files line-by-line
Hi all, is there a way to read a data file into R line-by-line, akin to what fscanf does in C, say? It seems that "scan" and "read.table" both read the entire data file in at once, whereas "readLines" allows one to read a file partially, but doesn't quite read line-by-line either. I guess what I was hoping to do is something like this: while( linebyline(
2003 May 01
4
List of lists? Data frames? (Or other data structures?)
Hi, I'm faced with the following problem and would appreciate some advice. I could have a data frame x that looks like this: aa bb a 1 "A" b 2 "B" The advantage of this is that I could access all the individual components easily. Also I could access all the rows and columns easily. Alternatively, I could have a list of
2003 May 06
3
Loops and memory
Hi, this question is meant to be a bit vague, since I'm really not familiar with all the issues involved. It's also a problem that I think many would have encountered and would have useful suggestions. According to MASS, 2nd ed., p. 158, "A major issue is that S is designed to be able to back out from uncompleted calculations, so that memory used in intermediate calculations is
2003 May 07
3
Sink for a subdirectory
Hi, how do I sink output to a subdirectory under which R is running? For example, suppose R is running in ~me and I would like to sink output to ~me/Subdir/filename. The obvious sink( "Subdir/filename" ) does not seem to work. Thanks very much.
2003 May 05
1
commandArgs()
Apologies for asking about this, but I don't quite understand how this works after looking through the FAQ and the Help archives. Let's say I want to pass "1000" as an argument to R. I did the following: >R CMD BATCH --1000 infile outfile When I do print( commandArgs() ), I see [1] ".../R.bin" "--restore" [3] "--save"
2003 May 16
2
Efficient subsetting
Hi, I'm facing this problem quite a lot, so it seems worthwhile to check to see what the most efficient solution is. I've two vectors x (values ordered) and y. I've ranges x < x0, x0 <= x < x1, x1 <= x < x2, x2 <= x < x3, x > xn and want to construct a subvector yprime of y which consists of the first/last value of y whose x values are in the range. For