Re: [R-es] Duda interpolación (package ' gstat ')

2015-08-08 Thread Marcos Bermejo
Muchas gracias por todo.

Esta es la parte del código del variograma: 
vg.aux - variogram(radPcp~1, radar.spdf, cutoff=1)
vg - as.data.frame(matrix(c(vg.aux$dist, vg.aux$gamma), nrow=15, ncol=2))
# El primer argumento de fit.variogram() es lo que hemos obtenido de 
variogram().
v.fit - fit.variogram(vg.aux, model=vgm(psill=0.10, model='Gau', range=5000,
   nugget=0.05))

He probado con otros modelos: 'Exp', 'Mat' y 'Sph', y me sigue dando el mismo 
error que os mandé.

Os pongo la función krige() otra vez:
KED.rad - krige(
  formula=pluvPcp~layer,  # covariable - radar
  locations=lluvia.rad.pluv.spdf,
  newdata=radarGrid,  # podría ser cualquier objeto 
Spatial
  model=v.fit,# modelo de semivariograma. 
  maxdist=Inf
)


La cosa es que tengo datos de lluvia de 5 pluviómetros (variable 'pluvPcp') 
situados en 5 puntos diferentes de una cuenca, y quiero interpolarpolarlos para 
que me estime la lluvia en toda la cuenca usando como covariable los datos de 
un radar meteorológico en esos mismos 5 puntos de los pluviómetros (variable 
'layer'). 
El variograma lo obtengo a partir de los datos del radar en toda la cuenca 
(variable 'radPcp' - unos 13.000 puntos), ya que no puedo obtenerlo a partir 
de los datos de lluvia de los pluviómetros, porque con 5 puntos no puedo 
obtener un variograma fiable.
¿El error que me daba R, puede ser por esto? ¿Cómo lo veis?

Lo de la solución no paramétrica no lo entiendo muy bien y no sé si podré 
implementarlo en mi caso.

Un saludo, 
  

 To: r-help-es@r-project.org
 From: rubenfca...@gmail.com
 Date: Fri, 7 Aug 2015 01:07:09 +0200
 Subject: Re: [R-es] Duda interpolación (package ' gstat ')
 
 Hola de nuevo,
 
  Un par de detalles técnicos...
 
  Antes de nada comentar que el paquete gstat no es 
 computacionalmente muy eficiente calculando las predicciones kriging 
 (calcula el estimador mcg de la tendencia utilizando la expresión 
 explícita, etc...), entre otras cosas requiere la factorización de la 
 matriz de varianzas covarianzas y pueden aparecer problemas numéricos.
 
  Es bien conocido que con el modelo gaussiano de variograma pueden 
 aparecer estas inestabilidades (puede ser muy plano en saltos pequeños y 
 como consecuencia  la matriz de covarianzas es semidefinida positiva 
 pero no 'estrictamente' definida positiva - en esto influye el redondeo...).
 
  Mi recomendación sería que probases con otro modelo de variograma y 
 que compartas el gráfico del ajuste...
 
  Un saludo, Rubén.
 
 P.D. Cuidado también con el sesgo en la estimación del variograma a 
 partir de los residuos (e.g. Fernandez-Casal R. and Francisco-Fernandez 
 M. (2014) Nonparametric bias-corrected variogram estimation under 
 non-constant trend, Stoch. Environ. Res. Ris. Assess, 28, 1247-1259), 
 aunque si tu objetivo final es la predicción no te preocupes demasiado 
 (no deberías fiarte de las varianzas kriging)...
 
 
 El 06/08/2015 a las 17:40, Freddy Omar López Quintero escribió:
  Hola Marcos,
 
  ¿El problema persiste si pruebas con un subconjunto de los datos?
 
  Saludos.
 
  2015-08-06 12:34 GMT-03:00 Marcos Bermejo markbermej...@hotmail.com:
 
  Sale plano sí.
 
  Ya se que sin tener los datos y el código es un poco difícil, pero es que
  mis datos ocupan mucho, es imposible.
  Seguiré mirando por internet.
 
  Muchas gracias Rubén.
 
  Un saludo,
 
 
  To: r-help-es@r-project.org
  From: rubenfca...@gmail.com
  Date: Thu, 6 Aug 2015 14:21:47 +0200
  Subject: Re: [R-es] Duda interpolación (package ' gstat ')
 
  Hola Marcos,
 
Parece que el problema es con el ajuste del variograma (sale
  plano?), sin más información no se exactamente que puede estar pasando...
 
Si me envías el código completo y los datos lo miro con más detalle
  (e incluso te doy una alternativa no paramétrica con el paquete npsp).
 
Un saludo, Rubén.
 
 
 
  El 04/08/2015 a las 11:24, Marcos Bermejo escribió:
  Hola,
 
  # Hacemos el KED. Ver funci�n krige():
