Re: [R] equivalent of repeated measures anova using lmer

2015-08-20 Thread Ben Bolker
asudar aruna.sudarshan at gmail.com writes:

 
 I am trying to run a linear mixed effects model similar to the 2*2*2 anova
 design. My DV is reaction time and fixed factors are time (pre vs.
 post:within-subject), condition (congruent vs. incongruent: within subject)
 and stimulation (vertex vs. DLPFC: between subject)
 My concerns are:
 a)I have very few participants: 7 in the vertex condition and 7 in the
 DLPFC condition.
 b)2 out of the 7 participants participated in both vertex and DLPFC
 condition.
  How do I compute a nested lmer model with reaction time as DV and time,
 condition and stimulation as factors? and how do i account for random
 intercepts and slopes with few number of participants?
 Thanks for all the help

  You'll probably get more useful answers to this question on
the r-sig-mixed-mod...@r-project.org mailing list.

   7 participants is small but doesn't seem horribly small
(but it might preclude estimating a full random-slopes model).
You'll get more information on r-sig-mixed-models ...

__
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-es] error en dudi.pco

2015-08-20 Thread nuria bs
Buenas! Estoy intentando hacer un script que me permita integrar la información 
filogenetica, funcional, ambiental y espacial para saber si hay filtrado 
ambiental en mis comunidades. Aunque el script creo que esta bien hecho, me 
sale un error que no puedo solucionar y no se porque me aparece. Alguien podría 
darme alguna idea? Gracias


library(picante)
library(stringr)
library(ecodist)
library(ade4)
library(ape)

my.xys - read.table(C:/Filogenia/IN_my.xys.txt,sep=\t,header=T,row.names=1)
my.env - read.table(C:/Filogenia/IN_my.env.txt,sep=\t,header=T,row.names=1)
my.sample - read.delim(file=C:/Filogenia/IN_my.sample.txt, sep=\t, 
header=T,row.names=1)
my.traits - 
read.delim(C:/Filogenia/IN_traits_norm.txt,sep=\t,header=T,row.names=1)

stand.value -apply(my.env, MARGIN=2, max)-apply(my.env, MARGIN=2, min)
stand.envs -sweep(my.env,2,stand.value,/)

my.phylo - read.tree(BCTree_Ports.nwk)

# RLQ 
###
# Convertimos el arbol en un arbol de la clase phylog gracias a la funcion 
newick2phylog() 
# la cual ya incluye la matriz de distancias filogeneticas. 
my.phylog -newick2phylog(write.tree(my.phylo))

# L matrix: COA para my.sample:
COA.sample - dudi.coa(my.sample,scan=FALSE,nf=dim(my.sample)[2]-1)

# Hacemos un PCA con la matriz de datos geograficos. Esto constituira la mitad 
de la matriz R.
PCA.xy - dudi.pca(my.xys,COA.sample$lw,scan=FALSE, nf=dim(my.xys)[1]-1)

# Hacemos un PCA que sera la otra mitad de la matriz R.
PCA.env- dudi.pca(stand.envs,COA.sample$lw,scale=FALSE, scan=FALSE, 
nf=dim(stand.envs)[2])

# Hacemos un PCO para los traits:
dist.traits - dist(my.traits,method=euclidean)
dist.traits-as.matrix(dist.traits)

# Primera mitad de la matriz Q:
PCO.traits -dudi.pco(d=dist.traits, row.w=COA.sample$cw,full=TRUE)
Error in dudi.pco(d = dist.traits, row.w = COA.sample$cw, full = TRUE) : 
  Distance matrix expected
# Segunda mitad de la matriz Q:
PCO.phylo 
-dudi.pco(as.dist(as.matrix(my.phylog$Wdist)[names(my.sample),names(my.sample)]),COA.sample$cw,full=TRUE)

# Modificamos las matrices:
source(RLQ.R)
rlq.output - 
rlqESLTP(PCA.env,PCA.xy,COA.sample,PCO.traits,PCO.phylo,scan=FALSE,nf=2)


  LOC DIAMTMEAN   PPT NEIGHBOURS
