Displaying 20 results from an estimated 4000 matches similar to: "bowed linear approximations"
2017 Sep 26
0
bowed linear approximations
Hi Rich,
If I understand your comment about "uniformly distributed along the log=x
axis" then I think John's (second) set of commands needs a change to the
definition of xx, as follows:
xx <- exp(seq(from=log(min(x)),to=log(max(x)),length=50))
m <- lm(y ~ log(x))
yy <- predict(m, data.frame(x=xx))
points(xx, yy, col="red")
HTH,
Eric
On Mon, Sep 25, 2017 at
2017 Sep 25
5
bowed linear approximations
Dear Rich,
Assuming that I understand what you want to do, try adding the following to your script (which, by the way, is more complicated that it needs to be):
xx <- 10:50
m <- lm(y ~ x)
yy <- predict(m, data.frame(x=xx))
lines(spline(xx, yy), col="blue")
m <- lm(y ~ log(x))
yy <- predict(m, data.frame(x=xx))
points(xx, yy, col="magenta")
The first set of
2017 Sep 26
0
bowed linear approximations
Dear Rich,
I think that it's generally a bad idea to give statistical (as opposed to simply technical) advice by email without knowing the context of the research. I think that you'd do well to seek help from a statistician, and not just do what I suggest below.
Interpolating the data only makes sense if there's no random component to the response (mag in your data). Otherwise, it
2011 May 04
1
bivariate linear interpolation
Hi,
I have three matrices (X,Y,P) with the same dimension. The X,Y grid is
regular and I want to
perform linear interpolation to pick out certain points. In matlab
appropriate call is
something like
Pout=interp2(X,Y,P,Xout,Yout, method="linear")
where Xout and Yout are the locations where I want the Pout data
(typically a different grid).
(Scipy has this routine in
2018 May 08
3
help with json data from the web into data frame in R
Hi David, .. I think I've got it :-)
Please let me know if you see anything glaringly wrong with this:
library(RCurl)
zWebObj <- postForm("https://www.semantic-mediawiki.org/w/api.php",
"action" = "ask",
"query" = "[[Category:City]]|?Capital%20of|?Has%20area",
"format" = "json"
.opts = list(ssl.verifypeer =
2018 May 08
3
help with json data from the web into data frame in R
> On May 8, 2018, at 9:03 AM, Evans, Richard K. (GRC-H000) <richard.k.evans at nasa.gov> wrote:
>
> That said, I have two issues to ask for help with:
>
> 1) how to ignore cert errors with a fromJSON call
If you can do it with curl, then why aren't you doing one of a) a system call, b) installing and loading RCurl, c) installing and loading curl (the R package with that
2002 Sep 11
1
rational approximations to the normal cdf
In the R source, nmath/pnorm.c contains the
code for a rational function approximation
for the normal cdf. These constants are listed:
const double a[5] = {
2.2352520354606839287,
161.02823106855587881,
1067.6894854603709582,
18154.981253343561249,
0.065682337918207449113
};
The source file cites a paper by Cody (1969)
and states that these
2018 May 08
0
help with json data from the web into data frame in R
> On May 8, 2018, at 10:08 AM, Evans, Richard K. (GRC-H000) <richard.k.evans at nasa.gov> wrote:
>
> Hi David, .. I think I've got it :-)
> Please let me know if you see anything glaringly wrong with this:
>
> library(RCurl)
> zWebObj <- postForm("https://www.semantic-mediawiki.org/w/api.php",
> "action" = "ask",
>
2018 May 08
3
help with json data from the web into data frame in R
Right. I'm trying to access a server within my organization which has a cert error that I cannot fix.
The example link I provided was to a site on the web that does not have the cert error.
From the linux shell I use the "-k" switch with cURL to ignore cert errors.. is there an equivalent in the R world?
-Rich
-----Original Message-----
From: David Winsemius [mailto:dwinsemius
2018 May 08
0
help with json data from the web into data frame in R
[non-tabular json data] -- ok.. so I think I need to figure out how to make it tabular. Thanks!
[curl] -- I was hoping there was a cleaner way to do it.. using R to evoke cURL to get the data as text and then passing it into getJSON seems to be what I need to do.
Do you by chance have an simple example of using RCurl to get a response ignoring cert errors?
ty
-Rich
-----Original Message-----
2018 May 08
0
help with json data from the web into data frame in R
That said, I have two issues to ask for help with:
1) how to ignore cert errors with a fromJSON call
And
2) why the json data from the example link doesn't convert to a data frame. As seen in the following example
library("rjson")
result <- fromJSON(file =
2018 May 09
1
help with json data from the web into data frame in R
Regarding the question:
From the linux shell I use the "-k" switch with cURL to ignore cert errors.. is there an equivalent in the R world?
I have (sometimes) had success by creating a .curlrc file and putting the necessary curl options in it. When R invokes curl, curl picks up the options.
[my context was running install.packages( method='curl' ) pointing to a local
2023 Dec 09
1
Linear model and approx function
Dear all;
I have a dataframe with several columns. The columns are the elevation,
volume and the area of the cells (which were placed inside a polygon). I
have extracted them from DEM raster to calculate the volume under polygon
and the elevation for a specific volume of the reservoir.
> head(x6,2)
Elevation Vol Area V_sum A_sum
1 2145 13990.38 85.83053 13990.38
2018 May 08
2
help with json data from the web into data frame in R
I?ve been tinkering and discovered that the link I need to read json data from is ?https? and there is a certificate warning that I have to click through from a browser. That might be my issue. Is there any way in the json package to tell it to ignore self-signed cert errors in a url?
-Rich
From: Eric Berger [mailto:ericjberger at gmail.com]
Sent: Tuesday, May 08, 2018 11:31 AM
To: Evans,
2008 Apr 22
1
subset and boxplots
R users,
This should be simple, but I cannot figure it out. I import test.csv, then
create a subset for "brook_dis". When I plot (week, R) I get a nice
boxplot, but along the x axis, there are weeks a, b, c along with h and nh.
Thank you ahead of time. keith
rm(list=ls())
cond.exp1<-read.csv("condition/test.csv",header=TRUE)
sub<-subset(cond.exp1,
2018 May 08
0
help with json data from the web into data frame in R
> On May 8, 2018, at 8:36 AM, Evans, Richard K. (GRC-H000) <richard.k.evans at nasa.gov> wrote:
>
> I?ve been tinkering and discovered that the link I need to read json data from is ?https? and there is a certificate warning that I have to click through from a browser. That might be my issue. Is there any way in the json package to tell it to ignore self-signed cert errors in a
2009 Dec 01
3
paste name in for loop?
Hello,
I am trying to create subsets of grouped data (by area size), and use
the area size as part of the output name. The code below works for area
(xout) 1 and 50, the other files are given NA for an area.
A simple example:
xout <- c(1,5,10,25,50,100)
for(i in xout) { print(paste("Areal_Ppt_",xout[i],"sqmi.txt", sep="")) }
[1] "Areal_Ppt_1sqmi.txt"
2011 Oct 20
0
Apply approx() to an array and eventually a list of arrays
Hello all,
I'm struggling to grasp how I might use lapply() instead of looping to
run approx() on a list consisting of multiple arrays - each of equal
dimension.
But simpler than that, I haven't been able to successfully apply
approx() to an array, unless I loop through the third dimension and
extract the matrix. See example code below...
Any suggestions will be gratefully received.
Thanks
2008 Jan 12
0
hist.Date() and cut.Date(): approximations used when using breaks = 'months' or 'years'
Hi all,
I came across some curious behavior today in using hist.Date() and
subsequently noted the same behavior in cut.Date(), both of which are
using similar code when 'breaks = "months"' or 'breaks = "years"'.
I was in the process of creating a histogram of subject enrollment in a
clinical trial. The counts needed to be by month, so essentially used:
2019 May 10
0
[R] approx with NAs --> new argument 'na.rm=TRUE' ?!
I have now committed a version "fulfilling" your wish, partly at
least, to R-devel .
In the new approx(*, na.rm=FALSE) cases,
the result of how NA's are treated does depend on the
4 different extrapolation rules {1, 2, 1:2, 2:1}
The main reason was that I kept the low level code in C to do
+- what it did before which automatically was using 'rule' to
determine these