Re: [R] GLM with Binomial Distribution

2013-07-23 Thread Bob O'Hara
The model is including the extra terms, but they are folded into, well, somewhere. The -1 only removes the intercept from the Time effect: the other factors still have to be contrasts to something. Doesn't Crawley's book explain this? If not, I wrote a paper a few years ago that might help:

Re: [R] R base package grid does not output raster image

2013-07-23 Thread Prof Brian Ripley
On 24/07/2013 07:23, Terry Seaward wrote: Hi, I don't think this is a remote desktop issue. I can run the following code by remoting into both a Windows 7 machine and a Windows Server R2 There are Windows Server 2003, 2008, 2012 but not R2. machine. I can see the results on the Windows 7 m

[R] Change values in a dateframe

2013-07-23 Thread Arnaud Michel
Hello I have the following problem : The dataframe TEST has multiple lines for a same person because : there are differents values of Nom or differents values of Prenom but the values of Matricule or Sexe or Date.de.naissance are the same. TEST <- structure(list(Matricule = c(66L, 67L, 67L, 68L,

[R] R base package grid does not output raster image

2013-07-23 Thread Terry Seaward
Hi, I don't think this is a remote desktop issue. I can run the following code by remoting into both a Windows 7 machine and a Windows Server R2 machine. I can see the results on the Windows 7 machine but not the server. > library(grid) > grid.raster(1:10/11) Best regards, Terry Terry

Re: [R] .eps files and powerpoint

2013-07-23 Thread Patrick Connolly
On Tue, 23-Jul-2013 at 10:23PM -0400, Richard M. Heiberger wrote: |> I have colleagues who use powerpoint. When I send my colleagues pdf files |> or ps files, powerpoint |> rejects them. Powerpoint does accept some eps files. |> [...] |> Does anyone know a workaround that will get vector grap

Re: [R] .eps files and powerpoint

2013-07-23 Thread Pascal Oettli
Hello, I would avoid the use of vector files for presentation, as Powerpoint will display a rasterized version off the vectorized image (if I am not mistaken). I always directly use raster files, as png. For eps, I use the following command in R. > postscript(file='file.eps', onefile=FALSE, hori

Re: [R] do not perform function if the outcome is NA

2013-07-23 Thread Jeff Newmiller
The problem specification here seems flawed. The normal return values are unitless, but the abnormal return values have units. I would expect that returning NA when the standard deviations are zero will give rather less surprising results.

[R] .eps files and powerpoint

2013-07-23 Thread Richard M. Heiberger
I have colleagues who use powerpoint. When I send my colleagues pdf files or ps files, powerpoint rejects them. Powerpoint does accept some eps files. I have been able to use pdf2ps to convert some pdf files into ps files, and then manually edit the ps file to eps files (following the comments i

Re: [R] do not perform function if the outcome is NA

2013-07-23 Thread iza.ch1
Hi Rui Thanks a lot. It works perfect. Izzie > Hello, > > Try the following. > > > standardised.abnormal.returns <- > lapply(seq_len(ncol(abnormal.returns)),function(i) { > if(standard.deviation[i,1] == 0) > abnormal.returns[,i] > else > abnormal.re

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-23 Thread cognizio
Great summary! It works great without the heavy PERL library. I am running the YAML package I thought I needed to support WRITEXLS. Do I need it or is YAML not a dependency? Other question is on your last point: 'WRITEXLS COMMENT:' now shows up across the first row of the data output in the XLS.

Re: [R] do not perform function if the outcome is NA

2013-07-23 Thread Rui Barradas
Hello, Try the following. standardised.abnormal.returns <- lapply(seq_len(ncol(abnormal.returns)),function(i) { if(standard.deviation[i,1] == 0) abnormal.returns[,i] else abnormal.returns[,i]/standard.deviation[i,1] }) Hope this helps, Rui B

Re: [R] Selecting names with regard to visit frequency

2013-07-23 Thread arun
Hi Michael, It could be due to some extra space.  If you use read.table(..., fill=TRUE), it should read.  Then, there would be missing values.  Using ?dput() will be better.   dput(df1) structure(list(x = c(2L, 5L, 4L, 6L, 24L, 7L, 12L, 3L, 5L)), .Names = "x", class = "data.frame", row.names =

Re: [R] Heat Map for species - code from Numerical Ecology with R

2013-07-23 Thread Valerie Mucciarelli
Thank you Sarah for pointing out to me to turn HTML off.  Here is the message again.  To answer your questions the data I provide below is MY data.   I am relatively new to R and I am working through the code that is provided in the book Numerical Ecology with R:   http://xa.yimg.com/kq/groups/1

[R] do not perform function if the outcome is NA

2013-07-23 Thread iza.ch1
Hi you all I have a question regarding the function. In my function I divide the values by the standard errors and sometimes the standard error is equal to zero and I get the result NA. Can I write the function in the way that if the outcome of the function is zero then the function is not cond

Re: [R] flexible approach to subsetting data

2013-07-23 Thread David Winsemius
On Jul 23, 2013, at 2:00 PM, David Carlson wrote: > Actually the ".0" on the first variable is not needed. > > You could modify the reshape() call to search for the base > name of each variable so you would not need to change the code > if the number of replications changes: > > reshape(df5, d

Re: [R] mgcv: pcls() makes everything linear

2013-07-23 Thread Simon Wood
I can't see anything immediately wrong except: 1. presumably there are repeated values in 'road_quiet' aren't there? If so then your inequality constraint matrix will contain constraints that are *exact* copies of each other. I'm not sure, and don't immediately have time to try it out, but it c

Re: [R] flexible approach to subsetting data

2013-07-23 Thread David Carlson
Actually the ".0" on the first variable is not needed. You could modify the reshape() call to search for the base name of each variable so you would not need to change the code if the number of replications changes: reshape(df5, direction="long", v.names=c("dose", "resp"), varying=list(

Re: [R] Heat Map for species - code from Numerical Ecology with R

2013-07-23 Thread Sarah Goslee
Hi Valerie, On Tue, Jul 23, 2013 at 4:06 PM, Valerie Mucciarelli wrote: > Thank you Sarah for pointing out to me to turn HTML off. Here is the message > again. To answer your questions the data I provide below is MY data. That's still not a reproducible example, but much more readable. Your

Re: [R] Heat Map for species - code from Numerical Ecology with R

2013-07-23 Thread Sarah Goslee
Hi Valerie, Are you using your own data or data provided by the authors? If the latter, where can we get it? If the former, please provide a reproducible example using dput() to include some of your data. Also, please resend your message with HTML mail turned off so we can actually read it. Pr

[R] GLM with Binomial Distribution

2013-07-23 Thread Leif Rasmuson
Hi All, I am working on re-analyzing per a reviewers request. The goal of the project was to determine if the presence of predatory fishes caused female crabs to delay the release of larvae. Number of releases were recorded at three time periods: 1 hour before the simulated tide, 3 hours afte

Re: [R] flexible approach to subsetting data

2013-07-23 Thread arun
If you have more columns:  names(df1)<-paste0(gsub("\\..*","",names(df1)),"_",rep(1:2,each=4)) #change `rep` accordingly reshape(df1,direction="long",varying=1:ncol(df1),sep="_",timevar="m")[,-6] A.K. - Original Message - From: arun To: Andrea Lamont Cc: R help Sent: Tuesday, July 2

[R] Heat Map for species - code from Numerical Ecology with R

2013-07-23 Thread Valerie Mucciarelli
Hello, I am relatively new to R and I am working through the code that is provided in the book Numerical Ecology with R and I have run across an error message that I can't seem to figure out. I am using the vegan, ade4, gclus and cluster packages. The code is as follows: # Ordered community

Re: [R] flexible approach to subsetting data

2013-07-23 Thread arun
Sorry, a mistake It should be: res<-reshape(df1,sep=".",varying=list(c("sim","sim.1"),c("X1","X1.1"),c("X2","X2.1"),c("X3","X3.1")),direction="long",timevar="m")[,-6] row.names(res)<- 1:nrow(res) head(res,2) #  m sim X1 X2 X3 #1 1   1  5  4  5 #2 1   1  4  3  2 A.K. - Original Message -

Re: [R] Selecting names with regard to visit frequency

2013-07-23 Thread arun
Hi Michael, It is not clear how you read the dataset.  It looks like a dataframe. df1<- read.table(text=' "","x" "A1",2 "A2",5 "A3",4 "A4",6 "A5",24 "A6",7 "A7",12 "A8",3 "A9",5 ',sep=",",header=TRUE,row.names=1)  vec1<-unlist(df1)  names(vec1)<- row.names(df1)  names(vec1)[vec1%in% 3:

Re: [R] flexible approach to subsetting data

2013-07-23 Thread arun
Hi, It is better to provide a reproducible example using ?dput() df1<- read.table(text=" sim   X1   X2   X3   sim.1   X1.1    X2.1    X3.1 1 5    4 5    1   4  3    7 1 4    3 2    1   7  4 1 1 3    9 4    1   5

[R] Coxme Package Error Message Help

2013-07-23 Thread Michel Kohl
Hello: I am new to R Help so hopefully I will have included enough information to allow for valuable feedback on an error message I am receiving. I am trying to a fit a mixed effects cox model to binary elk telemetry data to look at movement decisions relative to other possibilities (specifically

Re: [R] Check the class of an object

2013-07-23 Thread Simon Zehnder
Hi Hervé, thank you very much for your reply! This makes the different treatment of S3 and S4 objects by 'class' clear. Best Simon On Jul 23, 2013, at 7:20 PM, Hervé Pagès wrote: > Hi, > > On 07/23/2013 09:59 AM, Simon Zehnder wrote: >> Hi David, >> >> thanks for the reply. You are right.

Re: [R] Check the class of an object

2013-07-23 Thread Simon Zehnder
Hi Martin, I didn't know that. But that is even more comfortable for checking. Thanks for the quick update! Best Simon P.S. And thanks for the online documents about S4 - I could already learn a lot! On Jul 23, 2013, at 7:11 PM, Martin Morgan wrote: > On 07/23/2013 09:59 AM, Simon Zehnder

Re: [R] flexible approach to subsetting data

2013-07-23 Thread David Winsemius
On Jul 23, 2013, at 10:49 AM, David Winsemius wrote: > > On Jul 23, 2013, at 10:01 AM, Adams, Jean wrote: > >> Check out the reshape() function of the reshape package. Here's one of the >> examples from ?reshape. >> >> Jean >> >> >> library(reshape) # No, at least not for the reshape-fun

Re: [R] flexible approach to subsetting data

2013-07-23 Thread David Winsemius
On Jul 23, 2013, at 10:01 AM, Adams, Jean wrote: > Check out the reshape() function of the reshape package. Here's one of the > examples from ?reshape. > > Jean > > > library(reshape) # No, at least not for the reshape-function The reshape function is from the 'base' package. The 'reshape

[R] (no subject)

2013-07-23 Thread Nicole Prause
Dear Community, I found a very similar problem to mine that also had no response from 2009 using library sem and polycor: http://www.mail-archive.com/r-help@r-project.org/msg65158.html I have a five-factor latent model that converges when using a covariance matrix, but fails to converge when us

Re: [R] Check the class of an object

2013-07-23 Thread Hervé Pagès
Hi, On 07/23/2013 09:59 AM, Simon Zehnder wrote: Hi David, thanks for the reply. You are right. Using the %in% is more stable and I gonna change my code. Unlike with S3 objects, class() on an S4 object can only return 1 class. Also note that, on an S3 object, doing "firstClass" %in% clas

Re: [R] Check the class of an object

2013-07-23 Thread Martin Morgan
On 07/23/2013 09:59 AM, Simon Zehnder wrote: Hi David, thanks for the reply. You are right. Using the %in% is more stable and I gonna change my code. you said you were you were using S4 classes. S4 classes do not report vectors of length != 1, from ?class For objects which have a form

Re: [R] flexible approach to subsetting data

2013-07-23 Thread Adams, Jean
Check out the reshape() function of the reshape package. Here's one of the examples from ?reshape. Jean library(reshape) wide <- reshape(Indometh, v.names="conc", idvar="Subject", timevar="time", direction="wide") long <- reshape(wide, direction="long") wide long On Tue, Jul 23, 2013 at 9:35

Re: [R] Check the class of an object

2013-07-23 Thread Simon Zehnder
Hi David, thanks for the reply. You are right. Using the %in% is more stable and I gonna change my code. When testing for a specific class using 'is' one has to start at the lowest heir and walk up the inheritance structure. Starting at the checks at the root will always give TRUE. Having a st

Re: [R] Check the class of an object

2013-07-23 Thread David Winsemius
On Jul 23, 2013, at 5:36 AM, Simon Zehnder wrote: > Dear R-Users and R-Devels, > > I have large project based on S4 classes. While writing my unit tests I found > out, that 'is' cannot test for a specific class, as also inherited classes > can be treated as their super classes. I need to do ch

Re: [R] downloading web content

2013-07-23 Thread David Winsemius
On Jul 23, 2013, at 2:59 AM, Daisy Englert Duursma wrote: > Hello, > I am trying to use R to download a bunch of .csv files such as: It's are not a csv file; instead it's a zip file. Why not use the `download.file` function. This downloads it to my working directory: > download.file("http://b

Re: [R] optimize integer function parameters

2013-07-23 Thread Enrico Schumann
On Tue, 23 Jul 2013, Christof Kluß writes: > Am 23-07-2013 13:20, schrieb Enrico Schumann: > >> On Tue, 23 Jul 2013, Christof Kluß writes: >> >>> >>> I have "observations" obs <- (11455, 11536, 11582, 11825, 11900, ...) >>> >>> and a simulation function f(A,B,C,D,E,F), so sim <- f(A,B,C,D,E,F)

Re: [R] Function apply

2013-07-23 Thread arun
Hi, Try: set.seed(25) X<- matrix(sample(1:50,3*140,replace=TRUE),nrow=140) #either res1<-do.call(rbind,lapply(split(as.data.frame(X),((seq_len(nrow(X))-1)%/%10)+1),function(x) apply(x,2,mean))) #or  res2<-t(sapply(split(as.data.frame(X),((seq_len(nrow(X))-1)%/%10)+1),colMeans))  identical(res1,res

[R] percent correctly predicted (PCP) zeros for hurdle model

2013-07-23 Thread Soumitro Dey
Hello all, I am using the hurdle model for fitting my count data using the pscl package which is working fine. However, I am stuck with the problem of calculating the percent correctly predicted (PCP) zeros for hurdle model. The method I am trying to use to achieve this is 'hitmiss' in the pscl pa

[R] Help with using unpenalised te smooth in negative binomial mgcv gam

2013-07-23 Thread alice.jones
Hi, I have been trying to fit an un-penalised gam in mgcv (in order to get more reliable p-values for hypothesis testing), but I am struggling to get the model to fit sucessfully when I add in a te() interaction. The model I am trying to fit is: gam(count~ s(x1, bs = "ts", k = 4, fx = TR

[R] flexible approach to subsetting data

2013-07-23 Thread Andrea Lamont
Hello: I am running a simulation study and am stuck with a subsetting problem. Here is the basic issue: I generated data and am running a simulation that uses multiple imputation. For each generated dataset, I used multiple imputation. The resultant dataset is in wide for where each imputation i

Re: [R] p-values from multiple testing

2013-07-23 Thread Bert Gunter
Your question has effectively nothing to do with R, so is off topic here. Post on a statistics or bioinformatics site like stats.stackexchange.com . I'll just mention that this is a ubiquitous issue in, e.g. gene testing (p>>n), is controversial, philosophical, and complex. You may have a good bi

[R] p-values from multiple testing

2013-07-23 Thread Jie
Dear All, I performed thousands of testings and obtained p-values. And then I did two-sided uniform KS test of the p-values, the result claimed it is uniform. So does it mean that my model are wrong? Because I expect more small p-values near 0. This is a preliminary step before correcting the mult

[R] Simple example of web-scraping.

2013-07-23 Thread Keith S Weintraub
Folks, I was wondering if anyone has an example or a pointer to an example of code to scrape a web page. The tricky parts for me are the following: * I might need to get multiple pages in sequence. * I need to login with user-name and password. Thanks for your time and help, KW -- ___

Re: [R] how to download Journal Citation Reports with R

2013-07-23 Thread Wet Bell Diver
Thank Ben, This works wonderfully, thanks! BTW: the policy my library publishes regarding JCR implies that this falls under acceptable use, as long as the data is for personal use, so that's fine. I'll need to read up on RCurl a little further, as this seems a powerful package, thank you fo

Re: [R] downloading web content

2013-07-23 Thread Duncan Temple Lang
Hi Daisy Use getURLContent() rather than getURL(). The former handles binary content and this appears to be a zip file. You can write it to a file or read its contents directly in memory, e.g library(RCurl) z = getURLContent("http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+eri

Re: [R] optimize integer function parameters

2013-07-23 Thread Christof Kluß
Hi the integer values in the vectors sim and obs are dates when I set sim <- f(TS0,TS1,TS2,TB0,TB1,TB2) my A,..,F below then TS0 and TB0 are depend (and so on) the main thing in f(...) is something like for (i in c(1:length(temperature))) { Temp <- temperature[i] if (DS < 0) {

Re: [R] Error with sem function df = -6

2013-07-23 Thread John Fox
Dear Immanuel, In the absence of more information, your question is unanswerable, since there's no way of knowing which variables in your model are observed and which are latent. It was my guess that Y1, Z1, and Z2 (along with UNIT) are observed and CF is latent, but this is clearly wrong given

Re: [R] List Structure and Acces to data

2013-07-23 Thread Berend Hasselman
On 23-07-2013, at 13:22, "Eric TRAVAGLINI" wrote: > Hello, > > I used some other langages as Matlab and i just began with R, and i need help > with data structure. > > Here is my code > > " > fct_echant_hist <- function ( my_echant, my_vitesse, my_hist, my_summary) { > list (my_echan

Re: [R] List Structure and Acces to data

2013-07-23 Thread Bert Gunter
Read the "Introduction to R tutorial" that is part of your R installation. For more complete information, consult the "R Language Definition" and ?"[". -- Bert On Tue, Jul 23, 2013 at 4:22 AM, Eric TRAVAGLINI wrote: > Hello, > > I used some other langages as Matlab and i just began with R, a

[R] cbind error with check.names

2013-07-23 Thread Fg Nu
Hello all, I posted a question about cbind and an error when specifying the check.names argument here: http://stackoverflow.com/questions/17810470/cbind-error-with-check-names I was advised to take this to R-devel, but before that, I'd like to get the opinions of people on this list. Thanks

Re: [R] Select csv files by choosing datetime

2013-07-23 Thread Akkara, Antony (GE Power & Water, Non-GE)
I tried like this, file.info(list.files(path = fpath, pattern = "*.csv", all.files = FALSE, full.names = TRUE,ignore.case = TRUE))$mtime - It returning files modified date. ["2013-07-23 15:43:51 IST" "2013-07-23 15:43:51 IST" "2013-07-23 15:43:51 IST" "2013-07-23 15:45:33 IST" "2013-07-23 15:45:32

[R] R: Some days missing using xtabs

2013-07-23 Thread Stefano Sofia
Thanks to Rui Barradas and to Arun. Rui's considerations are very sensible, and they solved all my doubts. Thank you Stefano Da: Rui Barradas [ruipbarra...@sapo.pt] Inviato: martedì 23 luglio 2013 14.40 A: arun Cc: Stefano Sofia; R help Oggetto: Re: [R] So

Re: [R] Some days missing using xtabs

2013-07-23 Thread arun
Hi, I tried this without the changing the class, but there was no warning.  str(release_freq) #'data.frame':    62 obs. of  4 variables: # $ d_release: Factor w/ 31 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ... # $ m_release: Factor w/ 2 levels "5","6": 1 1 1 1 1 1 1 1 1 1 ... # $ y_release

Re: [R] Select csv files by choosing datetime

2013-07-23 Thread Akkara, Antony (GE Power & Water, Non-GE)
Hi, I tried with file.info() . But how can I get a set of filenames with path which is created between two date/time. Thanks, Antony. -Original Message- From: Jim Holtman [mailto:jholt...@gmail.com] Sent: Monday, July 22, 2013 4:23 PM To: Akkara, Antony (GE Power & Water, Non-GE) Cc:

[R] non-conformable arrays

2013-07-23 Thread G Girija
Hi, I have 5 stock values and i am calculating EWMA followed the logic as given ind following link.[ http://www.orecastingfinancialrisk.com/3.html ] [EWMA = matrix(nrow=T,ncol=3) # create a matrix to hold the covariance matrix for each t lambda = 0

[R] List Structure and Acces to data

2013-07-23 Thread Eric TRAVAGLINI
Hello, I used some other langages as Matlab and i just began with R, and i need help with data structure. Here is my code " fct_echant_hist <- function ( my_echant, my_vitesse, my_hist, my_summary) { list (my_echant = my_echant, my_vitesse = my_vitesse,

[R] mgcv: pcls() makes everything linear

2013-07-23 Thread Kathrine Veie
Dear R helplisters, I am trying to implement a mononicity constraint on a smooth term in my generalized additive model with the mgcv package (v. 1.7-18). I adapted the code from an example given in the help file for pcls(). The example runs just as one would expect, but when I adapt it and use

Re: [R] Some days missing using xtabs

2013-07-23 Thread Rui Barradas
Hello, Something I've just noticed, stringsAsFactors is not an argument to merge(). And, without changing the class I g a warning: Warning message: In `[<-.factor`(`*tmp*`, ri, value = 1:31) : invalid factor level, NA generated Rui Barradas Em 23-07-2013 13:36, arun escreveu: Hi, I tried

[R] Check the class of an object

2013-07-23 Thread Simon Zehnder
Dear R-Users and R-Devels, I have large project based on S4 classes. While writing my unit tests I found out, that 'is' cannot test for a specific class, as also inherited classes can be treated as their super classes. I need to do checks for specific classes. What I do right now is sth. like

Re: [R] How to split two levels several times?

2013-07-23 Thread Rui Barradas
Hello, It's better if you keep this on the list, the odds of getting more and better answers are greater. As for your new question, try the following. lens <- rle(as.character(XXX$electrode))$lengths m <- length(lens) %/% 2 idx <- rep(1:m, sapply(1:m, function(.m) sum(lens[(2*.m - 1):(2*.m)]

Re: [R] optimize integer function parameters

2013-07-23 Thread Enrico Schumann
On Tue, 23 Jul 2013, Christof Kluß writes: > > I have "observations" obs <- (11455, 11536, 11582, 11825, 11900, ...) > > and a simulation function f(A,B,C,D,E,F), so sim <- f(A,B,C,D,E,F) > > e.g. sim = c(11464, 11554, 11603, 11831, 11907, ...) > > now I would like to fit A,B,C,D,E,F such that "

Re: [R] Some days missing using xtabs

2013-07-23 Thread Rui Barradas
Hello, As for your second question, before merge(), try the following. release_freq$d_release <- as.integer(as.character(release_freq$d_release)) release_freq$m_release <- as.integer(as.character(release_freq$m_release)) release_freq$y_release <- as.integer(as.character(release_freq$y_release))

Re: [R] Some days missing using xtabs

2013-07-23 Thread Rui Barradas
Hello, Why should those numbers show up in the final result? They are missing in the original data frame. A hack could be fac <- factor(hospital_2004$d_release, levels = seq_len(max(hospital_2004$d_release))) as.data.frame(xtabs( ~ fac + m_release + y_release, data=hospital_2004)) And th

[R] downloading web content

2013-07-23 Thread Daisy Englert Duursma
Hello, I am trying to use R to download a bunch of .csv files such as: http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia I have tried the following and neither work: a<- getURL(" http://biocache.ala.org.au/ws/occurrences/download?q=Banksia+ericifolia";) Error in curlPerfo

Re: [R] Some days missing using xtabs

2013-07-23 Thread Pascal Oettli
Hello, Please use dput() to provide useful dataset and avoid the use of HTML when sending a e-mail to this list. Regards, Pascal 2013/7/23 Stefano Sofia > Dear R-users, > given the following data frame called hospital_2004 > > gender d_birth m_birth y_birth address d_admittance m_admittance

[R] Some days missing using xtabs

2013-07-23 Thread Stefano Sofia
Dear R-users, given the following data frame called hospital_2004 gender d_birth m_birth y_birth address d_admittance m_admittance y_admittance yard_admittance d_release m_release y_release yard_release diaprinc diasec1 diasec2 diasec3 diasec4 diasec5 2 13 12 1929 42002 30 3 2004 3003 6 5 2004 4

[R] MGCV: Degrees of freedom of smooth terms

2013-07-23 Thread Christoph Scherber
Dear all, This is just a quick question regarding degrees of freedom in GAM models fit by MGCV (using select=T): Can I roughly interpret them as: 1 df: linear effect of x on y 2 df: approximately quadratic of x on y 3 df: approximately cubic effect of x on y? 1 df for a spatial term s(x,y): bil