KED.rad - krige(
  formula=pluvPcp~layer,  # covariable -
  radar
  locations=lluvia.rad.pluv.spdf,
  newdata=radarGrid,  # podr�a ser
  cualquier objeto Spatial
  model=v.fit,# modelo de
  semivariograma.
  maxdist=Inf
)
 
  Esta es la funci�n que me interpola los datos de lluvia. El error que
  me da es:
  solve.c, line 88: singular matrix in function Usolve()
 
  lufactor.c, line 208: singular matrix in function m_inverse()
  Error in predict.gstat(g, newdata = newdata, block = block, nsim =
  nsim,  :
  m_inverse
  In addition: Warning message:
  In fit.variogram(vg.aux, model = vgm(psill = 0.1, model = Gau,  :
  Warning: singular model in variogram fit
 
 
  Mi funci�n del variograma 

Re: [R] Piecewise (segmented) linear regression with center section slope constraint

2015-08-08 Thread David Winsemius

On Aug 7, 2015, at 12:05 PM, Drew Morrison wrote:

 Thanks, Jean. I've actually looked at that source before. The issue is that I
 can't constrain the slope of the /center/ section to be zero - in fact, I've
 applied similar code to a three-segment regression and I can get a zero
 slope either of the two sides, but not in the middle.

If you replaced the values during the interval in question with their mean 
values during that interval, you should then get a zero slope.

-- 
David.
 
 Here's a list of the main resources I've consulted so far:
 
 https://climateecology.wordpress.com/2012/08/19/r-for-ecologists-putting-together-a-piecewise-regression/
 
 http://www.stackoverflow.dluat.com/questions/30060278/creating-piecewise-linear-regression-with-flat-slope-in-r
 
 https://rpubs.com/MarkusLoew/12164
 
 
 
 --
 View this message in context: 
 http://r.789695.n4.nabble.com/Piecewise-segmented-linear-regression-with-center-section-slope-constraint-tp4710839p4710875.html
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error with predict and newdata

2015-08-08 Thread David Winsemius

On Aug 7, 2015, at 2:41 PM, kira taylor wrote:

 Hi!
 
 I am trying to use predict to apply my model to data from one time period to
 see what might be the values for another time period.  I did this
 successfully for one dataset, and then tried on another with identical code
 and got the following error:
 
 Error in eval(predvars, data, env) :
  numeric 'envir' arg not of length one
 
 The only difference between the two datasets was that my predictor model for
 the first dataset had two predictor variables and my model for the second
 dataset had only one.  Why would this make a difference?
 
 My dougfir.csv contains just two columns with thirty numbers in each,
 labeled height and dryshoot.
 
 my lm is: fitdougfir - lm(dryshoot~height,data=dougfir)
 
 It gets a little complicated (and messy, sorry!  I am new to R) because I
 then made a second .csv - the one I used to make my model contained values
 from just June.  My new .csv (called alldatadougfir.csv) includes values
 from October as well, and also contains a date column that labels the
 values either june or october.
 
 I did the following to separate the height data by date:
 
 alldatadougfir[alldatadougfir$date==june,c(height)]-junedatadougfir
 alldatadougfir[alldatadougfir$date==october,c(height)]-
 octoberdatadougfir

Those are no longer lists or dataframe, which are the proper classes of object 
to pass to predict. 

-- 
David.
 
 I then want to use my June model to predict my October dryshoots using
 height as my variable and I did the following:
 
 predict(fitdougfir, newdata=junedatadougfir)
 predict(fitdougfir, newdata=octoberdatadougfir)
 
 Again, I did this with an identical dataset successfully - the only
 difference was that my model in the successful dataset had two predictor
 variables instead of the one variable (height) I have in this dataset.
 
 Sorry again for my messy code!
 
 Thank you very much,
 
 Kira
 
   [[alternative HTML version deleted]]
 
 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Cant upgrade R in ubuntu 14.04

2015-08-08 Thread peter dalgaard
That is an Ubuntu issue, not an R one.

- Peter D.

 On 08 Aug 2015, at 06:31 , boredstoog via R-help r-help@r-project.org wrote:
 
 
 I am trying to install R programming language and able to install rbase
 using this code without adding repository in *source.list*
 
 sudo apt-get install r-base
 
 After that i tried to upgrade it using this code
 
 sudo add-apt-repository ‘deb
 http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu/trusty/’
 sudo apt-get update
 sudo apt-get upgrade
 
 But when i tried the first code
 
 sudo add-apt-repository ‘deb
 http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu/trusty/’
 
 its giving this error
 
 Error: need a single repository as argument
 
 
 
 
 
 --
 View this message in context: 
 http://r.789695.n4.nabble.com/Cant-upgrade-R-in-ubuntu-14-04-tp4710885.html
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] parallel clustering, amap, hcluster

2015-08-08 Thread Ziqi Zhang

Hi
I am looking for parallel implementation of hierarchical clustering, the 
equivalent to hclust in the fpc package.


I found hcluster from amap package:

hcluster(x, method = euclidean, diag = FALSE, upper = FALSE,
 link = complete, members = NULL, nbproc = 2,
 doubleprecision = TRUE)

It takes a data matrix, computes distance matrix then do clustering.
However in my application, /i have to compute the distance matrix and 
use it later anyway. So hcluster is re-computing the distance which is a 
waste of time, as my data is very large scale.


Is there anyway hcluster could just use a pre-computed distance object, 
or obtain the distance object from hcluster, so I can avoid 
double-computing the distane object?


Or more general question is, if there is a parallel implementation of 
hierarchical clustering that takes input a distance matrix, rather than 
the raw data matrix?

Many thanks!

---
This email has been checked for viruses by Avast antivirus software.

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] creating a funct

2015-08-08 Thread John Kane
You sent the data but forgot the code :)