Preste  207.458 7   999 173.0952703
Ports   181.625 11  717 220.7983265
Toran   236.0416667 10  911 235.6761387
LOC Amblystegium_serpensPorella_platyphylla Amblystegium_subtile
Anomodon_attenuatus Anomodon_viticulosusApometzgeria_pubescens  
Brachythecium_populeum  Brachythecium_velutinum Bryum_moravicum Cf_Hypnum   
Cryphaea_heteromallaScleropodium_cespitans  Eurhynchium_sp  Kindbergia 
praelongaFrullania_tamarisci Frullania_dilatata  
Homalothecium_sericeum  Hypnum_cupressiforme HypCupCup   HypCupFil  
Hypnum_recurvatum   Hypnum_revolutumIsothecium_alopecuroides
Jungermannia_sp Leptodon_smithiiLeucodon_sciuroides 
Lejeunea_cavifolia  Lophocolea_bidentataMetzgeria_furcata   
Mnium_stellare  Neckera_besseri Neckera_complanata  Neckera_crispa  
Orthotrichum_affine Orthotrichum_lyelli Orthotrichum_speciosum  
Orthotrichum_rupestre   Orthotrichum_sp Orthotrichum_pallens
Orthotrichum_stramineum Orthotrichum_striatum   Orthotrichum_schimperi  
Orthotrichum_tenellum   Plagiochila_porelloides Plagiothecium_nemorale  
Porella_arboris_vitae   Pseudoleskeella_nervosa Pterigynandrum_filiforme
Radula_complanata   Rhynchostegiella_curviseta  Thuidium_delicatum  
Ulota_crispaTortella_flavovirensTortella_tortuosa
Els Ports   0   58  60  0   0   0   0   10  
0   20  8   0   0   0   12  465.5   127 65  
0   65  45  6   0   2   181 0   31  3   
540 0   38.52434.5  84  44.53   0   0   46.5
6   5   45  0   0   21.50   100 0   82  
180 0   0   0   0   0
La Preste   1   159 0   0   0   12  0   0   
2   0   0   8   15.52   0   377 0   23.5
0   23.519  0   1   0   0   6   0   0   
13  0   0   0   0   65  0   76  52  109 
41  0   139.5   21  0   5   0   0   250 159.5   
35.50   18  0   2   2.5
Toran   30  701 46  305 148 0   8   6   1.5 
0   0   0   8   0   49  451 491 55  28  
27  102 0   669 0   0   163 1   0   171 
1   0   1052.5  0   5   0   0   13  58.50   
25  24  0   3.5 5   30  0   6   

Re: [R] Newbie question: error message with install.packages

2015-08-20 Thread David Winsemius

 On Aug 19, 2015, at 9:13 PM, Peter Wicher pjwic...@gmail.com wrote:
 
 Hi,
 
 I’m starting to work my way through “Machine Learning With R” by Brett Lantz. 
  
 
 Running on Mac OS X 10.10.4
 
 I’ve downloaded and installed R and the R Console comes up fine.  
 
 Whenever I use the install.packages command, regardless of the package I get 
 the same error message:
 
 install.packages (RWeka)
 Error: Line starting '!DOCTYPE HTML PUBLI ...' is malformed!
 
 Any idea of what is wrong and how to solve it?  

Not sure. Have never gotten that error message, and I do use OS X 10.10.3 as 
well as having very recently updated to R 3.2.2.

Are you using the R.app GUI?

If so … What do you see when you look at Preference/Startup for the default 
CRAN repository?

If not … What do you see when you run:

getOption(repos”)

I get:

  CRAN 
http://cran.cnr.Berkeley.edu; 


 
 Thanks!
 
 Peter Wicher
 pjwic...@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-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] Newbie question: error message with install.packages

2015-08-20 Thread Peter Wicher
Hi,

I’m starting to work my way through “Machine Learning With R” by Brett Lantz.  

Running on Mac OS X 10.10.4

I’ve downloaded and installed R and the R Console comes up fine.  

Whenever I use the install.packages command, regardless of the package I get 
the same error message:

 install.packages (RWeka)
Error: Line starting '!DOCTYPE HTML PUBLI ...' is malformed!

Any idea of what is wrong and how to solve it?  

Thanks!

