similar to: patch to support custom HTTP headers in download.file() and url()

Displaying 20 results from an estimated 400 matches similar to: "patch to support custom HTTP headers in download.file() and url()"

2005 Aug 22
2
RFC: "loop connections"
I've just implemented a generalization of R's text connections, to also support reading/writing raw binary data. There is very little new code to speak of. For input connections, I wrote code to populate the old text connection buffer from a raw vector, and provided a new raw_read() method. For output connections, I wrote a raw_write() to append to a raw vector. On input, the mode
2005 Sep 18
0
Updated rawConnection() patch
Here's an update of my rawConnection() implementation. In addition to providing a raw version of textConnection(), this fixes two existing issues with textConnection(): one is that the current textConnection() implementation carries around unprotected SEXP pointers, the other is a performance problem due to prolific copying of the output buffer as output is accumulated line by line. This new
2010 Nov 02
1
Setting the names of a data.frame
I have tData as below. I need to set the names with the headers from the first row in sHeaders Sorry .. forgot how to set the names from row in another data frame .. pls advise. names(tData) = sHeaders[1,] does not work correctly Also, why doesn't drop.levels(sHeaders) not work? dput(tData) structure(list(V1 = structure(c(3L, 1L, 1L, 2L), .Label = c("P H Ravi Kumar", "Rahul
2006 Oct 09
1
Discussion starter for package level Connection API
Thought I'd try and start a discussion. Feel free to jump in. I guess R needs to strike the right balance between opening up the internals to package writers and not allowing them to do bad things. My first attempt at cracking this nut is to just memcpy() the Rconnection and not allow access to the private stuff: /* Alternative to allowing C code access to connection API. */ Rconnection
2009 Jun 12
0
JRclient.RSrvException Exception: Handshake
Hi all, first of all: Sorry for my bad englis, and now the Question: I have some problems with running R from Java. First i tried using rJava (JRI). But the examples didnt work properly. Now im trying to establish a connection by using Rserve and JRclient (RF503). I have the following code, which i`ve found: ------------------------------------------------------------------------ public
2005 Aug 22
1
Fetching Warning Messages
Hi, I am facing one problem of fetching R warning messages in Java Code using Rserve. It is easier to trap R Error messages by using catching RSrvException. I came to know one way of fetching R Warning messages, i.e. using "withCallingHandlers", below is my Java Program, which uses withCallingHandlers of R : import org.rosuda.JRclient.*;
2007 May 20
0
Problems accessing Rconnect
Hi. I nearly have Rserve working.... I have the dialog box which says.. Rserve: Ok, read to answer queries. Having read all i can find, I followed the guidance given on http://rosuda.org/Rserve/example.shtml I tried to follow the first example but I am getting an error descirbed below. My IDE looks like this: http://www.nabble.com/file/p10705244/ide.jpg However, when I try and compile my
2017 Oct 26
0
How to create a table structure in Java code?
You are entering the quoting hell - you are missing quotes and escapes for \n. it would be much more reasonable to use the rConnection.assign method instead of pasting any content through the parser. Cheers, Simon > On Oct 26, 2017, at 9:59 AM, Morkus via R-devel <r-devel at r-project.org> wrote: > > That's amazing! Thank you!!! > > One follow up question, if
2017 Oct 26
1
How to create a table structure in Java code?
Thanks! I just figured it out (thanks to "Beyond Compare") and was coming here to post back. The boxM test doesn't work with that (now, finally working) REXP structure, but I probably now need to create a table or something and parse that structure. So much fun! :) Thanks again. - M Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email. > --------
2004 Jan 12
1
ReadLines does not give results with urls
Hello, I am using R version 1.8.1 on a linux machine (Suse 8.2.). I have problems to use readLines() with urls. This seems to be a problem with our proxy-server. Downloading files work with download.file() with wget but not without: > download.file(url = "http://cran.r-project.org/src/contrib/PACKAGES", destfile = "test.txt", method = "wget", cacheOK = FALSE)
2007 May 22
1
Segfault?
Hello everyone, I get (reproducible) segfaults when I try to update my packages, and was wondering whether anyone knows why this might be happening. I am trying to update my packages: 1. I start R via sudo in a terminal 2. I type update.packages() - a Tcl/Tk list pops up, I select a mirror 3. R segfaults. Maybe I need to update to a newer version of R or something? Slightly OT, but does anyone
2017 Oct 26
0
How to create a table structure in Java code?
I suspect that you are looking for something like: read.csv(textConnection( "5.1,3.5,1.4,0.2,setosa 4.9,3,1.4,0.2,setosa 4.7,3.2,1.3,0.2,setosa 4.6,3.1,1.5,0.2,setosa 5,3.6,1.4,0.2,setosa" ), header = FALSE) HTH, Jan On 25-10-17 12:50, Morkus via R-devel wrote: > Hi all, > > Using RConsole, it's easy to get data from the database that you can use in an R Command. Like
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Does it work if you supply the closing parenthesis on the call to boxM? The parser says the input is incomplete and a missing closing parenthesis would cause that error.. // create a string command with that variable name.String boxVariable = "boxM(boxMVariable [,-5], boxMVariable[,5]"; // try to execute the command... // FAILS with org.rosuda.REngine.Rserve.RserveException: eval
2017 Oct 25
2
How to create a table structure in Java code?
Hi all, Using RConsole, it's easy to get data from the database that you can use in an R Command. Like this: (Reference case) irisQuery <- dbGetQuery(conn, "select * from iris") boxM(irisQuery [,-5], irisQuery[,5]) ---- (Actual case this posting is about) Yet, if I'm getting that same (sample IRIS) data, say, in a web service possibly POSTED from a SQL command, that same
2006 Jun 15
2
download.file() yields incomplete files with method="internal"
Dear all, as the bug # 7991 is flagged not-reproducible, let me give you some pieces of code, as I have the same or similar problem. The problem always shows up with the first example (a small text file) and only sometimes (but without obvious pattern) with the second example, which is a binary file. > download.file("ftp://ftp.nhc.noaa.gov/pub/atcf/btk/bal012006.dat",
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 6:26 AM, Morkus wrote: > I'm not sure what you mean. Could you please be more specific? You were trying to eval an expression that you constructed in Java. I was suggesting that before you eval it, you print it. > > If I print the string, I get: *boxM(boxMVariable[, -5], boxMVariable[, 5])* Right, that's what I was suggesting you do. Now you've fixed the
2017 Oct 26
3
How to create a table structure in Java code?
That's amazing! Thank you!!! One follow up question, if that's OK? If, instead of using hard-coded CSV, I read the CSV into a variable first, then it fails again with a parse error. Code below. So, if I read the CSV into a variable, do I need an additional wrapper method? Seems like it should still work. Thanks in advance for your reply. -M String inputIris =
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 7:12 AM, Morkus wrote: > Thanks Duncan. Awesome ideas! > > I think we're getting closer! > > I tried what you suggested and got a possibly better error... > . > . > . > rConnection.assign("boxMVariable", myDf); > > *String resultBV *= *"str(boxMVariable)"*; *// your suggestion.* > > *RESULTING ERROR:* > >
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Just print the string you are asking to R to evaluate. It doesn't make any sense as an R expression. Fix that, and things will work. Duncan Murdoch On 27/10/2017 3:41 PM, Morkus via R-devel wrote: > It can't be this hard, right? I really need a shove in the right direction here. Been spinning wheels for three days. Cannot get past the errors. > > I'm doing something
2009 Mar 26
0
Using JRclient in java application
Hi, I'm wondering if anyone can help me. I'm writing java application that using JRclient and Rserve to communicate with R. I want to get response from R for command: x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2)) kmeans(x, 2, 22, algorithm = "Hartigan-Wong") and put result of kmeans() function in my TextArea.I've