It is better to use dput() to send data. Have a look at 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
 and http://adv-r.had.co.nz/Reproducibility.html

John Kane
Kingston ON Canada


 -Original Message-
 From: betans...@gmail.com
 Sent: Sat, 8 Aug 2015 00:23:23 +0200
 To: r-help@r-project.org
 Subject: [R] creating a funct
 
 Dear
 
 i am develeping a function, first  I attach r command and later r
 executer
 script, the conection fails and I do not realize why
 
 best regards


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error with predict and newdata

2015-08-08 Thread Ben Bolker
David Winsemius dwinsemius at comcast.net writes:

 
 
 On Aug 7, 2015, at 2:41 PM, kira taylor wrote:
 
  Hi!
  
  I am trying to use predict to apply my model to data from
  one time period to
  see what might be the values for another time period.  I did this
  successfully for one dataset, and then tried on another
  with identical code
  and got the following error:
  
  Error in eval(predvars, data, env) :
   numeric 'envir' arg not of length one
  

  Please don't cross-post on StackOverflow and the r-help lists
(it will usually lead to duplicated/wasted effort).  If you must,
at least post a link/indicate in each venue that you have cross-posted
to the other: 

(line-broken link, reassemble to visit)

http://stackoverflow.com/questions/31887043/
error-with-predict-and-newdata-dependent-on-number-of-
predictor-variable-in-mod/31887398#31887398

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Can't install rgl: installed package can't be loaded; 'memory not mapped'

2015-08-08 Thread Waichler, Scott R
Hi, I can't install package rgl.  The last lines from the install process  
talking about the error are:

** testing if installed package can be loaded
sh: line 1: 11949 Segmentation fault  
'/files3/R/R-3.2.1_install/lib64/R/bin/R' --no-save --slave 21  
'/tmp/RtmpQCpp6N/file2b115f4f8e1d'

 *** caught segfault ***
address (nil), cause 'memory not mapped'
aborting ...
ERROR: loading failed

I realize this is probably not an R problem, but a Google search turns up 
nothing that helps, and I'm hoping someone here can help anyway.  Below are my 
sessionInfo() output and the contents of the first file generated with R CMD 
check rgl_0.95.1247.tar.gz.

 sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.2.1


# R CMD check rgl_0.95.1247.tar.gz
* installing *source* package 'rgl' ...
** package 'rgl' successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for gcc... (cached) gcc -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 accepts -g... (cached) yes
checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc -std=gnu99 accepts -fvisibility... yes
checking whether  accepts -fvisibility... no
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... libraries , headers 
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for glEnd in -lGL... yes
checking for gluProject in -lGLU... yes
checking for freetype-config... yes
configure: using Freetype and FTGL
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
ABCLineSet.cpp -o ABCLineSet.o
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
BBoxDeco.cpp -o BBoxDeco.o
BBoxDeco.cpp: In member function 'int rgl::AxisInfo::getNticks(float, float)':
BBoxDeco.cpp:239: warning: converting to 'int' from 'float'
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
Background.cpp -o Background.o
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
ClipPlane.cpp -o ClipPlane.o
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
Color.cpp -o Color.o
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
Disposable.cpp -o Disposable.o
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
Light.cpp -o Light.o
g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
-I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
-Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
LineSet.cpp -o LineSet.o
g++ 

Re: [R] testing whether two character vectors contain (the same) items in the same order

2015-08-08 Thread Robert Baer



On 8/6/2015 5:25 AM, Federico Calboli wrote:

Hi All,

let’s assume I have a vector of letters drawn only once from the alphabet:

x = sample(letters, 15, replace = F)
x
  [1] z t g l u d w x a q k j f n “v

y = x[c(1:7,9:8, 10:12, 14, 15, 13)]

