similar to: R 2.10.0: Error in gsub/calloc

Displaying 20 results from an estimated 3000 matches similar to: "R 2.10.0: Error in gsub/calloc"

2009 Nov 12
1
How can this code be improved?
I am running the following code on a MacBook Pro 17" Unibody early 2009 with 8GB RAM, OS X 10.5.8, R 2.10.0 Patch from Nov. 2, 2009, in 64-bit mode. freq.stopwords <- numeric(0) freq.nonstopwords <- numeric(0) token.tables <- list(0) i.ss <- c(0) cat("Beginning at ", date(), ".\n") for (i.d in 1:length(tokens)) { tt <- list(0) for (i.s in
2010 Oct 05
2
How to convert a list to a ... argument for a function
Hi, I have a function f <- function(..., func){ something }, where func is a function of the form function(...). ?I would like to pass func all the arguments passed to f except the last. ?I know that I can manipulate the variable number of arguments passed to f by converting ... to a list, i.e., arglist <- list(...). ?But how do I pass func the first n-1 list items of arglist (n <-
2010 Aug 02
1
Multibyte characters in (row) names
I have an array with names which contain multibyte characters. ?When I try to write the array to a file using write.table and row.names = T I receive an error message when the first such name is encountered, saying that I have not specified the option to generate NA instead. ?I really would be satisfied if the row name in the file were exactly what is displayed when I print the array on the
2006 Jul 23
3
RfW 2.3.1: regular expressions to detect pairs of identical word-final character sequences
Dear all I use R for Windows 2.3.1 on a fully updated Windows XP Home SP2 machine and I have two related regular expression problems. platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor
2010 Jul 02
3
Good Package(s) for String and URL processing?
Are there packages that allow improved String and URL processing? E.g. extract parts of a URLs such as sub-domains, top-level domain, protocols (e.g. https, http, ftp), file type based on endings, check if a URL is valid or not, etc... I am currently only using split and paste. Are there better and more efficient ways to handle strings e.g. finding sub-strings or to do pattern matching? What
2008 Apr 09
11
Number of words in a string
Hi R, A quick question: How do we find the number of words in a string? Example: C="Have a nice day" And the number of words should be 4. any built in function or?... Thanks, Shubha Shubha Karanth | Amba Research Ph +91 80 3980 8031 | Mob +91 94 4886 4510 Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com This e-mail may contain
2010 Mar 15
2
tcltk and R
I have had some comments on sqldf regarding its dependence on tcltk such as the second last sentence on this blog post: http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://www.wentrue.net/blog/%3Fp%3D453&prev=http://blogsearch.google.com/blogsearch%3Fhl%3Den%26ie%3DUTF-8%26q%3Dsqldf%26lr%3D%26sa%3DN%26start%3D10 sqldf does not directly use tcltk but it does use strapply in
2008 Jan 23
1
Package Building and Name Space
Hello, I just don't get this and would appreciate if someone could write a line or two: I'm trying to build this package and it stops installing after I add the following to the NAMESPACES file: >importFrom(gsubfn,strapply) The error during the package test is: Error in MyPackage::MyFunction : package 'MyPackage' has no name space and is not on the search path Calls:
2008 Jan 23
1
Package Building and Name Space
... sorry for reposting this in a more appropriate forum than r.general ... Hello, I just don't get this and would appreciate if someone could write a line or two: I'm trying to build this package and it stops installing after I add the following to the NAMESPACES file: >importFrom(gsubfn,strapply) The error during the package test is: Error in MyPackage::MyFunction : package
2009 May 11
3
Searching within a ch. string
Hi all, is there any function to find some words in a character-string? For example suppose the string is : "gdfsa-sdhchc-88", now I want to find whether this string contains "sdhch". Is there any R function to do that? Regards, -- View this message in context: http://www.nabble.com/Searching-within-a-ch.-string-tp23484010p23484010.html Sent from the R help mailing list
2010 Mar 31
3
regular expression help to extract specific strings from text
Dear all, Lets say I have the following: > x <- c("Eve: Going to try something new today...", "Adam: Hey @Eve, how are you finding R? #rstats", "Eve: @Adam, It's awesome, so much better at statistics that #Excel ever was! @Cain & @Able disagree though :(", "Adam: @Eve I'm sure they'll sort it out :)", "blahblah") > x [1]
2008 Aug 06
2
matching problem
I have a matching problem that I cant solve. mystring = "xxx{XX}yy{YYY}zzz{Z}" where "x","X","y","Y","z","Z" basiclly can be anything, letters, digits etc. I'm only interested in the content within each "{}". I am close but not really there yet. library(gsubfn) strapply(mystring,"\\{[^\\}]+",, perl=F)
2009 Aug 04
4
regex question
Hi, I am getting stuck over an apparently simple problem in the use of regular expressions : To collect together the first letters of the words from the Perl motto, ?There is more than one way to do it? in the following form ? TIMTOWTDI. I tried the following code : ? ##### A regex problem with the Perl motto astr<-"There is more than one way to do it" b1<-grep("\\<",
2010 Jul 15
2
Search and extract string function
Hi all, I'm trying to write a function that will search and extract from a long character string, but with a twist: I want to use the characters before and the characters after what I want to extract as reference points. For example, say I'm working with data entries that looks like this: Drink=Coffee:Location=Office:Time=Morning:Market=Flat
2010 Jul 08
2
strsplit("dia ma", "\\b") splits characterwise
\b is word boundary. But, unexpectedly, strsplit("dia ma", "\\b") splits character by character. > strsplit("dia ma", "\\b") [[1]] [1] "d" "i" "a" " " "m" "a" > strsplit("dia ma", "\\b", perl=TRUE) [[1]] [1] "d" "i" "a" " "
2009 Nov 03
3
re ading tokens
Greetings, I am not familiar with processing text in R. Can someone tell me how to read each line of words as separate elements in a list? FE, I would like to turn: word1 word2 word3 word2 word4 into a list of length two with three character elements in the first list and two elements in the second. I know that this should be easy, but I am a little confused by the text functions. Thanks in
2010 Apr 23
2
Problem with parsing a dataset - help earnestly sought
Dear fellow R-help members, I hope to seek your advice on how to parse/manage a dataset with hundreds of columns. Two examples of these columns, 'cancer.problems', and 'neuro.problems' are depicted below. Essentially, I need to parse this into a useful dataset, and unfortunately, I am not familiar with perl or any such language. data <- data.frame(id=c(1:10))
2009 Oct 03
1
Named backreference in gsub()?
Hi, I'm running out of the *numbered* backreferences \\1, \\2, ..., \\9 for gsub(). Does R support *named* backreferences, and if so, what is the syntax? Thanks Henrik
2009 Oct 26
1
regular expressions
Dear list, I have the following text to parse (originating from readLines as some lines have unequal size), st = c("START text1 1 text2 2.3", "whatever intermediate text", "START text1 23.4 text2 3.1415") from which I'd like to extract the lines starting with "START", and group the subsequent fields in a data.frame in this format: text1 text2
2007 Sep 25
5
extracting data using strings as delimiters
Dear List, I have an ascii text file with data I'd like to extract. Example: Year Built: 1873 Gross Building Area: 578 sq ft Total Rooms: 6 Living Area: 578 sq ft There is a lot of data I'd like to ignore in each record, so I'm hoping there is a way to use strings as delimiters to get the data I want (e.g. tell R to take data between "Built:" and "Gross" -