[R] Help with submitting HTML forms in RCurl

Henrique Dallazuanna wwwhsd at gmail.com
Sat Feb 13 00:10:59 CET 2010


I don't get error:

> postForm("http://www.expasy.ch/tools/protscale.html",
+    "sequence" = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+    scale = "Molecular weight",
+    window = "5",
+    weight_edges = "100",
+    weight_var = "linear",
+    norm = "no",
+    submit = "Submit")
[1] "<!--#exec cgi=\"/cgi-bin/protscale.pl\"-->\n"
attr(,"Content-Type")

"text/html"

Try removing .checkparams argument.

On Fri, Feb 12, 2010 at 4:40 PM, Sunando Roy <sunando at gmail.com> wrote:
> Hi,
>
> I am trying to submit a form to the EXPASY protscale server (
> http://www.expasy.ch/tools/protscale.html). I am using the RCurl package and
> the postForm function available in it. I have extracted the variables for
> the form from the HTML source page. According to the syntax of postForm, I
> just need to mention the url and assign values to the input mentioned in the
> HTML code.
> The code that I am using is:
> postForm("http://www.expasy.ch/tools/protscale.html",
>    "sequence" = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
>    scale = "Molecular weight",
>    window = "5",
>    weight_edges = "100",
>    weight_var = "linear",
>    norm = "no",
>    submit = "Submit"), .checkparams = TRUE)
> the constant error that I get is:
> Error in postForm("http://www.expasy.ch/tools/protscale.html", .params =
> list(sequence = "not",  :  STRING_ELT() can only be applied to a 'character
> vector', not a 'logical'
>
> Is there any other way to submit an HTML form in R ?
>
> Thanks for the help
>
> Regards
>
> Sunando
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list