Sorry, I should have said "Spline Interpolation" (not spline fitting).
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-gui
This is probably the *simplest* approach:
> f = splinefun (dat$x, dat$y)
> #simple plot
> x = seq (0, 6,, 200)
> plot (dat)
> lines (x, f (x) )
If that's not what you want, perhaps you could expand on "constraints"
or "best fitting"...
Expanding on what Bert said, spline fitting and (regression
On Wed, 22 Jan 2020 11:19:25 -0600
Ana Marija wrote:
> I have my normalized data matrix in
> file:normalizedDataMatrix_filtered.RData
>
> how do I have that in .csv format?
Have you tried using the function load() to load the saved data, then
write.csv() or write.csv2() to create the CSV file?
Hello,
This seems to "work". It doesn't give errors nor warnings and the fitted
line passes through the given points.
fit_result <- cobs(dat$x, dat$y,
constraint = "increase",
lambda = 0.1,
pointwise = con)
plot(y~x, dat)
pred <- predi
Hello,
I have my normalized data matrix in file:normalizedDataMatrix_filtered.RData
how do I have that in .csv format?
Thanks
Ana
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
Neat. Thanks.
On 1/22/20 10:17 AM, Bert Gunter wrote:
>
> Use ?file.choose to choose a file interactively and avoid typing paths:
>
> read.table(file.choose(), header = TRUE, etc)
>
> will open a finder window to navigate to and click on the file you want.
>
> -- Bert
>
> Bert Gunter
>
> "The
Hi
You probably has to use less points in con.
With just three points
> con1 <- con[c(1, 5, 10),]
> fit_result <- cobs(dat$x, dat$y, pointwise = con1)
qbsks2():
Performing general knot selection ...
Deleting unnecessary knots ...
function seems to work without error.
Cheers
Petr
> -Ori
Just a note: There is no such thing as "a best fitting curve" that must
pass through all the points.
You may wish to consult a statistician or spend time with references to
clarify your intent.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things
Use ?file.choose to choose a file interactively and avoid typing paths:
read.table(file.choose(), header = TRUE, etc)
will open a finder window to navigate to and click on the file you want.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
stic
Hello R-Help,
I'm trying to find the best fitting curve through a given set of points.
The fitted curve must also pass through these points. I found an answer on
Cross Validated which suggested to use the `cobs: Constrained B-Splines
(Sparse Matrix Based)` package. However, I got an error while te
> sqrt(c(1,-2,3))
[1] 1.00 NaN 1.732051
Warning message:
In sqrt(c(1, -2, 3)) : NaNs produced
You might want to put
if (any(VS < 0)) stop("some VS are negative")
just after the definition of VS.
On Tue, 21 Jan 2020 at 02:01, Atul Saini wrote:
>
> Hello R,
> I am attaching th
11 matches
Mail list logo