I would now like to test how good a match y is for x.  Obviously I can 
transform the letters in numbers and use a rank test, but I was left wondering 
whether this is the only solution and whether there are more appropriate 
solutions that are already implemented in R (I am not going to reinvent the 
wheel if I can avoid it).

BW

F

Perhaps
install.packages(stringdist)
help(package = 'stringdist')







--
Federico Calboli
Ecological Genetics Research Unit
Department of Biosciences
PO Box 65 (Biocenter 3, Viikinkaari 1)
FIN-00014 University of Helsinki
Finland

federico.calb...@helsinki.fi

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] testing whether two character vectors contain (the same) items in the same order

2015-08-08 Thread Robert Baer

And I probably should have included this link:
http://journal.r-project.org/archive/2014-1/loo.pdf

On 8/8/2015 12:50 PM, Robert Baer wrote:



On 8/6/2015 5:25 AM, Federico Calboli wrote:

Hi All,

let’s assume I have a vector of letters drawn only once from the 
alphabet:


x = sample(letters, 15, replace = F)
x
  [1] z t g l u d w x a q k j f n “v

y = x[c(1:7,9:8, 10:12, 14, 15, 13)]

I would now like to test how good a match y is for x.  Obviously I 
can transform the letters in numbers and use a rank test, but I was 
left wondering whether this is the only solution and whether there 
are more appropriate solutions that are already implemented in R (I 
am not going to reinvent the wheel if I can avoid it).


BW

F

Perhaps
install.packages(stringdist)
help(package = 'stringdist')







--
Federico Calboli
Ecological Genetics Research Unit
Department of Biosciences
PO Box 65 (Biocenter 3, Viikinkaari 1)
FIN-00014 University of Helsinki
Finland

federico.calb...@helsinki.fi

__
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-guide.html

and provide commented, minimal, self-contained, reproducible code.




__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] H2O Package - Error Messages

2015-08-08 Thread Axel Urbiz
Hello,

I've been experimenting with the H2O package, which seems to be a very
interesting and promising project.

I'm getting a few error messages through using h2o.deeplearning (which I
guess it must be something I'm doing wrong). Here is a reproducible example
of errors using the n_folds argument to this function and also when
supplying a list to the argument hidden in an attempt to perform
parameter search.

BTW - I'm running H20 on my local host (Mac/OS).

library(h2o)
localH2O - h2o.init()
iris.hex - as.h2o(iris)
iris.dl - h2o.deeplearning(x = 1:4, y = 5, training_frame = iris.hex)

