similar to: suggestion/request: install.packages and unnecessary file modifications

Displaying 20 results from an estimated 700 matches similar to: "suggestion/request: install.packages and unnecessary file modifications"

2003 Mar 26
2
predict (PR#2685)
There is a bug in `predict' whereby the order of variables sometimes gets re-arranged compared to the original fit, and then disaster results. Specifically, the 'variables' and 'predvars' attributes of a 'terms' object get out of synch. This only happens when the terms in the original formula get re-ordered during fitting: test> scrunge.data_ data.frame(
2006 Jan 27
4
regular expressions, sub
Hi, I am trying to use sub, regexpr on expressions like log(D) ~ log(N)+I(log(N)^2)+log(t) being a model specification. The aim is to produce: "ln D ~ ln N + ln^2 N + ln t" The variable names N, t may change, the number of terms too. I succeded only partially, help on regular expressions is hard to understand for me, examples on my case are rare. The help page on R-help
2014 Oct 19
1
Writing UTF8 on Windows
Recent functionality in jsonlite allows for streaming json to a user supplied connection object, such as a file, pipe or socket. RFC7159 prescribes json must be encoded as unicode; ISO-8859 (including latin1) is invalid. Hence I would like R to write strings as utf8, irrespective of the type of connection, platform or locale. Implementing this turns out to be unsurprisingly difficult on windows.
2017 Jun 08
0
regular expression help
Zitat von Ashim Kapoor <ashimkapoor at gmail.com>: > Dear All, > > My query is: > > Do we always need to use perl = TRUE option when doing ignore.case=TRUE? > > A small example : > > my_text = > "RECOVERY OFFICER-II\nDEBTS RECOVERY TRIBUNAL-III\n RC No. 162/2015\nSBI > VS RAMESH GUPTA.\n Dated: 01.03.2016 Item no.01\n > Present:
2016 Sep 21
2
error handling in strcapture
Michael, thanks for looking at my first issue with utils::strcapture. Another issue is how it deals with lines that don't match the pattern. Currently it gives an error > strcapture("(.+) (.+)", c("One 1", "noSpaceInLine", "Three 3"), proto=list(Name="", Number=0)) Error in strcapture("(.+) (.+)", c("One 1",
2017 Jun 08
2
regular expression help
Dear All, My query is: Do we always need to use perl = TRUE option when doing ignore.case=TRUE? A small example : my_text = "RECOVERY OFFICER-II\nDEBTS RECOVERY TRIBUNAL-III\n RC No. 162/2015\nSBI VS RAMESH GUPTA.\n Dated: 01.03.2016 Item no.01\n Present: Ms. Sonakshi, the proxy counsel for Ms. Usha Singh, the counsel for ARCIL.\n None for the CDs.\n
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
2019 Aug 15
4
Feature request: non-dropping regmatches/strextract
A very common use case for regmatches is to extract regex matches into a new column in a data.frame (or data.table, etc.) or otherwise use the extracted strings alongside the input. However, the default behavior is to drop empty matches, which results in mismatches in column length if reassignment is done without subsetting. For consistency with other R functions and compatibility with this use
2016 Sep 21
2
error handling in strcapture
If there are any matches then strcapture can see if the pattern has the same number of capture expressions as the prototype has columns and give an error if not. That seems appropriate. If there are no matches, then there is no easy way to see if the prototype is compatible with the pattern, so should strcapture just assume the best and fill in the prototype with NA's? Should there be
2018 Feb 17
2
readLines interaction with gsub different in R-dev
| Confirmed for R-devel (current) on Ubuntu 17.10. But ... isn't the regexp | you use wrong, ie isn't R-devel giving the correct answer? No, I don't think R-devel is correct (or at least consistent with the documentation). My interpretation of gsub("(\\w)", "\\U\\1", entry, perl = TRUE) is "Take every word character and replace it with itself, converted to
2018 Feb 17
1
writeLines argument useBytes = TRUE still making conversions
Of course, right after writing this e-mail I tested on my Windows machine and did not see what I expected: > charToRaw(before) [1] c3 a9 > charToRaw(after) [1] e9 so obviously I'm misunderstanding something as well. Best, Kevin On Sat, Feb 17, 2018 at 2:19 PM, Kevin Ushey <kevinushey at gmail.com> wrote: > From my understanding, translation is implied in this line of ?file
2017 Sep 12
3
Load R data files
Dear All: I am trying to load an R data set, but I got the following message. Please see below. The file is there. setwd("F:/Fall_2017/5-STA574/2-Notes/1-R/1-R_new/chapter4-Entering_Data") datahs0csv <- read.table("hs0.csv", header=T, sep=",") attach(datahs0csv) detach(datahs0csv) rm(list=ls()) Then I tried to reload the data, but I got this error message. I
2003 Mar 26
5
predict (PR#2686)
# r-bugs@r-project.org `predict' complains about new factor levels, even if the "new" levels are merely levels in the original that didn't occur in the original fit and were sensibly dropped, and that don't occur in the prediction data either. (At least if `drop.unused.levels' was set to TRUE, which the default.) test> scrunge.data.2_ data.frame( y=runif( 3),
2018 Feb 15
2
writeLines argument useBytes = TRUE still making conversions
On Thu, Feb 15, 2018 at 11:19 AM, Kevin Ushey <kevinushey at gmail.com> wrote: > I suspect your UTF-8 string is being stripped of its encoding before > write, and so assumed to be in the system native encoding, and then > re-encoded as UTF-8 when written to the file. You can see something > similar with: > > > tmp <- '?' > > tmp <- iconv(tmp,
2017 Apr 04
2
Bug report: POSIX regular expression doesn't match for somewhat higher values of upper bound
Dear Sirs, while > regexpr('(.{1,2})\\1', 'foo') [1] 2 attr(,"match.length") [1] 2 attr(,"useBytes") [1] TRUE yields the correct match, an incremented upper bound in > regexpr('(.{1,3})\\1', 'foo') [1] -1 attr(,"match.length") [1] -1 attr(,"useBytes") [1] TRUE incorrectly yields no match. R versions tested: 2.11.1
2007 Dec 17
1
fortune warning
fortune("help") ## or any quoted string gives a warning Warning message: In grep(which, fort, useBytes = TRUE) : argument 'useBytes = TRUE' will be ignored in version.string R version 2.6.1 (2007-11-26)
2009 Sep 26
1
Problem with downloading workspace file from a web address
Dear All, To load a previously saved workspace, one can do the following: load("/path/to/the/saved/workspace/file") However, if the path to the saved workspace file is a web address, one gets the following error: ?Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file
2016 Oct 04
2
error handling in strcapture
I noticed a problem in the strcapture from R-devel (2016-09-27 r71386), when the text contains a missing value and perl=TRUE. { # NA in text input should map to row of NA's in output, without warning r9p <- strcapture(perl = TRUE, "(.).* ([[:digit:]]+)", c("One 1", NA, "Fifty 50"), data.frame(Initial=factor(), Number=numeric())) e9p <-
2018 Feb 17
2
readLines interaction with gsub different in R-dev
I was told to re-raise this issue with R-dev: In the documentation of R-dev and R-3.4.3, under ?gsub > replacement > ... For perl = TRUE only, it can also contain "\U" or "\L" to convert the rest of the replacement to upper or lower case and "\E" to end case conversion. However, the following code runs differently: tempf <- tempfile()
2011 Sep 29
3
grep and PCRE fun
Hello, I think I've found a bug in the C function do_grep located in src/main/grep.c. It seems to affect both the latest revisions of R-2-13-branch and trunk when compiling R without optimizations and with it's own version of pcre located in src/extra, at least on ubuntu 10.04. According to the pcre_exec API (I presume the later versions), the ovecsize argument must be a multiple of 3 ,