similar to: removing leading/trailing blanks

Displaying 20 results from an estimated 3000 matches similar to: "removing leading/trailing blanks"

2006 May 02
9
Updating only one field
At present, I use an update like this to set the user''s last login time: authenticated_user.update_attribute(:last_login, Time.now) However, this calls the following, updating all fields: UPDATE users SET `last_login` = ''2006-05-02 13:27:41'', `hashed_password` = .... Is there any way I can tell ActionRecord to only update the one field? I don''t really want
2004 Jun 25
3
alternate rank method
Hi, I'm wondering if anyone can point me to a function that will allow me to do a ranking that treats ties differently than rank() provides for? I'd like a method that will assign to the elements of each tie group the largest rank. An example: For the vector 'v', I'd like the method to return 'rv' v: 1 2 3 3 3 4 5 5 6 7 rv: 1 2 5 5 5 6 8 8 9 10 Thanks,
2005 Oct 20
3
numerical issues in chisq.test(simulate=TRUE) (PR#8224)
Hi, This report deals with p-values coming from chisq.test using the simulate.p=TRUE option. The issue is numerical accuracy and was brought up in previous bug reports 3486 and 3896. The bug was considered fixed but apparently was only mostly fixed. Just the typical problem of two values that are mathematically equal not ending up numerically equivalent. Consider this series of three 2x2
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,
2009 Jan 21
3
filling blanks with NA
Hi, I do have a data set with some missing values that appear as blanks. I want to fill these blanks with an NA. How can this be done? Thanks for your help -- View this message in context: http://www.nabble.com/filling-blanks-with-NA-tp21584278p21584278.html Sent from the R help mailing list archive at Nabble.com.
2006 Oct 27
3
Suppress blanks/spaces in character
Hi all I'm have a character vector and would like to suppress the blanks if there are more than one after the other. Example: Character value is: "abc def ghi" The result should be: "abc def ghi" I know that it's possible to delete the leading blanks with the command "trim". But how can I delete blanks within a character? Thank you very much in
2007 Nov 28
2
how to read in a txt file with some blanks
Hi list, Is there a way to read in a txt file with some blanks? The ideal way could be to replace blanks with NAs. Thanks a lot! Allen [[alternative HTML version deleted]]
2003 Sep 14
1
Documentation of colSums et. al (PR#4154)
Full_Name: Doug Grove Version: 1.7.0 OS: Linux Submission from: (NULL) (209.31.211.56) Hi, Minor mistake in the documentation on the colSums page. In the ARGUMENTS section it states for 'dims' that: For `col*', the sum or mean is over dimensions `dims+1, ...'; for `row*' it is over dimensions `1:dims'. These two are reversed. Thanks, Doug Grove
2004 Oct 21
3
documentation for rank() (PR#7298)
Full_Name: Doug Grove Version: R.1.9.1 OS: Linux Submission from: (NULL) (140.107.156.61) I just found that rank() has a 'decreasing' argument that is not documented in its help page. I checked my version of 2.0.0 (original release hence unpatched) and it is not documented there. For curiousity I also went back to version 1.8.1 and checked the function (not the documentation)and at
2011 Oct 24
2
splitting a string into words preserving blanks (using regex)
I would like to split a string into words at its blanks but also to preserve all blanks. Example: c(" some words to split ") should become c(" ", "some", " ", " words", " ", "to" , " ", "split", " ") I was not able to achieve this via strsplit() . But I am not familiar with regular
2001 May 10
2
Scanning data lines with blanks in character vars
Hello, I'm trying to read data in from a file using scan(). The last field is a character string that contains blanks. I had read it in in S-Plus using this code: ifile <- list(entry=0,measure=0,st=0,count=0,score=0, error=0,inmsq=0,instd=0,outms=0,outstd=0,displc=0,ptbis=0,a=0, r="",name="") if.widths <- c(1, 5, 8, 3, 6, 7, 7, 7, 7, 7, 7, 7, 7, 2,
2005 Aug 06
1
oldClass vs. class
Hi,When I read the source of str,i find these code ----- ## Show further classes // Assume that they do NOT have an own Method -- ## not quite perfect ! (.Class = 'remaining classes', starting with current) cl <- oldClass(object); cl <- cl[cl != "data.frame"] #- not THIS class ----- so I use ?oldClass to try to learn more about oldClass.But after I have reading
2003 Dec 06
7
Windows Memory Issues
Hi all, I am currently building an application based on R 1.7.1 (+ compiled C/C++ code + MySql + VB). I am building this application to work on 2 different platforms (Windows XP Professional (500mb memory) and Windows NT 4.0 with service pack 6 (1gb memory)). This is a very memory intensive application performing sophisticated operations on "large" matrices (typically 5000x1500
2005 Sep 08
1
Wishlist: write.delim()
Hi, It would be great if someone would add write.delim() as an adjunct to write.table(), just as with write.csv(). I store a lot of data in tab-delimited files and can read it in easily with: read.delim("text.txt", as.is=TRUE) and would love to be able to write it out as easily when I create these files. The obvious setting needed for write.delim() is sep = "\t", but in
2006 Jul 18
1
documentation for argument to screen (PR#9085)
Full_Name: Doug Grove Version: 2.3.1 patched (2006-07-03 r38485) OS: Windows Submission from: (NULL) (24.19.37.159) A msg. to R-help prompted me to read the help page for split.screen/screen, etc. I understand what the function is for, but could not find information that described how the argument 'n' in screen/erase.screen/close.screen is mapped to the regions on the device. All we
2009 Dec 04
1
error in help.search (PR#14113)
Full_Name: Doug Grove Version: 2.10.0 10-26-2009 OS: x86_64-unknown-linux-gnu Submission from: (NULL) (140.107.164.65) Hi, Looks like the revisions to help.search didn't get completely finished. When the user specifies the argument 'package' the code doesn't define the variable 'paths' prior to trying to use it, which obviously produces an error. The code dies when
2012 Aug 22
1
loading both RPostgreSQL and RSQLite leads to problems
hello, if i load the RSQLite package in addition to the RPostgreSQL package, i get various errors when trying to use RPostgreSQL functions. here is an example transcript showing one such error: ========================================================== R version 2.15.0 (2012-03-30) [...] > packageVersion('RPostgreSQL') [1] 0.3.2 > packageVersion('RSQLite') [1] 0.11.1
2008 Nov 12
1
read.table with many blanks (reposting)
Thanks Jim for pointing out how to properly ask. Here is is my question and a small subset of the data and output. I have a data set with many blanks. The blanks should be replaced with zero once imported. I tried read.table, read.csv (R 2.8 version),or scan, but none was successful. Any suggestion, please.. thanks. Keun-Hyung >garoben=read.table("c:\\Rdata\\garoben.txt",header=T,
2017 Nov 29
2
binary form of is() contradicts its unary form
Hi, The unary forms of is() and extends() report that data.frame extends list, oldClass, and vector: > is(data.frame()) [1] "data.frame" "list" "oldClass" "vector" > extends("data.frame") [1] "data.frame" "list" "oldClass" "vector" However, the binary form of is()
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