Displaying 20 results from an estimated 24 matches for "str_trim".
2013 Apr 13
2
Comparison of Date format
...6-Feb-04 ??? ??? ??? ??? ???
2,A,9-Feb-01,24-May-01 ??? ???
2,B,24-May-01,25-May-01 ??? ??? ??? ??? ???
2,A,25-May-01,16-Mar-02 ??? ??? ??? ??? ???
2,A,6-Mar-02,18-Mar-02
2,A,14-Sep-01,6-Mar-02 ??? ???
",sep=",",header=TRUE,stringsAsFactors=FALSE)
library(stringr)
DataA[,3]<- str_trim(DataA[,3])
DataA[,4]<- str_trim(DataA[,4])
DataB<- read.table(text="
ID ??? Date.Accident ??? ???
1?????? 3-Sep-01?
1 ??? 20-Jan-05
1?????? 26-Feb-04??? ???
2 ??? 6-Mar-02
",sep="",header=TRUE,stringsAsFactors=FALSE)
?
lst1<-lapply(seq_len(nrow(DataB)),function(i)...
2012 Jan 13
2
Remove space from string
Dear R users,
I have some trivial query.
I have a string, I want to remove space from the string.
For eg.
Input:
a <- " Remove space "
Output required:
"Removespace"
I tried using str_trim but only removes end spaces. library(stringr).
Regards
Vikram
[[alternative HTML version deleted]]
2013 Jun 10
4
Combining CSV data
Hello R community,
I am trying to combine two CSV files that look like this:
File A
Row_ID_CR, Data1, Data2, Data3
1, aa, bb, cc
2, dd, ee, ff
File B
Row_ID_N, Src_Row_ID, DataN1
1a, 1, This is comment 1
2a, 1, This is comment 2
3a,
2012 Mar 07
2
Remove a word from a character vector value XXXX
Hi everyone,
What is the easiest way to remove the word Average and strip leading
and trailing blanks from the character vector (d5.Region) below?
.nrow.d5. d5.Region
1 1 Central Average
2 2 Coastal Average
3 3 East Average
4 4 Metro East Average
5 5 Metro North Average
6 6 Metro South Average
7
2013 Jan 17
1
importing a SAS syntax-files (value labels)
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130117/8292cb66/attachment.pl>
2013 Jun 28
0
Help with tables
...ulae
#???????????????????????????? 2???????????????????????????? 14
#fdp.percentage_calc_foundation
#??????????????????????????? 30
###3rd question
Subxt1<-xt1["2013-03-01 11:15/2013-03-01 11:28"]
#Based on number of correct responses
vec1<-sort(with(Subxt1,tapply(as.logical(str_trim(correct)),list(pupilId),sum)))
head(vec1,3)
#101 148? 69
#? 0?? 0?? 0
?tail(vec1,3)
# 55 149? 24
#? 2?? 3?? 4
#Based on proportion of correct responses
vec2<-with(Subxt1,tapply(as.logical(str_trim(correct)),list(pupilId),length))
vec2New<- vec2[names(vec1)]
?vec3<-sort(vec1/vec2New)
?...
2017 Dec 06
2
FW: R-devel error
...nt_mode()) { return(if (block) "" else g) } if (block) { n = length(g) if (n >= 2 && grepl(chunk.end, g[n])) g = g[-n] g = strip_block(g, patterns$chunk.code) params.src = if (group_pattern(chunk.begin)) { stringr::str_trim(gsub(chunk.begin, "\\1", g[1])) } else "" parse_block(g[-1], g[1], params.src) } else parse_inline(g, patterns)})
> 7: split_file(lines = text)
> 8: process_file(text, output)
> 9: knitr::knit(knit_input, knit_output, envir = envir...
2017 Dec 05
2
FW: R-devel error
I am resubmitting this bug report but with additional information. I am running this with windows 10: w64-mingw32 with R Under development (unstable) (2017-12-04 r73829). I build 'httk' from the command prompt using 'R CMD build httk' after installing the required packages. Then when the vignettes are being created, it crashes. Today I installed the latest versions of Rtools,
2010 Aug 25
0
stringr: version 0.4
...s.
* new str_sub<- function (analogous to substring<-) for substring replacement
* str_sub now understands negative positions as a position from the end of
the string. -1 replaces Inf as indicator for string end.
* str_pad side argument can be left, right, or both (instead of center)
* str_trim gains side argument to better match str_pad
* stringr now has a namespace and imports plyr (rather than requiring it)
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
_______________________________________________
R-packages ma...
2011 Jul 01
0
stringr 0.5
...t
* new `word` function extract words from a string given user defined
separator (thanks to suggestion by David Cooper)
* `str_locate` now returns consistent type when matching empty string (thanks
to Stavros Macrakis)
* new `str_count` counts number of matches in a string.
* `str_pad` and `str_trim` receive performance tweaks - for large vectors this
should give at least a two order of magnitude speed up
* str_length returns NA for invalid multibyte strings
* fix small bug in internal `recyclable` function
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics /...
2011 Jul 01
0
stringr 0.5
...t
* new `word` function extract words from a string given user defined
separator (thanks to suggestion by David Cooper)
* `str_locate` now returns consistent type when matching empty string (thanks
to Stavros Macrakis)
* new `str_count` counts number of matches in a string.
* `str_pad` and `str_trim` receive performance tweaks - for large vectors this
should give at least a two order of magnitude speed up
* str_length returns NA for invalid multibyte strings
* fix small bug in internal `recyclable` function
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics /...
2010 Aug 25
0
stringr: version 0.4
...s.
* new str_sub<- function (analogous to substring<-) for substring replacement
* str_sub now understands negative positions as a position from the end of
the string. -1 replaces Inf as indicator for string end.
* str_pad side argument can be left, right, or both (instead of center)
* str_trim gains side argument to better match str_pad
* stringr now has a namespace and imports plyr (rather than requiring it)
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
_______________________________________________
R-packages ma...
2012 Mar 09
1
From (common IDs different Names) To (common IDs common Names)
Dear Community
I have a large dataframe x as follows with common ids but different names:
> x <- data.frame(ID = c(1,1,2,2,2,3,3),
+ Name = c("B Branch A Firm ","A Firm","B Firm","B Firm","B Firm C Branch","C Firm","C Firm A Branch")
+ )
> x
ID Name
1 1 B Branch A Firm
2 1 A Firm
3 2
2017 Jan 16
2
Error al fusionar tablas
Holabueno, aunque hay muchas posibilidades para fusionar ambas tablas, usando la tuya sería algo así:Df3<-merge(Df1,Df2,by="Reviewer.Username", all = TRUE)
El Lunes 16 de enero de 2017 20:08, Jesús Para Fernández <j.para.fernandez en hotmail.com> escribió:
Los data.frames para unirlos lo mejor es que tengan el mismo numero de columnas o variables.
El dataframe2
2017 Dec 06
0
FW: R-devel error
...nt_mode()) { return(if (block) "" else g) } if (block) { n = length(g) if (n >= 2 && grepl(chunk.end, g[n])) g = g[-n] g = strip_block(g, patterns$chunk.code) params.src = if (group_pattern(chunk.begin)) { stringr::str_trim(gsub(chunk.begin, "\\1", g[1])) } else "" parse_block(g[-1], g[1], params.src) } else parse_inline(g, patterns)})
7: split_file(lines = text)
8: process_file(text, output)
9: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,...
2017 Dec 06
0
FW: R-devel error
...k) "" else
>> g) } if (block) { n = length(g) if (n >= 2 &&
>> grepl(chunk.end, g[n])) g = g[-n] g = strip_block(g,
>> patterns$chunk.code) params.src = if (group_pattern(chunk.begin)) {
>> stringr::str_trim(gsub(chunk.begin, "\\1", g[1])) }
>> else "" parse_block(g[-1], g[1], params.src) } else
>> parse_inline(g, patterns)})
>> 7: split_file(lines = text)
>> 8: process_file(text, output)
>> 9: knitr::knit(knit_input,...
2013 Apr 27
11
Help
Hello,
I have a question and need your help urgently. I am new to R but want to learn it.
I have several files in a folder which I have imported to R using :
temp = list.files(pattern="*.txt")
>myfiles = lapply(temp, read.delim)
The resulting files are on the workspace stored as List[110]. So they are 110 files in the list. Each file has several different columns and rows.
My
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment
lines before data for each time interval. For each time interval there are
500 data points. I want to change the dataset such that I have the following
format:
t1 t2 t3 ................
0.00208 0.00417 0.00625 .................
a1 a2 a3 ...................
2013 Sep 20
1
Averate memory usage trend
Hi,
I would like to understand how to draw a graph to find out the
average memory used by a single httpd process given these details
collected over a period of
several days. I code R but this is about a method to find an average
memory utilization. I believe I have enough data.
How should I statistically calculate this ?
The figures inside braces are the total httpd processes at
2023 Dec 30
3
Help request: Parsing docx files for key words and appending to a spreadsheet
An update: Running this block of code:
# Load libraries
library(tcltk)
library(tidyverse)
library(officer)
filepath <- setwd(tk_choose.dir())
filename <- "Now they want us to charge our electric cars from litter
bins.docx"
#full_filename <- paste0(filepath, filename)
full_filename <- paste(filepath, filename, sep="/")
if (!file.exists(full_filename)) {
?