Peter Wicher
pjwic...@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.

Re: [R] glm help

2015-08-20 Thread David Winsemius

 On Aug 19, 2015, at 8:54 AM, Joaquín Aldabe joaquin.ald...@gmail.com wrote:
 
 Dear All, I´m running a glm with poisson errors and have a doubt when
 ploting the predicted values. One of my variables has a positive slope in
 the summary output, but when I plot the predicted values on the original
 plot it draws a line with negative slope. I appreciate your comments on
 this and any other aspect of the analysis.
 
 Attached is the script and data in different formats just in case.

The script in .txt format was accepted by the server. The data was apparently 
not in a .txt format, so it was rejected.

You made three plots, so when you reply with data using the correct format 
(which is plain text and generally need to have an extension .txt so that mail 
client will lable as MIME-text) , you should be more specific about which plots 
are not exhibiting the expected features. 

I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was built 
with `cbind` which would create a matrix (probably a character matrix) rather 
than a data frame. I’m wondering you you inadvertently constructed a 
data-object whose structure was different than you imagined? It might have 
gotten coerced back to a dataframe with undesirable concsequences.

— 
David.

 
 Thanks in advanced,
 
 Joaquín.
 
 
 -- 
 *Joaquín Aldabe*
 
 *Grupo Biodiversidad, Ambiente y Sociedad*
 Centro Universitario de la Región Este, Universidad de la República
 Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
 
 *Departamento de Conservación*
 Aves Uruguay
 BirdLife International
 Canelones 1164, Montevideo
 
 https://sites.google.com/site/joaquin.aldabe
 https://sites.google.com/site/perfilprofesionaljoaquinaldabe
 glm forum consult.txt__
 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] glm help

2015-08-20 Thread Bert Gunter
Inline.

Cheers,
Bert
Bert Gunter

Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom.
   -- Clifford Stoll


On Thu, Aug 20, 2015 at 9:06 PM, David Winsemius dwinsem...@comcast.net wrote:

 On Aug 19, 2015, at 8:54 AM, Joaquín Aldabe joaquin.ald...@gmail.com wrote:

 Dear All, I´m running a glm with poisson errors and have a doubt when
 ploting the predicted values. One of my variables has a positive slope in
 the summary output, but when I plot the predicted values on the original
 plot it draws a line with negative slope. I appreciate your comments on
 this and any other aspect of the analysis.

 Attached is the script and data in different formats just in case.

 The script in .txt format was accepted by the server. The data was apparently 
 not in a .txt format, so it was rejected.

 You made three plots, so when you reply with data using the correct format 
 (which is plain text and generally need to have an extension .txt so that 
 mail client will lable as MIME-text) , you should be more specific about 
 which plots are not exhibiting the expected features.

 I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was built 
 with `cbind` which would create a matrix (probably a character matrix) rather 
 than a data frame.

False. There is a data.frame method for cbind that returns a data
frame. Don't know the specifics here, though.

Cheers,
Bert


 I’m wondering you you inadvertently constructed a data-object whose
structure was different than you imagined? It might have gotten
coerced back to a dataframe with undesirable concsequences.

 —
 David.


 Thanks in advanced,

 Joaquín.


 --
 *Joaquín Aldabe*

 *Grupo Biodiversidad, Ambiente y Sociedad*
 Centro Universitario de la Región Este, Universidad de la República
 Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha

 *Departamento de Conservación*
 Aves Uruguay
 BirdLife International
 Canelones 1164, Montevideo

 https://sites.google.com/site/joaquin.aldabe
 https://sites.google.com/site/perfilprofesionaljoaquinaldabe
 glm forum consult.txt__
 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-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] glm help

2015-08-20 Thread Peter Langfelder
On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter bgunter.4...@gmail.com wrote:

 I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was built 
 with `cbind` which would create a matrix (probably a character matrix) 
 rather than a data frame.

 False. There is a data.frame method for cbind that returns a data
 frame. Don't know the specifics here, though.


True, but does not apply here, i.e., David is correct. cbind will
return a data frame if the first argument is a data frame. In the OP
case, the first argument was a vector and hence cbind gives a matrix,
of mode character if any of the inputs were character. Here's a
short demo:

 a = data.frame(a1 = 1:10)
