similar to: parsing dir output for file sizes

Displaying 20 results from an estimated 20000 matches similar to: "parsing dir output for file sizes"

2009 Jul 23
2
Constructing lists (yet, again)
This is an attempt to rescue an old R-help question that apparently received no response from the oblivion of collective silence, and besides I'm also curious about the answer > From: Griffith Feeney (gfeeney at hawaii.edu) > Date: Fri 28 Jan 2000 - 07:48:45 EST wrote (to R-help) > Constructing lists with > > list(name1=name1, name2=name2, ...) > > is tedious when
2001 May 19
2
calculations on diagonals of a matrix
Given an nxm matrix A I want to compute the nxm matrix B whose ij-th element is the sum of the elements of A lying on the diagonal that ends with element ij, i.e., b_ij = a_ij + a_(i-1)(j-1) + a_(i-2)(j-2) + ... In APL (which I no longer use), I would use the 'rotate' operator to derive an array whose columns are diagonals of the given array and then cumulate down columns. Is
2000 Oct 17
5
R for Debian 2.2
I've recently installed Debian/GNU Linux 2.2. The R package on the debian website and Official CD is 0.90.x, so I checked cran for a more recent deb package, with the following result. homebrew:~# apt-get install r-base Reading Package Lists... Done Building Dependency Tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you
2000 Apr 18
1
path = "." default for list.files()?
Would it make sense to default the path argument for list.files() to "."? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
2000 Aug 19
1
Exporting graphics to PS or EPS
On Fri, 18 Aug 2000 07:49:44 +0100, Brian D Ripley <ripley at stats.ox.ac.uk> wrote: >On Thu, 17 Aug 2000, Paul E Johnson wrote: >> My experience is that, if I output a gif that does not >> fit on the page, then I've shot myself in the foot because resizing the >> graph makes all the text in it too small. I don't think postscript is >> immune to this
2010 Jan 09
4
parsing pdf files
I have a pdf file that I would like to parse into R: http://www.williams.edu/Registrar/geninfo/faculty.pdf For now, I open the file in Acrobat by hand, then save it "as text" and then use readLines(). That works fine but a) I am concerned that some information may be lost and b) I may be doing this a lot, so I would rather have R grab the information from the pdf file directly. So: is
2000 Feb 02
1
"Use a command like x <- vi() to recover"
Subject command doesn't work with rw0901 running on win95 (of course) so, after looking at the vi and emacs code, I put textpad <- function(name = NULL, file = ""){ edit(name, file, editor = "g:\\textpad\\txtpad32.exe") } Now x <- textpad() brings up the botched code in the textpad editor, as expected, but when I try to save changes I get an "Access to
2011 Apr 18
1
XML Packge for Windows XP and R 2.12.
Hello, I am looking for the XML Package for Windows or any package, which would enable me to use the function "xmlTreeParse". In a thread dating from 2001, the same question is raised: >>Griffith Feeney wrote: >> >> Has anyone gotten the XML package (R News 1-1:24) with R running on Windows >> (95 or 98 or 2000)? I've looked at the omegahat, expat and libxml
2005 Sep 15
2
Splitting the string at the last sub-string
Hi, I need to split a string into 2 strings, with the split point defined by the last occurrence of some substring. I come up with some convoluted code to do so: str = "Chance favors the prepared mind" sub = "e" y = unlist(strsplit(str,sub)) z = cbind(paste(y[-length(y)], sub, sep="", collapse = ""), y[length(y)]); y z z[1] z[2] Is there a simpler way
2007 Aug 02
4
Finding multiple characters in the same string
Hi I have this problem where I need to find if there is any numbers in a string, this is no problem if theres only one number per string. I would then simply use the regexpr() funtion togheter with the substring function to extract the number. But regexpr only picks one number per string either from the beginning or the end, but not multiple. Can this be done? And how for example My string <-
2013 Jan 13
3
extracting character values
Dear all, I have a dataframe of names (netw), with each cell including last name and initials of an author; some cells have NA. I would like to extract only the last name from each cell; this new dataframe is calle 'res' Here is what I do: res <- data.frame(matrix(NA, nrow=dim(netw)[1], ncol=dim(netw)[2])) for (i in 1:x) { wh <- regexpr('[a-z]{3,}',
2000 Mar 09
2
how to document user-defined packages for windows
After several hours of trial and error I've figured out how to create packages for use by rw1000 ("Writing R Extensions" seems not to cover this). I haven't been able to figure out how to make help files work. I want plain text only, via help(name) or ?name. I create a 'help' subdirectory containing a 00Titles file and function-specific help files in the package
2011 Sep 29
2
String manipulation with regexpr, got to be a better way
Help-Rs,   I'm doing some string manipulation in a file where I converted a string date in mm/dd/yyyy format and returned the date yyyy.   I've used regexpr (hat tip to Gabor G for a very nice earlier post on this function) in steps (I've un-nested the code and provided it and an example of what I did below.  My question is: is there a more efficient way to do this.  Specifically is
2004 Mar 24
1
string problems ( grep and regepxr)
Recently working with strings and data I have found a small problem. Windows XP R 1.8.1 Reading data from a "txt file" with readLine. finding a specific line with "grep" command, all OK. but here comes the problem... After finding the correct line(s) i need to find a substring inside each string. In this case "tabs" I think it represented by "\t" in the
2008 May 29
2
how to use substring match as condition?
Hi, How can I use a substring match as a condition in a subset command? Sth like this: subset(input, field1=="blah1" & field2=="blah2") # but now with substring match in field2 subset(input, field1=="blah1" & field3 *substringmatch* "blah3") I've tried with gsub, but it won't work: subset(input, field1=="blah1" &
2012 Jun 12
3
String Manipulation in R
Hi , Is there any inbuilt functions to check whether a substring is present in a string and give the result as boolean Thanks -- View this message in context: http://r.789695.n4.nabble.com/String-Manipulation-in-R-tp4633104.html Sent from the R help mailing list archive at Nabble.com.
2000 Mar 30
0
forwarded message from Griffith Feeney
--8sD16rPb6u Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Griffith, I'm forwarding the mail to r-devel. Best, Fritz --8sD16rPb6u Content-Type: message/rfc822 Content-Description: forwarded message Content-Transfer-Encoding: 7bit Received: from isildur.ci.tuwien.ac.at (root@isildur.ci.tuwien.ac.at [128.131.51.43]) by
2009 Feb 25
3
regexp capturing group in R
Hello, Newbie question: how do you capture groups in a regexp in R? Let's say I have txt="blah blah start=20080101 end=20090224". I'd like to get the two dates start and end. In Perl, one would say: my ($start,$end) = ($txt =~ /start=(\d{8}).*end=(\d{8})/); I've tried: txt <- "blah blah start=20080101 end=20090224" m <-
2012 Aug 06
5
regexpr with accents
Hello, I have build a syntax to find out if a given substring is included in a larger string that works like this: d1$V1[regexpr("some text = 9",d1$V2)>0] <- 9 and this works all right till "some text" contains standard ASCII set. However, it does not work when accents are included as the following: d1$V1[regexpr("some t?xt = 9",d1$V2)>0] <- 9 I have
2010 Aug 22
4
how to implement string pattern extraction in R
Hi, In perl, to get a substring matching a particular pattern can be implemented like the following example: $x = "AAAA.txt"; if ($x=~ /(.*?)\.txt/){ $prefix = $1; } So how to do the same thing in R? Can someone provide me the code sample? Thanks much in advance. -- Waverley @ Palo Alto