Displaying 20 results from an estimated 1000 matches similar to: "paraPen in gam [mgcv 1.4-1.1] and centering constraints"
2009 May 02
1
installation of source package with empty man directory fails (PR#13685)
Full_Name: Daniel Sabanes Bove
Version: 2.9.0
OS: openSUSE 11.1 (2.6.27.21)
Submission from: (NULL) (91.13.255.113)
- Situation:
Checking or installing an R package with existing but empty man directory fails.
Perhaps this is a feature, but then a nice error message like
"Subdirectory 'man' contains no help pages!"
would be great.
- Error:
* Installing *source* package ?test?
2006 Jul 14
1
mgcv::gam error message
Hi
Could anyone please tell me what to do to resolve this error message?
I tried to run a gam with the mgcv package and got the following error:
"Error in qr.qty(qrc, sm$S[[1]]): NA/NaN/Inf in foreign function call (arg
5)"
(I have 116 covariates, I'm using the "cr" basis to speed things up, the
binomial family and, where necessary, have set the required k to lower than
2017 Nov 28
2
dplyr - add/expand rows
Or with the Bioconductor IRanges package:
df <- with(input, DataFrame(station, year=IRanges(from, to), record))
expand(df, "year")
DataFrame with 24 rows and 3 columns
station year record
<character> <integer> <character>
1 07EA001 1960 QMS
2 07EA001 1961 QMC
3 07EA001 1962 QMC
4
2017 Nov 27
2
dplyr - add/expand rows
try this:
##########################################
library(dplyr)
input <- tribble(
~station, ~from, ~to, ~record,
"07EA001" , 1960 , 1960 , "QMS",
"07EA001" , 1961 , 1970 , "QMC",
"07EA001" , 1971 , 1971 , "QMM",
"07EA001" , 1972 , 1976 , "QMC",
"07EA001" , 1977 ,
2017 Nov 28
0
dplyr - add/expand rows
On 11/26/2017 08:42 PM, jim holtman wrote:
> try this:
>
> ##########################################
>
> library(dplyr)
>
> input <- tribble(
> ~station, ~from, ~to, ~record,
> "07EA001" , 1960 , 1960 , "QMS",
> "07EA001" , 1961 , 1970 , "QMC",
> "07EA001" , 1971 , 1971 ,
2017 Nov 29
2
dplyr - add/expand rows
On 11/29/2017 04:15 PM, T?th D?nes wrote:
> Hi,
>
> A benchmarking study with an additional (data.table-based) solution.
I don't think speed is the right benchmark (I do agree that correctness
is!).
For the R-help list, maybe something about least specialized R knowledge
required would be appropriate? I'd say there were some 'hard' solutions
-- Michael (deep
2008 Apr 13
1
promptFunctions() to handle multiple names
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi all,
I wanted to set up my first (private) R-package and wondered
if there was a function to prompt() for multiple aliases in one Rd-file,
e.g. to create something like the normal distribution manual page
encompassing rnorm, dnorm,...
As I didn't find it, I modified prompt.default() and wrote a small function
to do this job, called
2017 Nov 29
0
dplyr - add/expand rows
Hi,
A benchmarking study with an additional (data.table-based) solution.
Enjoy! ;)
Cheers,
Denes
--------------------------
## packages ##########################
library(dplyr)
library(data.table)
library(IRanges)
library(microbenchmark)
## prepare example dataset ###########
## use Bert's example, with 2000 stations instead of 2
d_df <- data.frame( station =
2017 Nov 29
0
dplyr - add/expand rows
Hi Martin,
On 11/29/2017 10:46 PM, Martin Morgan wrote:
> On 11/29/2017 04:15 PM, T?th D?nes wrote:
>> Hi,
>>
>> A benchmarking study with an additional (data.table-based) solution.
>
> I don't think speed is the right benchmark (I do agree that correctness
> is!).
Well, agree, and sorry for the wording. It was really just an exercise
and not a full
2013 Mar 11
1
Use pcls in "mgcv" package to achieve constrained cubic spline
Hello everyone,
Dr. wood told me that I can adapting his example to force cubic spline to pass through certain point.
I still have no idea how to achieve this. Suppose we want to force the cubic spline to pass (1,1), how can
I achieve this by adapting the following code?
# Penalized example: monotonic penalized regression spline .....
# Generate data from a monotonic truth.
2017 Nov 26
3
dplyr - add/expand rows
dplyr may have something for this, but in base R I think the following does
what you want. I've shortened the name of your data set to 'd'.
i <- rep(seq_len(nrow(d)), d$YEAR_TO-d$YEAR_FROM+1)
j <- sequence(d$YEAR_TO-d$YEAR_FROM+1)
transform(d[i,], YEAR=YEAR_FROM+j-1, YEAR_FROM=NULL, YEAR_TO=NULL)
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Sat, Nov 25, 2017 at 11:18 AM,
2017 Nov 26
0
dplyr - add/expand rows
To David W.'s point about lack of a suitable reprex ("reproducible
example"), Bill's solution seems to be for only one station.
Here is a reprex and modification that I think does what was requested for
multiple stations, again using base R and data frames, not dplyr and
tibbles.
First the reprex with **two** stations:
> d <- data.frame( station =
2010 Apr 14
1
Selecting derivative order penalty for thin plate spline regression (GAM - mgcv)
Hi,
I am using GAMs (package mgcv) to smooth event rates in a penalized regression setting and I was wondering if/how one can
select the order of the derivative penalty.
For my particular problem the order of the penalty (parameter "m" inside the "s" terms of the formula argument) appears to
have a larger effect on the AIC/deviance of the estimated model than the
2013 Nov 01
0
Impose constraint on first order derivative at a point for cubic smoothing spline
Hello,
Dr. Simon Wood told me how to force a cubic spline passing through a
point. The code is as following. Anyone who knows how I can change the code
to force the first derivative to be certain value. For example, the first
derivative of the constrained cubic spline equals 2 at point (0, 0.6).
I really appreciate your help!
Thanks!
Best
Victor
2008 Oct 11
1
defines in Rmath.h and R_NO_REMAP
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
I'm programming with R 2.7.2 and had some trouble including
Rmath.h for its random variates generation routines: Although
I define R_NO_REMAP (which works fine for Rinternals.h stuff),
Rmath.h defines "beta" as "Rf_beta" etc., so that my "beta" strings
get redefined as well! Is this a feature?
I found an old
2012 Jul 11
2
Modifying the design matrix X in GAMS to suit data assimilation
I have a data assimilation problem that might be amenable to the use of GAMS, but I am not sure how feasible it is to implement. I was told the R mailing list was a great resource.
My observations are spatiotemporal salinity in the San Francisco Bay at a number of instruments over a few days. The thing that I want to fit is the initial condition for a salt transport model at the beginning of this
2010 Apr 26
1
Sweave: centering with echo=TRUE
In a .Rnw file I want to insert the R command
pairs(mydataframe)
and achieve the following effects
1. the command itseld is echoed into the tex document generated by Sweave
<<fig=TRUE,echo=TRUE>>=
2. The graphics generated appears in the tex document, with the graphics
centred.
3. The R command > pairs(mydataframe) is not centered.
Sweave-manual.pdf gives the following code chunk
2009 Mar 10
1
Centering multi-line strip text in lattice
I'm having trouble centering multi-line strip text in lattice. As the
code below demonstrates bounding box of the text is centered within
the strip, but the first line isn't centered in relation to the longer
second line. The "adj" argument to par.strip.text doesn't seem to do
much. Suggestions?
a=data.frame(
x=rep(1:10,2)
,y=rep(1:10,2)
,z=rep(c('First Line\nLonger
2012 Apr 12
1
Centering (e.g. on prcomp)
Hi!
I'm doing a PCA on some testdata (only 2 features) currently to see what happens. I read a lot of times one should center ones data, so i left the option on.
But now i am scratching my head on how to correctly transform new data to be comparable to the data used in the pca.
pca$x are the points (in PC system) the function returns
origpoints%*%pca$rotation
is not quite the same, because
2006 Jan 19
0
Centering in Prototype
Has anyone written a centering function with Prototype which centers an
element on a page (both vertically and horizontally) regardless of the
amount that the page has been scrolled?
--
John Long
http://wisheartdesign.com