#n_folds issue
iris.dl2 - h2o.deeplearning(x = 1:4, y = 5, n_folds = 5, training_frame =
iris.hex)
Error in .h2o.doSafeREST(conn = conn, h2oRestApiVersion =
h2oRestApiVersion,  :
  Unknown parameter: n_folds


#Parameter search issue
iris.dl3 - h2o.deeplearning(x = 1:4, y = 5, hidden=list(c(5,5), c(10,10)),
training_frame = iris.hex)
Error in which(params[[i$name]] == Inf | params[[i$name]] == -Inf) :
  (list) object cannot be coerced to type 'double'

Any pointers would be much appreciated.

Thanks,
Axel.

[[alternative HTML version deleted]]

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Can't install rgl: installed package can't be loaded; 'memory not mapped'

2015-08-08 Thread Duncan Murdoch
On 08/08/2015 1:32 PM, Waichler, Scott R wrote:
 Hi, I can't install package rgl.  The last lines from the install process  
 talking about the error are:

I'd guess you have an OpenGL problem.  Does glxgears run?

Duncan Murdoch

 
 ** testing if installed package can be loaded
 sh: line 1: 11949 Segmentation fault  
 '/files3/R/R-3.2.1_install/lib64/R/bin/R' --no-save --slave 21  
 '/tmp/RtmpQCpp6N/file2b115f4f8e1d'
 
  *** caught segfault ***
 address (nil), cause 'memory not mapped'
 aborting ...
 ERROR: loading failed
 
 I realize this is probably not an R problem, but a Google search turns up 
 nothing that helps, and I'm hoping someone here can help anyway.  Below are 
 my sessionInfo() output and the contents of the first file generated with R 
 CMD check rgl_0.95.1247.tar.gz.
 
 sessionInfo()
 R version 3.2.1 (2015-06-18)
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
 locale:
  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base
 
 loaded via a namespace (and not attached):
 [1] tools_3.2.1
 
 
 # R CMD check rgl_0.95.1247.tar.gz
 * installing *source* package 'rgl' ...
 ** package 'rgl' successfully unpacked and MD5 sums checked
 checking for gcc... gcc -std=gnu99
 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out
 checking for suffix of executables... 
 checking whether we are cross compiling... no
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc -std=gnu99 accepts -g... yes
 checking for gcc -std=gnu99 option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -std=gnu99 -E
 checking for gcc... (cached) gcc -std=gnu99
 checking whether we are using the GNU C compiler... (cached) yes
 checking whether gcc -std=gnu99 accepts -g... (cached) yes
 checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
 checking whether __attribute__((visibility())) is supported... yes
 checking whether gcc -std=gnu99 accepts -fvisibility... yes
 checking whether  accepts -fvisibility... no
 checking for libpng-config... yes
 configure: using libpng-config
 configure: using libpng dynamic linkage
 checking for X... libraries , headers 
 checking GL/gl.h usability... yes
 checking GL/gl.h presence... yes
 checking for GL/gl.h... yes
 checking GL/glu.h usability... yes
 checking GL/glu.h presence... yes
 checking for GL/glu.h... yes
 checking for glEnd in -lGL... yes
 checking for gluProject in -lGLU... yes
 checking for freetype-config... yes
 configure: using Freetype and FTGL
 configure: creating ./config.status
 config.status: creating src/Makevars
 ** libs
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 ABCLineSet.cpp -o ABCLineSet.o
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 BBoxDeco.cpp -o BBoxDeco.o
 BBoxDeco.cpp: In member function 'int rgl::AxisInfo::getNticks(float, float)':
 BBoxDeco.cpp:239: warning: converting to 'int' from 'float'
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 Background.cpp -o Background.o
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 ClipPlane.cpp -o ClipPlane.o
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 Color.cpp -o Color.o
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 Disposable.cpp -o Disposable.o
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H 
 -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 
 -Iext -I/usr/local/include   -g -O2 -fvisibility=hidden -fpic  -g -O2  -c 
 Light.cpp -o Light.o
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG 

[R] Recursive looping of a list in R

2015-08-08 Thread Evans
I am trying to creat a list from a loop such that once you loop the value
obtained is appended onto the list, then you loop through that value to give
the next elemet of the list and the system continues recusively. To be clear
I am creating a list to contain elements of the following tree
probabilities;
http://r.789695.n4.nabble.com/file/n4710898/help.png . The elements of the
diagram should be presented in a list such that each level of the tree
represents elements in the list (only the coefficients are of interest). I
have this code to start with

j - 0

while(j = 0){
  
  j - j+1
  
  occlist - list(1)
  
  for(i in occlist[[j]]){

occ_cell - seq(i, i+1, by = 1)

occllist - list(occ_cell)

occunlist - as.vector(unlist(occllist, recursive = TRUE))

occlist[[j]] - occunlist

print(occlist)

  }
}

Any assistance will be highly appreciated. Thanks.



--
View this message in context: 
http://r.789695.n4.nabble.com/Recursive-looping-of-a-list-in-R-tp4710898.html
Sent from the R help mailing list archive at Nabble.com.

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Installing RGDAL on CentOS v.6.2

2015-08-08 Thread Shouro Dasgupta
Dear all,

I have access to an IBM IDataplex Cluster with CentOS v.6.2. R 3.2.1 is
currently installed. I was wondering if there was any way to install RGDAL
on it? Thanks!

Sincerely,

Shouro

[[alternative HTML version deleted]]

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in rep in matrix - Windows 8- R 3.2.1

2015-08-08 Thread Nikita Dinger
 y - matrix(rep(10,4),2,2)
 y
 [,1] [,2]
[1,]   10   10
[2,]   10   10



I expected an output of
 y
 [,1] [,2]
[1,]   10   4
[2,]   10   4



Thanks and Regards.

[[alternative HTML version deleted]]

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error in rep in matrix - Windows 8- R 3.2.1

2015-08-08 Thread David Winsemius

On Aug 8, 2015, at 1:44 PM, Nikita Dinger wrote:

 y - matrix(rep(10,4),2,2)
 y
 [,1] [,2]
 [1,]   10   10
 [2,]   10   10
 
 
 
 I expected an output of
 y
 [,1] [,2]
 [1,]   10   4
 [2,]   10   4
 

When you get something you don't expect, you should start by examining the 
arguments. Type this at your console:

rep(10,4)

It should then be obvious that you need to read the help page for `rep`.

-- 
David.
 
 
 Thanks and Regards.
 
   [[alternative HTML version deleted]]

And do read the Posting guide.

 
 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Can't install rgl: installed package can't be loaded; 'memory not mapped'

2015-08-08 Thread Waichler, Scott R
  Hi, I can't install package rgl.  The last lines from the install process  
  talking
 about the error are:
 
 I'd guess you have an OpenGL problem.  Does glxgears run?

Yes, it does.  I wasn't aware of the program before you mentioned it, but a 
display opens with 3 gears and here is some output:
[root@hokulea R-3.2.1_install]# glxgears -info
GL_RENDERER   = Mesa GLX Indirect
GL_VERSION= 1.2 (1.5 Mesa 6.5.1)
GL_VENDOR = Mesa project: www.mesa3d.org
GL_EXTENSIONS = GL_ARB_depth_texture GL_ARB_imaging GL_ARB_multitexture 
GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow 
GL_ARB_texture_border_clamp GL_ARB_texture_cube_map GL_ARB_texture_env_add 
GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 
GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two 
GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color 
GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract 
GL_EXT_draw_range_elements GL_EXT_framebuffer_object GL_EXT_fog_coord 
GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_rescale_normal 
GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs 
GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_edge_clamp 
GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 
GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array 
GL_ATI_texture_mirror_once GL_IBM_texture_mirrored_repeat GL_NV_blend_square 
GL_NV_texture_rectan!
 gle GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_lod 
GL_SGIX_depth_texture GL_SGIX_shadow
24839 frames in 6.0 seconds = 4153.389 FPS
7152 frames in 6.0 seconds = 1192.594 FPS
. . . 

Scott


  ** testing if installed package can be loaded
  sh: line 1: 11949 Segmentation fault  '/files3/R/R-
 3.2.1_install/lib64/R/bin/R' --no-save --slave 21 
 '/tmp/RtmpQCpp6N/file2b115f4f8e1d'
 
   *** caught segfault ***
  address (nil), cause 'memory not mapped'
  aborting ...
  ERROR: loading failed
 
  I realize this is probably not an R problem, but a Google search turns up
 nothing that helps, and I'm hoping someone here can help anyway.  Below
 are my sessionInfo() output and the contents of the first file generated with
 R CMD check rgl_0.95.1247.tar.gz.
 
  sessionInfo()
  R version 3.2.1 (2015-06-18)
  Platform: x86_64-unknown-linux-gnu (64-bit)
 
  locale:
   [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
   [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
   [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
   [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
   [9] LC_ADDRESS=C   LC_TELEPHONE=C
  [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
 
  attached base packages:
  [1] stats graphics  grDevices utils datasets  methods   base
 
  loaded via a namespace (and not attached):
  [1] tools_3.2.1
 
 
  # R CMD check rgl_0.95.1247.tar.gz
  * installing *source* package 'rgl' ...
  ** package 'rgl' successfully unpacked and MD5 sums checked checking
  for gcc... gcc -std=gnu99 checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out checking for
  suffix of executables...
  checking whether we are cross compiling... no checking for suffix of
  object files... o checking whether we are using the GNU C compiler...
  yes checking whether gcc -std=gnu99 accepts -g... yes checking for gcc
  -std=gnu99 option to accept ISO C89... none needed checking how to run
  the C preprocessor... gcc -std=gnu99 -E checking for gcc... (cached)
  gcc -std=gnu99 checking whether we are using the GNU C compiler...
  (cached) yes checking whether gcc -std=gnu99 accepts -g... (cached)
  yes checking for gcc -std=gnu99 option to accept ISO C89... (cached)
  none needed checking whether __attribute__((visibility())) is
  supported... yes checking whether gcc -std=gnu99 accepts
  -fvisibility... yes checking whether  accepts -fvisibility... no
  checking for libpng-config... yes
  configure: using libpng-config
  configure: using libpng dynamic linkage checking for X... libraries ,
  headers checking GL/gl.h usability... yes checking GL/gl.h presence...
  yes checking for GL/gl.h... yes checking GL/glu.h usability... yes
  checking GL/glu.h presence... yes checking for GL/glu.h... yes
  checking for glEnd in -lGL... yes checking for gluProject in -lGLU...
  yes checking for freetype-config... yes
  configure: using Freetype and FTGL
  configure: creating ./config.status
  config.status: creating src/Makevars
  ** libs
  g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H -
 I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -
 I/usr/include/freetype2 -Iext -I/usr/local/include   -g -O2 
 -fvisibility=hidden
 -fpic  -g -O2  -c ABCLineSet.cpp -o ABCLineSet.o
  g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H -
 I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -
 I/usr/include/freetype2 -Iext -I/usr/local/include   -g -O2 
 -fvisibility=hidden
 -fpic  -g -O2  -c 

Re: [R] Errors -- Windows 8- R version 3.2.1

2015-08-08 Thread Uwe Ligges

E,

1. urls need to be ull qualified including the protocol such as
http://www.facebook.com;
2. filenames are relative to the current working directory, if they are 
not in the current working directory, secify the full path.


3. read.csv() cannot read docx files

Best,
Uwe Ligges


On 08.08.2015 22:19, Nikita Dinger wrote:

Have saved text files in the same working directory as well as in the
desktop.
I am still unable to read url or files in R.

Screenshot of the commands given by me in R are attached herewith.

The version of R I am using is 3.2.1 on a Windows 8 laptop.

Thanks for the help.

Regards,
Nikita Dinger


Screenshot 2015-08-09 01.36.30.png




__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Errors -- Windows 8- R version 3.2.1

2015-08-08 Thread John C Frain
To check what your actual working directory is try

getwd()

To look a list of files in your actual working directory try

dir()

If your working directory is not what you expected change it with

setwd(path to directory)

There are several ways in Windows to ensure that R starts in the required
directory (eg double clicking on a file which starts in R in the working
directory or setting up a short cut on your desktop which starts R in that
directory, use projects in RStudio).  I usually use the setwd()  method  or
PStudio projects.

John C Frain
3 Aranleigh Park
Rathfarnham
Dublin 14
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:fra...@tcd.ie
mailto:fra...@gmail.com

On 8 August 2015 at 21:19, Nikita Dinger dingernik...@gmail.com wrote:

 Have saved text files in the same working directory as well as in the
 desktop.
 I am still unable to read url or files in R.

 Screenshot of the commands given by me in R are attached herewith.

 The version of R I am using is 3.2.1 on a Windows 8 laptop.

 Thanks for the help.

 Regards,
 Nikita Dinger

 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Can't install rgl: installed package can't be loaded; 'memory not mapped'

2015-08-08 Thread Duncan Murdoch
On 08/08/2015 5:19 PM, Waichler, Scott R wrote:
 Hi, I can't install package rgl.  The last lines from the install process  
 talking
 about the error are:

 I'd guess you have an OpenGL problem.  Does glxgears run?
 
 Yes, it does.  I wasn't aware of the program before you mentioned it, but a 
 display opens with 3 gears and here is some output:
 [root@hokulea R-3.2.1_install]# glxgears -info
 GL_RENDERER   = Mesa GLX Indirect
 GL_VERSION= 1.2 (1.5 Mesa 6.5.1)
 GL_VENDOR = Mesa project: www.mesa3d.org
 GL_EXTENSIONS = GL_ARB_depth_texture GL_ARB_imaging GL_ARB_multitexture 
 GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow 
 GL_ARB_texture_border_clamp GL_ARB_texture_cube_map GL_ARB_texture_env_add 
 GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar 
 GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat 
 GL_ARB_texture_non_power_of_two GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra 
 GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax 
 GL_EXT_blend_subtract GL_EXT_draw_range_elements GL_EXT_framebuffer_object 
 GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels 
 GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color 
 GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texture3D 
 GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine 
 GL_EXT_texture_env_dot3 GL_EXT_texture_lod_bias GL_EXT_texture_object 
 GL_EXT_vertex_array GL_ATI_texture_mirror_once GL_IBM_texture_mirrored_repeat 
 GL_NV_blend_square GL_NV_texture_rect!
 angle GL_N
V_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_lod 
GL_SGIX_depth_texture GL_SGIX_shadow
 24839 frames in 6.0 seconds = 4153.389 FPS
 7152 frames in 6.0 seconds = 1192.594 FPS
 . . . 
 

So it looks as though OpenGL is working.  I really have no idea what is
causing the error you're seeing.  rgl works for me, but I don't have a
64 bit Linux to try it on.  (It does work in 32 bit Ubuntu.)

Duncan Murdoch

 
 
 ** testing if installed package can be loaded
 sh: line 1: 11949 Segmentation fault  '/files3/R/R-
 3.2.1_install/lib64/R/bin/R' --no-save --slave 21 
 '/tmp/RtmpQCpp6N/file2b115f4f8e1d'

  *** caught segfault ***
 address (nil), cause 'memory not mapped'
 aborting ...
 ERROR: loading failed

 I realize this is probably not an R problem, but a Google search turns up
 nothing that helps, and I'm hoping someone here can help anyway.  Below
 are my sessionInfo() output and the contents of the first file generated with
 R CMD check rgl_0.95.1247.tar.gz.

 sessionInfo()
 R version 3.2.1 (2015-06-18)
 Platform: x86_64-unknown-linux-gnu (64-bit)

 locale:
  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base

 loaded via a namespace (and not attached):
 [1] tools_3.2.1


 # R CMD check rgl_0.95.1247.tar.gz
 * installing *source* package 'rgl' ...
 ** package 'rgl' successfully unpacked and MD5 sums checked checking
 for gcc... gcc -std=gnu99 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out checking for
 suffix of executables...
 checking whether we are cross compiling... no checking for suffix of
 object files... o checking whether we are using the GNU C compiler...
 yes checking whether gcc -std=gnu99 accepts -g... yes checking for gcc
 -std=gnu99 option to accept ISO C89... none needed checking how to run
 the C preprocessor... gcc -std=gnu99 -E checking for gcc... (cached)
 gcc -std=gnu99 checking whether we are using the GNU C compiler...
 (cached) yes checking whether gcc -std=gnu99 accepts -g... (cached)
 yes checking for gcc -std=gnu99 option to accept ISO C89... (cached)
 none needed checking whether __attribute__((visibility())) is
 supported... yes checking whether gcc -std=gnu99 accepts
 -fvisibility... yes checking whether  accepts -fvisibility... no
 checking for libpng-config... yes
 configure: using libpng-config
 configure: using libpng dynamic linkage checking for X... libraries ,
 headers checking GL/gl.h usability... yes checking GL/gl.h presence...
 yes checking for GL/gl.h... yes checking GL/glu.h usability... yes
 checking GL/glu.h presence... yes checking for GL/glu.h... yes
 checking for glEnd in -lGL... yes checking for gluProject in -lGLU...
 yes checking for freetype-config... yes
 configure: using Freetype and FTGL
 configure: creating ./config.status
 config.status: creating src/Makevars
 ** libs
 g++ -I/files3/R/R-3.2.1_install/lib64/R/include -DNDEBUG -DHAVE_PNG_H -
 I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -
 I/usr/include/freetype2 -Iext -I/usr/local/include   -g -O2 
 -fvisibility=hidden
 -fpic  -g -O2  -c ABCLineSet.cpp -o ABCLineSet.o
 

Re: [R] Recursive looping of a list in R

2015-08-08 Thread Jim Lemon
Hi Evans,
I'm not sure whether this is what you want, but look at the code in
the listBuilder and listCrawler functions in the crank package.

Jim


On Sun, Aug 9, 2015 at 4:14 AM, Evans evansochi...@aims.ac.za wrote:
 I am trying to creat a list from a loop such that once you loop the value
 obtained is appended onto the list, then you loop through that value to give
 the next elemet of the list and the system continues recusively. To be clear
 I am creating a list to contain elements of the following tree
 probabilities;
 http://r.789695.n4.nabble.com/file/n4710898/help.png . The elements of the
 diagram should be presented in a list such that each level of the tree
 represents elements in the list (only the coefficients are of interest). I
 have this code to start with

 j - 0

 while(j = 0){

   j - j+1

   occlist - list(1)

   for(i in occlist[[j]]){

 occ_cell - seq(i, i+1, by = 1)

 occllist - list(occ_cell)

 occunlist - as.vector(unlist(occllist, recursive = TRUE))

 occlist[[j]] - occunlist

 print(occlist)

   }
 }

 Any assistance will be highly appreciated. Thanks.



 --
 View this message in context: 
 http://r.789695.n4.nabble.com/Recursive-looping-of-a-list-in-R-tp4710898.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] creating a funct

2015-08-08 Thread Jim Lemon
Hi Jose,
It looks like it is time for a bit of guessing. For one thing, if you
try to attach an R script you will get an error. I will assume that
you really used source as you seem to have gotten past that step.
You later mention a connection error when you try to execute the
command. As you sent what looks like a TAB separated data file,
perhaps you didn't specify where the data file is correctly. So, if
your data file is stored like this:

/home/jose/data/mydata.tab

your R session is in this directory:

getwd()
 /home/jose/R

and you have a command line like this:

mydata.df-read.table(mydata.tab,sep=\t)

you will get a connection error because R is trying to find:

/home/jose/R/mydata.tab

and it is not there. Finally, it is really helpful if you copy the
error messages that you get into your email, even if they are in
Spanish. Seguir intentando y buena suerte

On Sun, Aug 9, 2015 at 12:04 AM, John Kane jrkrid...@inbox.com wrote:
 You sent the data but forgot the code :)

 It is better to use dput() to send data. Have a look at 
 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
  and http://adv-r.had.co.nz/Reproducibility.html

 John Kane
 Kingston ON Canada


 -Original Message-
 From: betans...@gmail.com
 Sent: Sat, 8 Aug 2015 00:23:23 +0200
 To: r-help@r-project.org
 Subject: [R] creating a funct

 Dear

 i am develeping a function, first  I attach r command and later r
 executer
 script, the conection fails and I do not realize why

 best regards

 
 FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!

 __
 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-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] regularized dfa rda (Klar): problems with predictions

2015-08-08 Thread RUkidding
Daniel Stahl-2 wrote
 Error in predict.rda(z, data = test[testset, ]) : 
   A new data to predict must be supplied.

For anyone encountering this problem, it stems from having both the klaR and
rda libraries loaded. rda gives this error message because its predict.rda
is defined:

function (object, x, y, xnew, prior, alpha, delta, type = c(class,
posterior, nonzero), trace = FALSE, ...) 

and 

if (missing(xnew)) { 
stop(A new data to predict must be supplied.) 
}

unload the rda package:
detach(package:rda, unload=TRUE)



--
View this message in context: 
http://r.789695.n4.nabble.com/regularized-dfa-rda-Klar-problems-with-predictions-tp3327188p4710913.html
Sent from the R help mailing list archive at Nabble.com.

__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.