similar to: Function for trim blanks from a string(s)?

Displaying 20 results from an estimated 400 matches similar to: "Function for trim blanks from a string(s)?"

2010 Jun 03
3
reformat time from hhmm
Hi, I'm newish to R, a recent convert from Matlab... So far I'm impressed, and determined to solve the following problem, which seems like it should be easy: I have a long (millions of points) data series recorded with a datalogger that produced a timestamp in 4 columns: Year, Day of Year, Time in (H)HMM and Seconds. I would like to have R interpret these columns as a time object and have
2006 Oct 20
1
How to evaluate a Variable Name?
Hi, I have a dataframe Wash2005, which has daily weather data. I am doing a regression by month as follows: # FM10 Regression by Month # Plot 12 Month of OFM10, FFM10 for(i in 1:12) { Temp <- subset (Wash2005, MM == i) assign( paste('Wash2005FM10', strtrim(month.name[i],3), sep=""),lm(Temp$FM10.1 ~ Temp$FM10)) } Wash2005FM10Jan, Wash2005FM10Feb, etc holds the
2011 Nov 17
2
how to read a freetext line ?
hi everyone . Here I have a text where there are some integer and string variables.But I can not read them by readLines and scan the text is : weight ;30;130 food:2;1;12 color:white;black the first column is the names of the variables and others are the value of them. the column in different line are different. Can anyone help me ? -- TANG Jie Email: totangjie@gmail.com Tel: 0086-2154896104
2011 Nov 17
1
how to read a free text file into individual variables
hi ,I am writing a soft package based on R. But when I try to read a configure file showed as below. How can I read the parameter in this text file. How can I read the parameter into each variable in this file ? configinfo<-scan(file(configfile),ok=TRUE,n=-1) scan seems need every line have same column ? configinfo <- readLines(configfile,ok=TRUE,n=-1) methodnum <-
2003 Jul 28
2
aregImpute: warning message re: acepack and mace
hi, i'm trying to learn how to use aregImpute by doing the examples provided with the package, and after installing Hmisc.1.6-1.zip (for Windows), and running the very first example on R 1.7.1, i get an error message warning me about "mace" (see below) and acepack. i found the acepack package, but its filename ends in tar.gz and i'm finding it difficult to open (because its
2004 May 17
1
drawing half-circles
Dear wonderful R community, I've been creating color-coded concentric circles using the "points" function, but I just realized that what I would really like to do is draw color-coded concentric half-circles. (Because I want to communicate information about the diameters-- half-circles are sufficient to show diameters AND they leave ample room to one side of the figure to label
2006 Jul 21
2
seeking robust test for equality of variances w/ observation weights
Hello R community, I am looking for a robust test for equality of variances that can take observation weights. I realize I can do the F-test with weighted variances, but I've read that this test is not very robust. So I thought about maybe adding a "weights" argument to John Fox's code for the Levene Test (in the "car" library, "levene.test"), substituting
2010 Apr 14
2
search and replace
I have a dataframe with almost a million rows which has one column with strings. That column has several entries with the words "South", "North", "East" and "West" which I would like to replace with S, N, E, and W, respectively. Obviously, I can use gsub multiple times df $col2 <- gsub("West", "W", df$col2) which will require
2003 Jul 27
1
contourplot:how to get it to label all contours like 'contour'
Hi, one of the nice things about contour is that it labels all contour lines. contourplot only labels each particular elevation a single time. i.e., if there are two contour lines corresponding to z = 45, it will only label one of them. is there a way to get contourplot to automatically label all the contour lines, even those that are repeated? i ask because i want to plot contour plots *w/
2005 Apr 05
1
exclusion rules for propensity score matchng (pattern rec)
Dear R-list, i have 6 different sets of samples. Each sample has about 5000 observations, with each observation comprised of 150 baseline covariates (X), 125 of which are dichotomous. Roughly 20% of the observations in each sample are "treatment" and the rest are "control" units. i am doing propensity score matching, i have already estimated propensity scores(predicted
2004 Nov 20
1
how to suppress whiskers in a bwplot?
dear R-help, i have looked carefully through the R-help archives for information on how to suppress whiskers in a bwplot. someone asked this question a while ago, but the answer he received is not available in the archives. but i did manage to get my hands on a panel function (called "my.panel") that is supposed to do this (the function is reproduced at the end of the email, below).
2006 Sep 20
1
problem coercing truncated character vector to levels
Dear R wizes, I have a data.frame of species abundances with column names consisting of 4 letter codes then an underscore and a number like this: abco_1, abco_2, abco_3, psm_1, psme_2, psme_3, etc. I would like to get an identifier for all the abco, and psme and other species etc. I used spec.fact<-substring(names(spec.count),1,4) To make a vector of the first 4 letters of
2007 Jan 31
5
Quick Question about R
Hello, Is there a way to convert a character to a number with out getting a warning? I have a vector that has both numbers and letters in it and I need to convert it to only numbers. At the moment I'm using as.numeric but it is generating a warning when it converts a letter. Is there another function out there that will do what I need or is there a way to turn off the warnings as I
2004 Jul 26
1
qcc package & syndromic surveillance (multivar CUSUM?)
Dear R Community: I am working on a public health early warning system, and I see that the qcc package allows for CUSUM and other statistical quality tests but I am not sure if my project is a good match for qcc functions as written. Any advice you may have is very much appreciated. I have four years worth of daily counts of emergency room admissions for different conditions (e.g. respiratory,
2006 Jan 27
0
Trimming / Removing leading and following blanks using Windows version
Code: write.table(MU.Cost,paste("C:/RAU/R",as.character(MU.Cost$Run.Id[1]),"." ,as.character(MU.Cost$MU.Id[1]),".MU.PRICE.OUTPUT.txt",sep=""),append = FALSE,quote = FALSE,sep = ",",row.names=FALSE) Output: Run.Id,MU.Id,Class,Av,lower,upper,Count.WO,Count.Seq,Total.WO.Value,Note s 32,158, 1, 0.00, 0.00, 0.00, 0, 0, 0.0,notes 32,158,
2023 Jun 14
1
[Bug 3579] New: OpenSSH trims last character of fixed-lenght buffers received from the pkcs11 providers providing users with inaccurate information
https://bugzilla.mindrot.org/show_bug.cgi?id=3579 Bug ID: 3579 Summary: OpenSSH trims last character of fixed-lenght buffers received from the pkcs11 providers providing users with inaccurate information Product: Portable OpenSSH Version: 9.3p1 Hardware: Other OS: Linux
2018 Apr 04
0
[Bug 13364] rsyncd clips trims relative symlinks outside of source tree
https://bugzilla.samba.org/show_bug.cgi?id=13364 --- Comment #3 from Chris Severance <samba.severach at spamgourmet.com> --- >enable munge-symlinks. That way the client will get back the same out-of-tree symlink as it started with This is a lousy option for backups. The only way to get my original links back is to pull the restore through rsync. Restoring directly from the rsyncd server
2014 Jan 03
1
Sweave trims console output in "tex" mode
Hi In the example .Rnw file below, only the newline between c and d is visible in the resulting .tex file after running R CMD Sweave. What is the reason for this behavior? Newlines are important in LaTeX and should be preserved. In particular, this behavior leads to incorrect LaTeX code generated when using tikz(console=TRUE) inside a Sweave chunk, as shown in the tikzDevice vignette. A
2006 Nov 22
2
How do I trim messages.tdb??
Hi, I've got a messages.tdb file that's currently 2.5GB in size. Is there a way to trim it down (and preferably keep it trimmed)? Can I simply delete it or zero its length by copying /dev/null to it? I'm need of an answer before I end up with a full file system. Thanks, Rob -- Rob Tanner UNIX Services Manager Linfield College, McMinnville OR
2011 Nov 10
1
TRIM discard testing
Hi I installed a new SSD in my Macbook running Arch Linux (Kernel 3.1). root partition has btrfs with discard and ssd mount parameters. I wanted to test whether the discard option was actually working, so I performed a testing procedure similar to what is described on various websites. The test file was the output of "seq 100000 999999" which is about 6MB in size. Instead of looking up