# First argument a data frame, so the results is also a data frame  :
 class(cbind(a, b = 11:20))
[1] data.frame
# First argument is a vector, so the result is a matrix:
 class(cbind(a$a1, b = 11:20))
[1] matrix
 mode(cbind(a$a1, b = 11:20))
[1] numeric
 mode(cbind(a$a1, b = letters[11:20]))
[1] character

Peter

__
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] how to create contour lines on a 3D surface plot by persp3d from rgl package

2015-08-20 Thread Aki Hoji
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

HI, 

I created a 3D surface plot of 2D surface data (generated by kde2d)  by using 
persp3d from rlg as follows;


persp3d(dens3d, theta=50, phi=25, expand=0.75, col=color[zcol], 
ticktype=detailed,axes=TRUE)

 I would like to add contour lines to this 3D surface plot and I’d appreciate 
if any help on this.  

Thanks in advance.  

AH


-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iF4EAREKAAYFAlXWRJMACgkQOpsV3h2pS5ooEgEAkqV5YhvJtT7k3ieSToWGEQLu
5YJw4myWd854/gY9/EIBAIGDCITrrrUj2HX4ztUtykNmxodyeZRqHcwLp53L59a9
=G6Sx
-END PGP SIGNATURE-

__
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] CFI fit measure for EFA in semTools

2015-08-20 Thread Fritzsche, Eva
Hi @ all,

i am trying to get fitMeasures (CFI) for an Exploratory Factor Analysis using R 
and I am still not able for the rotated version.
I applied the package semTools
My code is as follows:

unrot01 - efaUnrotate(rszK2[ , 73:93], nf=3, start=F)
summary(unrot01)
fitMeasures(unrot01)  # for the unrotated solution I get all fit measures

rot01 - oblqRotate(unrot01, method= oblimin)
summary(rot01, fit.measures=T)
# returns Error in .local(object, ...) : unused argument (fit.measures = TRUE)

I guess the problem might be that oblqRotate doesn't return something like 
lavaan-Output, but something Formal class EFA.
Right?
I would be very happy about any suggestions!
Thank you very much!

Eva



---
Dr. Eva S. Fritzsche
Postanschrift:
Technische Universit�t M�nchen
TUM School of Education | Lehrstuhl f�r Schulp�dagogik
Arcisstr. 21 | 80333 M�nchen
Besucheranschrift:
TUM School of Education | Marsstr. 20 - 22 | 80335 M�nchen
Raumnr. 274 | Tel. +49.89.289.25106
eva.fritzs...@tum.demailto:eva.fritzs...@tum.de | 
www.schulpaed.edu.tum.dehttp://www.edu.tum.de/


