similar to: help with "\" in strings

Displaying 20 results from an estimated 1000 matches similar to: "help with "\" in strings"

2017 Dec 29
3
Writing text files out of a dataset
Hello, I am trying to run the following syntax for all cases within the dataframe "data" d1 <- data[1,c("material")] fileConn<-file("TESTI/d1.txt") writeLines(d1, fileConn) close(fileConn) I am trying to use the for function: for (i in 1:nrow(data)){ d[i] <- data[i,c("material")] fileConn<-file("TESTI/d[i].txt")
2017 Dec 29
0
Writing text files out of a dataset
Hello, You have to create the vector 'd' outside the loop before using it. d <- numeric(nrow(data)) Only then comes the loop. Hope this helps, Rui Barradas On 12/29/2017 2:31 PM, Luca Meyer wrote: > Hello, > > I am trying to run the following syntax for all cases within the dataframe > "data" > > d1 <- data[1,c("material")] >
2011 Jul 04
1
writeLines + foreach/doMC
Hi I'm processing sequencing data trying to collapsing the locations of each unique sequence and write the results to a file (as storing that in a table will require 10GB mem at least) so I wrote a function that, given a sequence id, provide the needed line to be stored library(doMC) # load library registerDoMC(12) # assign the Number of CPU
2011 Apr 28
5
fisher exact for > 2x2 table
I'm using fisher.exact on a 4x2 table and it seems to work. Does anyone know exactly what is going on? I thought fisher.exact is only for 2x2 tables. Note: I can't use chi-squared because I have a couple of cells with 0 and < 5 observations. -- View this message in context: http://r.789695.n4.nabble.com/fisher-exact-for-2x2-table-tp3481979p3481979.html Sent from the R help
2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-Lemeshow: p=0.6163585 le Cessie and Houwelingen test (Design library): p=0.2843620
2005 May 19
1
problems with truncate() with files > 2Gb under Windows (possibly (PR#7879)
This message relates to handling files > 2Gb under Windows. (I use 2Gb as shorthand for 2^31-1 -- the largest integer representable in a signed 32 bit integer.) First issue: truncate() is not able to successfully truncate files at a position > 2Gb. This appears to be due to the use of the Windows function chsize() in file_truncate() in main/connections.c (chsize() takes a long int
2007 Aug 27
1
fix for broken largefile seek() on 32-bit linux (PR#9883)
Full_Name: John Brzustowski Version: R-devel-trunk, R-2.4.0 OS: linux Submission from: (NULL) (206.248.132.197) DESCRIPTION seek() on files larger than 2 gigabytes fails for large values of "where" on i386 linux 2.6.13 (and presumably other 32-bit unix-like platforms). e.g.: > f<-file("3gigabytefile.dat", "rb") > seek(f, 3e9, "start",
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with ceph based on btrfs. Current updating device tree requires space from METADATA chunk, so we -may- need to do a recursive chunk allocation when adding/updating dev extent, that is where the deadlock comes from. If we use SYSTEM metadata to update device tree, we can avoid the recursive stuff. Reported-by: Jim Schutt
2005 May 19
0
problems with truncate() with files > 2Gb under Windows (PR#7880)
__USE_LARGEFILE is a standard Unix way to allow > 2Gb files on 32-bit OSes by using f{seek,tell}o Take a look at the definition of f_tell: #if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE) #define f_seek fseeko #define f_tell ftello #else #ifdef Win32 #define f_seek fseeko64 #define f_tell ftello64 #else #define f_seek fseek #define f_tell ftell #endif #endif Windows support for
2012 Jan 06
6
cbind alternate
I have two one dimensional list of elements and want to perform cbind and then write into a file. The number of entries are more than a million in both lists. R is taking a lot of time performing this operation. Is there any alternate way to perform cbind? x = table1[1:1000000,1] y = table2[1:1000000,5] z = cbind(x,y) //hanging the machine write.table(z,'out.txt) -- -------------
2006 Aug 12
4
form problem on deployment. Not sure how to debug this.
I wish I could be more clean in the subject but I honestly don''t know what to point at for the problem. I am trying to deploy a rails app to my external host (dreamhost). It works great in development on my machine but when It gets into production on dreamhost Data seems to be missing when I try and submit the form. Here''s what it looks like when it works... Processing
2008 Dec 15
1
bug in R CMD INSTALL do_install under OS X
Hi, I believe I've encountered a bug in the do_install function in the script used by R CMD INSTALL. I'm using R 2.8.0 under OS X 10.5.5. I was trying to install a package from source (the package gaga which I maintain, which I checked and builds correctly for R 2.8.0) when I get the error message * Installing to library '/Users/drossell/Desktop/R-2.8.0/library'
2012 Mar 15
1
how to assign "writeLines" function
hi, what I want to do is assigning following code to any object. k<-paste("thank") writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)) To assign the "writeLines" code, I try this a<-writeLines(strwrap(k, width = 80,indent = 7,exdent = 6)) or assign(a,writeLines(strwrap(k, width = 80,indent = 7,exdent = 6))) but it doesn't work. is there any way to solve
2016 Feb 23
4
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
>>>>> nospam at altfeld-im de <nospam at altfeld-im.de> >>>>> on Mon, 22 Feb 2016 18:45:59 +0100 writes: > Dear R developers > I think I have found a bug that can be reproduced with two lines of code > and I am very thankful to get your first assessment or feed-back on my > report. > If this is the wrong mailing list or I
2018 Feb 15
2
writeLines argument useBytes = TRUE still making conversions
I think this behavior is inconsistent with the documentation: tmp <- '?' tmp <- iconv(tmp, to = 'UTF-8') print(Encoding(tmp)) print(charToRaw(tmp)) tmpfilepath <- tempfile() writeLines(tmp, con = file(tmpfilepath, encoding = 'UTF-8'), useBytes = TRUE) [1] "UTF-8" [1] c3 a9 Raw text as hex: c3 83 c2 a9 If I switch to useBytes = FALSE, then
2017 Aug 23
4
Possible repeat{} / break function bug in R 3.4.1
It is a bug in the byte-code compiler. I will fix Tomas On 08/23/2017 09:22 AM, Lionel Henry wrote: > I don't think that's a bug. source() uses eval(), and eval() creates a > new function-like context frame. In a way expecting `break` to work > inside source() is like expecting `break` to cross stack frames: > > my_break <- function() break >
2005 May 28
1
(PR#7899) seek(con, 0, "end", rw="r") does not always work
Tony Plate wrote: > ligges@statistik.uni-dortmund.de wrote: > >> tplate@blackmesacapital.com wrote: >> >> >>> I've noticed that seek(con, 0, "end", rw="r") on a file connection >>> does not always work correctly after a write (R 2.1.0 on Windows). >>> >>> [Is a call to fflush() needed inside file_seek() in
2016 Feb 24
2
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
On 23/02/2016 7:06 AM, Mikko Korpela wrote: > On 23.02.2016 11:37, Martin Maechler wrote: >>>>>>> nospam at altfeld-im de <nospam at altfeld-im.de> >>>>>>> on Mon, 22 Feb 2016 18:45:59 +0100 writes: >> >> > Dear R developers >> > I think I have found a bug that can be reproduced with two lines of code
2016 Feb 25
2
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
On 23.02.2016 14:06, Mikko Korpela wrote: > On 23.02.2016 11:37, Martin Maechler wrote: >>>>>>> nospam at altfeld-im de <nospam at altfeld-im.de> >>>>>>> on Mon, 22 Feb 2016 18:45:59 +0100 writes: >> >> > Dear R developers >> > I think I have found a bug that can be reproduced with two lines of code >>
2004 Jul 26
6
directing print.packageInfo to a file
There was a discussion on r-help of getting the output from print.packageInfo into a file. Spencer and I have added a file= argument to print.packageInfo for consideration in R. Had this been available it would have simplified the answer to that thread. If the file= argument is used then the packageInfo information is sent to the file specified rather than displayed using file.show .