Displaying 20 results from an estimated 20000 matches similar to: "Trimming in R"
2007 Aug 06
4
Function for trim blanks from a string(s)?
I feel like an idiot posting this because every language I've ever seen has a
string function that trims blanks off strings (off the front or back or
both). Ideally, it would process whole data frames/matrices etc but I don't
even see one that processes a single string. But I've searched and I don't
even see that. There's a strtrim function but it does something completely
2002 May 09
2
Trim function ?
Hi
I've imported some data from a oracle database and the strings have a
lot of blank space (because of the delimiter). I want to remove these
blanks space with something similar to a trim function.
I don't find a trim function or something similar. Can someone give a
help on this ?
Thanks
EJ
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help
2005 Sep 18
1
trimmed mean in R seems to round the trimming fraction
subject: trimmed mean in R seems to round the trimming fraction
to r-help at stat.math.ethz.ch.
Consider the following example of 10 numbers. 10% trimmed mean is correct
but you can see that the result is the same for many trimming fractions
till 0.20!
For example 13% trimmed mean should use interpolation of second and
eighth ordered observation. R does not seem to do this.
The correct 13%
2006 Jun 14
1
trailing spaces in code block
It seems that Markdown 1.0.1 strips off trailing spaces at the end of
code blocks. Is this really what it's supposed to do? There might be
reasons to include trailing spaces in code displayed on a web page --
for example, in demonstrating how to do a hard line break in markdown.
Even if the trailing spaces aren't visible, they can be cut and
pasted. Besides, Markdown 1.0.1 preserves
2007 Mar 09
5
Recorded file processing app wanted
Does anybody have (or know of) a command line application that would:
) Eliminate pops and other random loud noises.
) Trim leading and trailing silence.
) Trim pauses exceeding x milliseconds to y milliseconds.
) Normalize what's left.
I know about normalize and have figured out how to trim leading and
trailing silence in sox, but I'm looking for more :)
Thanks in advance,
2005 Feb 12
1
Trimming Parallel Vectors.
Good Day All !
I have a 2-D vector of mode numeric and a parallel 1-D vector of mode numeric.
Here are my values.
2-D vector 1-D vector
80 75 85 80 80
70 80 90 80 80
60 70 80 70 70
85 75 95 85 85
70 60 90 60 70
My 1-D vector is the average across the rows of my 2-D vector.
I process each column of the 2-D vector in a loop.
When I trim my 2-D vector column
2012 Aug 03
2
Recursive function calls
My apologies, I know that this is not a new problem, but I'm not sure how
to find the answer
I want to recursively loop over an object and trim trailing white space.
When I use this function on a list of data.frame I get output like this:
[1] "c(\" many spaces \", \" many spaces \")" "c(\" many spaces
\", \" many spaces
2007 Mar 14
1
Trimming a Data Set
Hi,
I am trying to restrict a data set so as not to included outliers. Specifically, I would like to specify a percentage where a fraction of observations are eliminated from the data set, much in the same way that the trimmed mean function works - but leaving the restricted data set intact.
I have been using a function which will restrict the data set using:
> trim=function(x,p){
>
2007 Aug 16
1
Trim trailng space from data.frame factor variables
Hi folks,
I would like to trim the trailing spaces in my factor variables using lapply
(described in this post by Marc Schwartz:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22826.html) but the code is
not functioning (in this example there is only one factor with trailing
spaces):
y1 <- rnorm(20) + 6.8
y2 <- rnorm(20) + (1:20*1.7 + 1)
y3 <- rnorm(20) + (1:20*6.7 + 3.7)
y <-
2009 Feb 20
3
[LLVMdev] svn pre-commit hook: help needed
On a related note, I wrote a few scripts to detect and correct some types of
such style errors, see llvm/utils/lint/* .
I also added a function to llvm/utils/vim/vimrc to delete trailing
whitespace and highlight existing trailing whitespace -- if anyone's an
Emacs-lisp hacker, please add it to the emacs config file as well.
Sure, this doesn't enforce anything, but I'm hoping folks
2010 May 13
1
ggplot2: qplot won't work
I have a script running in the StatET Eclipse environment that
executes the ggplot2 command qplot in a function:
# Creates the plot
createPlot <- function(){
print("Lets plot!")
qplot(1:10, letters[1:10])
}
When executing the qplot line directly, it works. When executing the
script it does not open a window and it it does not plot. Is there
something important I have forgotten? I
2006 Jan 23
3
date.to_s trimming
When I convert a datetime to a string, it prints out something like this
Jan 20 12:00:00 EST 2006
I want to trim off the last twelve characters, i.e.
:00 EST 2006
I tried to do it like so:
@date =
@meeting.date.to_s.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp
but the chomps seem to do nothing. I''d love to use regex, but I don''t
know which
2020 Jan 23
1
Re: [common PATCH] Trim whitespaces from commands read from file
On Thu, Jan 23, 2020 at 10:32:17PM +0100, Martin Kletzander wrote:
>On Thu, Jan 23, 2020 at 03:16:47PM +0000, Richard W.M. Jones wrote:
>>On Thu, Jan 23, 2020 at 02:04:53PM +0100, Martin Kletzander wrote:
>>> On Thu, Jan 23, 2020 at 12:16:50PM +0100, Martin Kletzander wrote:
>>> >Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>>>
>>> I
2003 Aug 25
6
Syncronize Monitored Calls
I thought I would post this in case it might be of any use to anyone.
Not anything special but it does work. Keep in mind you need sox and
wmix.
Here is some relevant exerpts of my extensions.conf using John Todds
macro.
[globals]
CALLFILENAME=foo
FOO=foo
CALLERIDNUM=foo
[default]
exten => 287,1,Macro(dial,SIP/agent20002|20)
exten => 287,2,Voicemail(u287)
exten =>
2013 May 09
2
opus file trimming/clipping
Hello,
I am new to opus and C, so please forgive my basic question. I am trying to
trim a file to remove an extract at a specified starting and ending time --
an example would be to save an excerpt from a song as a ringtone. What is
the best way to accomplish this?
I have been trying to use op_pcm_seek, and the documentation for
op_pcm_seek says "Seek to the specified PCM offset, such that
2009 Feb 17
5
[LLVMdev] svn pre-commit hook: help needed
Anyone out there interested in helping out with a subversion pre-commit hook
to:
- remove trailing whitespace,
- expand tabs to spaces,
- detect 80-col violations,
as well as detect other style guideline breakage?
I just ran into the trailing whitespace problem: Eclipse and other editors
like to trim excess whitespace from source. However, when one commits a
patch with trailing whitespace
2020 Jan 23
6
Re: [common PATCH] Trim whitespaces from commands read from file
On Thu, Jan 23, 2020 at 02:04:53PM +0100, Martin Kletzander wrote:
> On Thu, Jan 23, 2020 at 12:16:50PM +0100, Martin Kletzander wrote:
> >Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
>
> I forgot to mention this is trying to fix the following BZ:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1351000
> >---
> >mlcustomize/customize_cmdline.ml |
2009 Mar 18
2
Profiling question: string formatting extremely slow
Hi all,
I'm using R to find duplicates in a set of 6 files containing Part Number
information. Before applying the intersect method to identify the duplicates
I need to normalize the P/Ns. Converting the P/N to uppercase if
alphanumerical and applying an 18 char long zero padding if numerical.
When I apply the pn_formatting function (see code below) to "Part Number"
column of the
2006 Sep 14
4
WAIT FOR DIGIT not working
Hello all,
I have been trying to solve this problem for days, with no luck.
When I run an AGI script from my extensions.conf, it seems no matter what I do, the "WAIT FOR DIGIT" command will not work. The system just flies past it without waiting a single millisecond, and of course my script crashes because it doesn't have the input it needs. I have run 3 different versions of
2007 Oct 25
1
meaning of "trim" in mean()
(I see this in both R-patched r43124 and R-devel r43233.)
In the Argument section of ?mean:
trim the fraction (0 to 0.5) of observations to be trimmed from each
end of x before the mean is computed. Values outside that range are
taken as the nearest endpoint.
Then in the Value section:
If trim is non-zero, a symmetrically trimmed mean is computed with a
fraction of trim observations