[[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] CFI fit measure for EFA in semTools

2015-08-20 Thread Bert Gunter
ummm Have you tried reading the documentation for the summary
method for the object returned by oblqRotate? It will tell you what
its arguments should be.

If you don't know what this means, then you need to go through an R
tutorial to learn about (S3 or S4, don't know which) methods in R.

Cheers,
Bert
Bert Gunter

Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom.
   -- Clifford Stoll


On Thu, Aug 20, 2015 at 8:12 AM, Fritzsche, Eva eva.fritzs...@tum.de wrote:
 Hi @ all,

 i am trying to get fitMeasures (CFI) for an Exploratory Factor Analysis using 
 R and I am still not able for the rotated version.
 I applied the package semTools
 My code is as follows:

 unrot01 - efaUnrotate(rszK2[ , 73:93], nf=3, start=F)
 summary(unrot01)
 fitMeasures(unrot01)  # for the unrotated solution I get all fit measures

 rot01 - oblqRotate(unrot01, method= oblimin)
 summary(rot01, fit.measures=T)
 # returns Error in .local(object, ...) : unused argument (fit.measures = 
 TRUE)

 I guess the problem might be that oblqRotate doesn't return something like 
 lavaan-Output, but something Formal class EFA.
 Right?
 I would be very happy about any suggestions!
 Thank you very much!

 Eva



 ---
 Dr. Eva S. Fritzsche
 Postanschrift:
 Technische Universität München
 TUM School of Education | Lehrstuhl für Schulpädagogik
 Arcisstr. 21 | 80333 München
 Besucheranschrift:
 TUM School of Education | Marsstr. 20 - 22 | 80335 München
 Raumnr. 274 | Tel. +49.89.289.25106
 eva.fritzs...@tum.demailto:eva.fritzs...@tum.de | 
 www.schulpaed.edu.tum.dehttp://www.edu.tum.de/


 [[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-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] Newbie question: error message with install.packages

2015-08-20 Thread Peter Wicher
Many thanks.

Yes, I am using the R.app GUI:
[R.app GUI 1.66 (6996) x86_64-apple-darwin13.4.0]


At startup,

 getOption(repos)
CRAN
@CRAN@

Then when attempting again to install RWeka I'm able to select the mirror,
and after that the result is the same as yours:

 getOption(repos)
   CRAN
https://cran.cnr.Berkeley.edu;

Unfortunately the same error message happens with install.packages, for
example:
 install.packages(err)
Error: Line starting '!DOCTYPE HTML PUBLI ...' is malformed!

I've confirmed that Java 8 update 60 is correctly loaded.

Interestingly I've loaded R on my Windows machine and this error message
doesn't happen, the packages load properly.

Peter

On Wed, Aug 19, 2015 at 11:17 PM, David Winsemius dwinsem...@comcast.net
wrote:


  On Aug 19, 2015, at 9:13 PM, Peter Wicher pjwic...@gmail.com wrote:
 
  Hi,
 
  I’m starting to work my way through “Machine Learning With R” by Brett
 Lantz.
 
  Running on Mac OS X 10.10.4
 
  I’ve downloaded and installed R and the R Console comes up fine.
 
  Whenever I use the install.packages command, regardless of the package I
 get the same error message:
 
  install.packages (RWeka)
  Error: Line starting '!DOCTYPE HTML PUBLI ...' is malformed!
 
  Any idea of what is wrong and how to solve it?

 Not sure. Have never gotten that error message, and I do use OS X 10.10.3
 as well as having very recently updated to R 3.2.2.

 Are you using the R.app GUI?

 If so … What do you see when you look at Preference/Startup for the
 default CRAN repository?

 If not … What do you see when you run:

 getOption(repos”)

 I get:

   CRAN
 http://cran.cnr.Berkeley.edu;


 
  Thanks!
 
  Peter Wicher
  pjwic...@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.



[[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] Newbie question: error message with install.packages

2015-08-20 Thread Peter Langfelder
From an older post by Uwe Ligges:

Anyway: R tried to download the package but got an html page, obviously,
hence either the mirror you are using is corrupted or someone in between
(like some proxy?) delivers html pages rather than packages...


In other words, check your proxy/internet settings, or perhaps try a
different mirror.

Peter


On Thu, Aug 20, 2015 at 10:09 AM, Peter Wicher pjwic...@gmail.com wrote:
 Many thanks.

 Yes, I am using the R.app GUI:
 [R.app GUI 1.66 (6996) x86_64-apple-darwin13.4.0]


 At startup,

 getOption(repos)
 CRAN
 @CRAN@

 Then when attempting again to install RWeka I'm able to select the mirror,
 and after that the result is the same as yours:

 getOption(repos)
CRAN
 https://cran.cnr.Berkeley.edu;

 Unfortunately the same error message happens with install.packages, for
 example:
 install.packages(err)
 Error: Line starting '!DOCTYPE HTML PUBLI ...' is malformed!

 I've confirmed that Java 8 update 60 is correctly loaded.

 Interestingly I've loaded R on my Windows machine and this error message
 doesn't happen, the packages load properly.

 Peter

 On Wed, Aug 19, 2015 at 11:17 PM, David Winsemius dwinsem...@comcast.net
 wrote:


  On Aug 19, 2015, at 9:13 PM, Peter Wicher pjwic...@gmail.com wrote:
 
  Hi,
 
  I’m starting to work my way through “Machine Learning With R” by Brett
 Lantz.
 
  Running on Mac OS X 10.10.4
 
  I’ve downloaded and installed R and the R Console comes up fine.
 
  Whenever I use the install.packages command, regardless of the package I
 get the same error message:
 
  install.packages (RWeka)
  Error: Line starting '!DOCTYPE HTML PUBLI ...' is malformed!
 
  Any idea of what is wrong and how to solve it?

 Not sure. Have never gotten that error message, and I do use OS X 10.10.3
 as well as having very recently updated to R 3.2.2.

 Are you using the R.app GUI?

 If so … What do you see when you look at Preference/Startup for the
 default CRAN repository?

 If not … What do you see when you run:

 getOption(repos”)

 I get:

   CRAN
 http://cran.cnr.Berkeley.edu;


 
  Thanks!
 
  Peter Wicher
  pjwic...@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.



 [[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-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] Running R in Server

2015-08-20 Thread Loris Bennett
Swagato Chatterjee swagato1...@gmail.com writes:

 *@Loris: However, you'll probably have to make sure that all the packages
 you*
 *need are installed on the server.*

 This is where I need a help.​

Presumably the program 'cron' will be used to run your script.  If the
program is run as root, you will have to ask the admin of the server to
install the packages you need.  If you have a cron entry for your user
on the server, you can simply start R and install the packages in your
home directory with

install.packages(c(pkg1, pkg2))

Note that this could fail if your server is behind a firewall and unable
to access a CRAN mirror.

HTH

Loris
-- 
This signature is currently under construction.

__
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] Output In R

2015-08-20 Thread S Ellison
 I have already tried options(max.print=99) but does not show the desired
 result.
 As posted above it want to share the outcome with the business owner where
 there could be multiple entries.

Then just print the multiple entries. See ?duplicated for finding them

Otherwise, use things like 
 head(tail(d, 9), 30) 
or
 d[1:100030, ]
to print 30 lines at a time.







***
This email and any attachments are confidential. Any use...{{dropped:8}}

__
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] how to create contour lines on a 3D surface plot by persp3d from rgl package

2015-08-20 Thread Duncan Murdoch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 20/08/2015 5:20 PM, Aki Hoji wrote:
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA512
 
 HI,
 
 I created a 3D surface plot of 2D surface data (generated by kde2d)
 by using persp3d from rlg as follows;
 
 
 persp3d(dens3d, theta=50, phi=25, expand=0.75, col=color[zcol],
 ticktype=detailed,axes=TRUE)
 
 I would like to add contour lines to this 3D surface plot and I’d
 appreciate if any help on this.
 
 Thanks in advance.

Use the contourLines() function to compute them, then plot them using
lines3d.

The difficulty is that they may be hidden by the surface.  The
simplest way around that is to make the surface have partial
transparency.  If you don't want to do that, plotting the lines first
will

For example:

f - function(x, y) x^2 + y^2
x - seq(-2, 2, len=50)
y - seq(-2, 2, len=50)
z - outer(x,y,f)
persp3d(x,y,z, col=red,alpha=0.5)
lines - contourLines(x, y, z)
for (i in seq_along(lines)) {
  x - lines[[i]]$x
  y - lines[[i]]$y
  z - rep(lines[[i]]$level, length(x))
  lines3d(x, y, z)
}


Duncan Murdoch
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJV1lUUAAoJEHE2Kz23YMZyVxUH/jmOwREkGy045EcbnkXCfARE
bSS7H2/kzbU5jY+vavrIDRveCQo2eYJr7yigF8HMiiRZqRqF7nEg+tt5yuQHwc4L
fYYldU4ZHohS+AQg/u21qD8Skln7+1d1D5yZj6DQqY8hU5duWdcErdNgoDt268+i
u0hsBAZDhDEBNh6+5IIGI5CF3utqS7ufJb8aEKrSDfZV5fDqSYGxRpNlYcI1Ou+n
SRoQi5jJ2FOBlSlYC3wg5ZjT5FiV7QqoymKFiUMKYz0eUWqoPkPiQDVKi054Qlim
xRyHUsaGN31Jc2817+kmjWnL7K5MFFbg/BLlLtijg5bmM9dZo/wYJ0MU6Pu8CVA=
=Sn3R
-END PGP SIGNATURE-

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