similar to: Re move all punctuations except commas

Displaying 20 results from an estimated 2000 matches similar to: "Re move all punctuations except commas"

2006 May 09
3
remove Punctuation characters
Hi, I want to remove all punctuation characters in a string. I was trying it use a regular expressions but it doesn't work. Here is a sample os what i want: str <- 'ABD - remove de punct, and dot characters.' str <- gsub('[:punct:]','',str) str "'ABD remove de punct and dot characters" is there any function that do this kind of thing? Thanks to
2008 Nov 28
3
regexp help needed
Hello, I have a vector of dates and I would like to grep the year component from this vector (= all digits after the last punctuation character) dates <- c("28.7.08","28.7.2008","28/7/08", "28/7/2008", "28/07/2008", "28-07-2008", "28-07-08") the resulting vector should look like "08" "2008"
2009 Aug 13
3
Finding minimum of time subset
Dear List, I have a data frame of data taken every few seconds. I would like to subset the data to retain only the data taken on the quarter hour, and as close to the quarter hour as possible. So far I have figured out how to subset the data to the quarter hour, but not how to keep only the minimum time for each quarter hour. For example:
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
2008 Jan 07
1
numerical data frame
Dear All, I've successfully import my synteny data to R by using scan command. Below show my results. My major problem with my data is how am i going to combine the column names with the data( splt) where i have tried on cbind but a warning message occur. I have realized that the splt data only have 5 column instead of 6. Please help me with this!! I want my data to be a numerical
2009 Aug 06
1
problem with recording numeric output into another dataframe
dear all, I have two dataframes dataframe1 ID a b c dataframe2 ID value a;W 100 X;c 200 Y;Z 300 I wanted to match the IDs from the two dataframes and record the values into a new column of dataframe1 at the corresponding rows. This is what I expect: dataframe1 ID value a 100 b c 200 I tried doing it like this: for (i in seq(1:nrow(dataframe1))) {
2011 Aug 23
1
Implementing a "plugin" paradigm with R methods
Dear list, I was wondering how to best implement some sort of a "plugin" paradigm using R methods and the dispatcher: Say we have a function/method ('foo') that does something useful, but that should be open for extension in ONE specific area by OTHERS using my package. Of course they could go ahead and write a whole new 'foo' method including the features they'd
2009 Jul 23
2
rows missing after dataset loaded to R
Dear all, When I loaded a dataset (a txt file), which is structured in a tabular format, to R by using read.delim, I found some rows were missing. The column number was correct. These missing rows are no apparently different from the other rows, and for some unknown reasons these missing rows scattered among the last 50 rows of the dataset. Then after I tried to open this txt file in Excel and
2016 Sep 09
2
Borrar carácteres extraños /xax
Buenos días, estoy realizando análisis de texto con Twitter y tengo un problema con unos carácteres que no logro quitar. Són cadenas de letras con forma similar a *xaexdfxdeaxoa*. Creo que surgen de la códificación de los emojis. Yo suelo utilizar, más o menos el siguiente codigo con gsub para limpiar texto, pero no me sirve # remove rt x = gsub("rt", "", x) # remove at x =
2009 Apr 09
1
Does R support [:punct:] in regexps?
Hello does R support [:punct:] in regular expressions? I am trying to strip all regular expressions for a vector of strings. > x <- c("yoda-yoda","billy!") > gsub("/[:punct:]/","",x) [1] "yoda-yoda" "billy!" Thanks Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of Cancer
2003 Apr 29
5
[Bug 550] Problems with .Ql in mdoc
http://bugzilla.mindrot.org/show_bug.cgi?id=550 Summary: Problems with .Ql in mdoc Product: Portable OpenSSH Version: -current Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: Documentation AssignedTo: openssh-unix-dev at mindrot.org ReportedBy: cjwatson at
2012 Mar 18
3
Extracting numbers from a character variable of different types
Hello, I have a file which contains a column with age, which is represented in the two following patterns 1. "007/A" or ''007/a" or ''7 /a" ..... In this case A or a means year and I would like to extract only the numeric values eg 7 in the above case if this pattern exits in a line of file. 2. "004/M" or "004/m" where M or m means month
2013 Jun 28
3
quitar tildes
Hola. Ahora mismo no caigo en cómo quitar las tildes de un texto. He probado con v1 = sub("([[:punct:]])","",v1) pero no funciona. ¿ideas? Gracias
2015 Nov 24
2
transformar número en R
Buenas tardes, Estoy extrayendo un dato de una web y el separador de miles es el ".", que es el separador decimal en R. He intentado reemplazaro por el caracter, para convertirlo en ´numérico de R, vacío pero no me deja. Lo que he intentado es lo siguiente: > a<-"17.691.700" # valor que obtengo de la web > sub(".","",a) [1] "7.691.700"
2012 May 31
3
How can I get this function to work?
Hello All, Can anyone tell help me understand why the function below doesn't work and how I can fix it? Below are some sample data, some code that works on individual rows of the data, and my attempt to translate that code into a function. My hope is to get the function working and then to apply it to the larger data frame using ddply() from the plyr package or possibly some other approach.
2006 Aug 29
0
Several bug-fixes and improvements(?)
Hey guys, I have been working with RedCloth for the past week or so in order to try and upgrade a University''s blog system (blogs.warwick.ac.uk) to Textile2, having used a bespoke Java-based Textile1 implementation in the past. As such, it''s been an important part of this that it works as much as possible to give the same results for Textile1 code, but with the added features
2012 Jan 27
2
tm package: handling contractions
I tried making a wordcloud of Obama's State of the Union address using the tm package to process the text sotu <- scan(file="c:/R/data/sotu2012.txt", what="character") sotu <- tolower(sotu) corp <-Corpus(VectorSource(paste(sotu, collapse=" "))) corp <- tm_map(corp, removePunctuation) corp <- tm_map(corp, stemDocument) corp <- tm_map(corp,
2007 Oct 01
3
How to beat Google aka Xapian & Natural Language Processing.
Xapians! If tomorrow Xapian search engine would achieved the same performance and result in searches as Google we would not be able to beat Google, because we would create only a copy of the searches that already exists from Google search engine. However there is a way to beat anyone, and there is a way to beat Google successfully as well just do not give up. Some see it as implementing Ajax, or
2009 Aug 04
2
problem with pattern matching
dear all, I got a problem with pattern matching using grep. I extracted a list of characters from a data frame, and I tried to match this list of characters to a column from another data frame. In return, I got only one match, but there should be far more matches. Any ideas what has gone wrong? Another question, if I also want to match the whole of the elements against the non-initial parts of
2012 Jun 05
1
Trouble with Functions
Hi guys, I'm a new to R and following along with Tutorials using this book: http://www.amazon.com/Practical-Statistical-Analysis-Non-structured-Applications/dp/012386979X In one of them, they use the twitteR package and describe the following function (see below). From what I can tell from the documentation (R), there's a method to call it directly in an interactive session. The way