Displaying 20 results from an estimated 40 matches for "punct".
Did you mean:
punch
2009 Aug 13
3
Finding minimum of time subset
...inimum time for each quarter hour.
For example:
mytime<-c("12:00:00","12:00:05","12:15:05","12:15:06","12:20:00","12:30:01","12:45:01","13:00:00","13:15:02")
subtime<-grep(pattern="[[:digit:]]+[[:punct:]]00[[:punct:]][[:digit:]]+|[[:digit:]]+[[:punct:]]15[[:punct:]][[:digit:]]+|[[:digit:]]+[[:punct:]]30[[:punct:]][[:digit:]]+|[[:digit:]]+[[:punct:]]45[[:punct:]][[:digit:]]+",mytime)
mytime[subtime]
[1] "12:00:00" "12:00:05" "12:15:05" "12:15:06" "...
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&...
2011 Aug 23
1
Implementing a "plugin" paradigm with R methods
...t;))
setGeneric(name="plugin", signature=c("src", "link", "plugin"),
function(src, link, plugin, ...) standardGeneric("plugin")
)
setMethod(f="plugin", signature=signature(src="character", link="foo",
plugin="punct"),
function(src, link, plugin, ...){
out <- gsub("[[:punct:]]", "", src)
return(out)
}
)
setMethod(f="plugin", signature=signature(src="character", link="foo",
plugin="digit"),
function(src, link,...
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
--
********************************...
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" "08" "2008" "2...
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
2009 Aug 06
2
Re move all punctuations except commas
Dear all,
I wanted to remove all punctuations except commas from a string.
I used:
gsub("[[:punct:]]", "", string)
but I don't know how to exclude the commas ",". Anyone would kindly answer
my basic question?
--
View this message in context: http://www.nabble.com/Remove-all-punctuations-except-comma...
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
2009 Nov 12
1
How can this code be improved?
...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 1:length(tokens[[i.d]])) {
t <- tolower(tokens[[i.d]][[i.s]])
t <- sub("^[[:punct:]]*", "", t)
t <- sub("[[:punct:]]*$", "", t)
t <- as.data.frame(table(t))
i.m <- match(t$t, stopwords)
i.m.is.na <- is.na(i.m)
i.ss <- i.ss + 1
freq.stopwords[i.ss] <- sum(t$Freq * !i.m.is.na)
freq.nonstopwords[i.ss] <- sum(t$Fr...
2015 Nov 24
2
transformar número en R
...que he intentado es lo siguiente:
> a<-"17.691.700" # valor que obtengo de la web
> sub(".","",a)
[1] "7.691.700"
> replace(a,".",",")
.
"17.691.700" ","
> sub("([[:punct:]])","",a)
[1] "17691.700"
Con el ultimo intento consigo eliminar el primer ".", pero no el
último. ¿Me podeis decir una forma de eliminar los "." o de convertir
un numérico en este formato a uno que entienda R?
Muchas gracias.
Un saludo.
2003 Apr 29
5
[Bug 550] Problems with .Ql in mdoc
...: 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 debian.org
Punctuation characters need to be escaped in the argument to .Ql, or you end up
with the output containing things like ''! rather than '!'. Xavier Renaut
reported this in http://bugs.debian.org/191131.
I'll attach a patch in a moment.
------- You are receiving this mail because: -...
2016 Sep 09
2
Borrar carácteres extraños /xax
...ma 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 = gsub("@\\w+", "", x)
# remove punctuation
x = gsub("[[:punct:]]", "", x)
# remove numbers
x = gsub("[[:digit:]]", "", x)
# remove links http
x = gsub("http\\w+", "", x)
# remove tabs
x = gsub("[ |\t]{2,}", "", x)
# remove blank spaces at the beginning
x =...
2008 Nov 04
3
regex question
hello,
i am trying to extract text using regex as follows:
"* < <* this is my text > > "
into:
"this is my text"
below what I did:
varReg <- "* < <* this is my text > > "
## either this pattern
patReg <- "(^[ <*]+)"
## or below patten
patReg <- "([ > ]+$)"
sub(patReg, '', varReg)
depending
2012 Jan 27
2
tm package: handling contractions
...cloud 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, function(x)removeWords(x,stopwords()))
tdm <- TermDocumentMatrix(corp)
m <- as.matrix(tdm)
v <- sort(rowSums(m),decreasing=TRUE)
d <- data.frame(word = names(v),freq=v)
wordcloud(d$word,d$freq)
I ended up with a larg...
2010 Oct 20
1
grep
...esigned to gather data from individual columns
from a file, which is an output from an instrument. the file has multiple
sections and each a section has data under each column (vars), I am using
the name of the column as a variable to gather the column ID using
vidx<-grep(vars[vi],gsub("[[:punct:]]","",strrl1[[datbeg-1]]),ignore.case=T)
the vidx stores the column ID for each 'vars', which in subsequent step is
stored in a temp vector for analysis
strrl1[[datbeg-1]] is the position in the file where the data begins( the
data is given below)
This is working fine when i...
2012 Nov 08
1
twitteR return error message
...=100, it will work.. why?
######################################################
################# Error Message 3
################################
# I came across a tweet which contains very strange characters,
# is there anyway to remove thos uncommon words which is not in the punct
or any known characters.
# sorry not able to give the example here. I can not find it anymore
######################################################
--
View this message in context: http://r.789695.n4.nabble.com/twitteR-return-error-message-tp4648841.html
Sent from the R help mailing list arc...
2013 Apr 18
0
Splitting vector
...sals#geqmtkcpkp/qecgdfa#uag"
library(seqinr)
?res<-lapply(0:4,function(i) lapply(2:5,function(j) splitseq(s2c(gsub("[#@/]","",vec1)),word=j,frame=i)))
#or
library(stringr)
res1<-lapply(0:4,function(i) lapply(2:5,function(j) splitseq(s2c(str_replace_all(vec1,"[[:punct:]]","")),word=j,frame=i)))
#or
res2<-lapply(0:4,function(i) lapply(2:5,function(j) splitseq(s2c(gsub("[^[:alnum:]]","",vec1)),word=j,frame=i)))
identical(res,res1)
#[1] TRUE
?identical(res,res2)
#[1] TRUE
res[[1]][[1]]
# [1] "mu" "ed" "...
2013 Apr 03
0
puppetlabs-firewall bug (Issue 144)
...ent --comment "000b allow established or related sessions" -j ACCEPT
Then from "puppet resource firewall"
Error: Could not run: Parameter name failed on Firewall[RELATED,ESTABLISHED]: Invalid value "RELATED,ESTABLISHED". Valid values match /^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/.
Tried reversing the order for my input, but iptables-save puts it in that order.
puppetlabs-firewall (v0.2.1)
puppet 3.1.1
RHEL 5, 64 bit
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”...
2013 Jun 28
0
quitar tildes
Te sirve esto ?:
chartr('áéíóúñ','aeioun', 'cañón')
El 28/06/2013 11:40, José Luis Cañadas Reche escribió:
> 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
>
> _______________________________________________
> R-help-es mailing list
> R-help-es en r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>
--
+-------------------------...
2015 May 07
2
Problems installing packages with R 3.2.0 on Linux Mint 17.1
...error:
?_ISprint? was not declared in this scope
static const mask print = _ISprint;
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/ctype_base.h:56:32: error:
?_ISalpha? was not declared in this scope
static const mask graph = _ISalpha | _ISdigit | _ISpunct;
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/ctype_base.h:56:43: error:
?_ISdigit? was not declared in this scope
static const mask graph = _ISalpha | _ISdigit | _ISpunct;
^
/usr/include/x86_64-linux-gnu/c++/4.8/b...