[R] trouble with Rmpi and a new version of R on Windows.

2017-07-25 Thread Erin Hodgess
I want to put version R-3.4.1 on my Windows desktop in the office.  I have
had other versions of R on that computer and used Rmpi on them.  I deleted
all of the versions, deleted all of the directories, however, when I try to
start R (3.4.1), I get  Rmpi not found.  Can't start R.

Has anyone seen this, please?

Thanks,
Erin




-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Using nls.lm to fit a non-continuous dates range

2017-07-25 Thread Ahmed Attia
Dear  R users,

Can I fit nls.lm to a non-continuous date data. looked at previous
examples but still not able to fit the model to my data. There are 25
rows of observations as below;

df <- data.frame(Date=as.Date(rownames(df),'%m/%d/%Y'),Y=df$height)
df$days <- as.numeric(df$Date - df[1,]$Date)
head(df)
 Date Y days
1 2009-12-01 0.26312500
2 2010-01-08 0.4436012   38
3 2010-02-04 0.7151786   65
4 2010-03-03 1.1379762   92
5 2010-04-05 1.7986866  125
6 2010-05-04 2.2982635  154

The following code, tried different values of the list, did not work.

f <- function(parS, xx) {parS$a + parS$b*log(parS$tc - xx)}
 resids <- function(p, observed, xx) {df$Y - f(p,xx)}
 nls.out <- nls.lm(par=list(a=1,b=-0.001,tc=25), fn = resids,
  observed = df$Y, xx = df$days)

and the following error is always produced.

Warning messages:
1: In log(parS$c - xx) : NaNs produced
2: In log(parS$c - xx) : NaNs produced
3: In log(parS$c - xx) : NaNs produced
4: In log(parS$c - xx) : NaNs produced
5: In log(parS$c - xx) : NaNs produced

then the nls.out should integrated in nls.final as proposed by jlhoward

# use output of L-M algorithm as starting estimates in nls(...)
par <- nls.out$par
nls.final <- nls(Y~a+b*log(tc-days),data=df,
 start=c(a=par$a, b=par$b, tc=par$tc))

summary(nls.final)  # display statistics of the fit
# append fitted values to df
df$pred <- predict(nls.final)

Also attempting to fit a selfstart model

a_start<-8
b_start<-2*log(2)/a_start
m<-nls(df$Y~a*exp(-b*df$days),start=list(a=a_start,b=b_start))
Error in nls(df$Y ~ a * exp(-b * df$days), start = list(a = a_start, b
= b_start)) :
  parameters without starting value in 'data': Y, days

Could you please help

Thank you

Ahmed Attia, Ph.D.
Agronomist & Soil Scientist

__
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] To Supporting graphpad prism in R, add external library to poratbleR

2017-07-25 Thread Ashish Ranjan
Hi Jeff,

1). I have tried install.packages( c("dplyr", "tidyr" ) ) into the r-script
file got below error:-

> install.packages( c("dplyr", "tidyr" ) )
Installing packages into
‘/tmp/1776492876238396447/lib/portableR-master/site-library’
(as ‘lib’ is unspecified)
Error in install.packages(c("dplyr", "tidyr")) :
  This version of R is not set up to install source packages
If it was installed from an RPM, you may need the R-devel RPM
Execution halted

2). I have also tried these steps in R-console (install.packages(
c("dplyr", "tidyr" ) )), able to install these library into linux based R
machine. after that tried to copy the lib folder to my portable R site
library folder got the various error but i have resolved many now getting
below error which unable to resolve

Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/tmp/3971881046757600243/lib/portableR-master/site-library/Rcpp/libs/Rcpp.so':
  /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required
by
/tmp/3971881046757600243/lib/portableR-master/site-library/Rcpp/libs/Rcpp.so)
Error: package or namespace load failed for ‘dplyr’
Execution halted


Thanks
Ashish Ranjan



On Tue, Jul 25, 2017 at 7:09 PM, Jeff Newmiller 
wrote:

> 1) Definitely yes. They are on CRAN. Just type
>
> install.packages( c("dplyr", "tidyr" ) )
>
> at the R console.
>
> 2) Don't know, but most likely the answer is yes. Since all R packages on
> Linux are compiled by R when installed, you either need to activate your
> virtual machine, compile the packages, and save the state for future use,
> or you have to build the package library on another compatible architecture
> and copy the library into the VM image. I suggest you read the portableR
> documentation and the R Installation and Administration manual.
> --
> Sent from my phone. Please excuse my brevity.
>
> On July 25, 2017 3:43:11 AM PDT, Ashish Ranjan 
> wrote:
> >Hi Team,
> >
> >Please suggest me on below :-
> >
> >1).are There any linux based library for dplyr and tidyr? I could find
> >these r-libraries for windows and Mac but not for linux. 2). is it
> >possible
> >to add external library to portableR
> >zip(http://nafiux.github.io/portableR/)
> >file if yes then how to add external library to poratbleR zip file?
> >
> >In our application AWS lambda invoking the R-script by using portableR
> >zip
> >file.we want to add new external dplyr library to this poratbleR zip
> >file.
> >
> >
> >Thanks
> >
> >Ashish Ranjan
> >
> >   [[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.
>

[[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] To Supporting graphpad prism in R, add external library to poratbleR

2017-07-25 Thread Jeff Newmiller
I really don't know about this special-purpose distribution of R... you should 
probably contact the developer. 

From the error, I wonder whether you followed the instructions on the portableR 
 web page link that you quoted. Do you have the directories referred to there 
in place? 
-- 
Sent from my phone. Please excuse my brevity.

On July 25, 2017 7:27:31 AM PDT, Ashish Ranjan  wrote:
>Hi Jeff,
>
>1). I have tried install.packages( c("dplyr", "tidyr" ) ) into the
>r-script
>file got below error:-
>
>> install.packages( c("dplyr", "tidyr" ) )
>Installing packages into
>‘/tmp/1776492876238396447/lib/portableR-master/site-library’
>(as ‘lib’ is unspecified)
>Error in install.packages(c("dplyr", "tidyr")) :
>  This version of R is not set up to install source packages
>If it was installed from an RPM, you may need the R-devel RPM
>Execution halted
>
>2). I have also tried these steps in R-console (install.packages(
>c("dplyr", "tidyr" ) )), able to install these library into linux based
>R
>machine. after that tried to copy the lib folder to my portable R site
>library folder got the various error but i have resolved many now
>getting
>below error which unable to resolve
>
>Error in dyn.load(file, DLLpath = DLLpath, ...) :
>  unable to load shared object
>'/tmp/3971881046757600243/lib/portableR-master/site-library/Rcpp/libs/Rcpp.so':
>/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required
>by
>/tmp/3971881046757600243/lib/portableR-master/site-library/Rcpp/libs/Rcpp.so)
>Error: package or namespace load failed for ‘dplyr’
>Execution halted
>
>
>Thanks
>Ashish Ranjan
>
>
>
>On Tue, Jul 25, 2017 at 7:09 PM, Jeff Newmiller
>
>wrote:
>
>> 1) Definitely yes. They are on CRAN. Just type
>>
>> install.packages( c("dplyr", "tidyr" ) )
>>
>> at the R console.
>>
>> 2) Don't know, but most likely the answer is yes. Since all R
>packages on
>> Linux are compiled by R when installed, you either need to activate
>your
>> virtual machine, compile the packages, and save the state for future
>use,
>> or you have to build the package library on another compatible
>architecture
>> and copy the library into the VM image. I suggest you read the
>portableR
>> documentation and the R Installation and Administration manual.
>> --
>> Sent from my phone. Please excuse my brevity.
>>
>> On July 25, 2017 3:43:11 AM PDT, Ashish Ranjan
>
>> wrote:
>> >Hi Team,
>> >
>> >Please suggest me on below :-
>> >
>> >1).are There any linux based library for dplyr and tidyr? I could
>find
>> >these r-libraries for windows and Mac but not for linux. 2). is it
>> >possible
>> >to add external library to portableR
>> >zip(http://nafiux.github.io/portableR/)
>> >file if yes then how to add external library to poratbleR zip file?
>> >
>> >In our application AWS lambda invoking the R-script by using
>portableR
>> >zip
>> >file.we want to add new external dplyr library to this poratbleR zip
>> >file.
>> >
>> >
>> >Thanks
>> >
>> >Ashish Ranjan
>> >
>> >   [[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] To Supporting graphpad prism in R, add external library to poratbleR

2017-07-25 Thread Jeff Newmiller
1) Definitely yes. They are on CRAN. Just type

install.packages( c("dplyr", "tidyr" ) )

at the R console.

2) Don't know, but most likely the answer is yes. Since all R packages on Linux 
are compiled by R when installed, you either need to activate your virtual 
machine, compile the packages, and save the state for future use, or you have 
to build the package library on another compatible architecture and copy the 
library into the VM image. I suggest you read the portableR documentation and 
the R Installation and Administration manual. 
-- 
Sent from my phone. Please excuse my brevity.

On July 25, 2017 3:43:11 AM PDT, Ashish Ranjan  wrote:
>Hi Team,
>
>Please suggest me on below :-
>
>1).are There any linux based library for dplyr and tidyr? I could find
>these r-libraries for windows and Mac but not for linux. 2). is it
>possible
>to add external library to portableR
>zip(http://nafiux.github.io/portableR/)
>file if yes then how to add external library to poratbleR zip file?
>
>In our application AWS lambda invoking the R-script by using portableR
>zip
>file.we want to add new external dplyr library to this poratbleR zip
>file.
>
>
>Thanks
>
>Ashish Ranjan
>
>   [[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.


[R-es] Un correo sobre R

2017-07-25 Thread Javier Marcuzzi
Estimados

Comparto un correo electrónico sobre R, lo interesante es la enumeración de 
algunas herramientas disponibles, lógicamente cada uno es libre de utilizar lo 
que crea conveniente.

https://www.infoq.com/podcasts/martin-hadley-r-ecosystem?utm_source=infoqWeeklyNewsletter_medium=WeeklyNL_EditorialContent_podcasts_campaign=07252017news_content=other


Javier Rubén Marcuzzi


[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] Loading Rcmdr

2017-07-25 Thread Fox, John
Dear Jack,

There's not enough information here to know what the problem might be. Please 
see < https://www.r-project.org/help.html>, in particular the section on asking 
for help, and follow the link to the posting guide.

At a minimum, explain what you did and what happened. It's generally 
informative to provide the results of Sys.info() and sessionInfo() .

Best,
 John

-
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: socserv.mcmaster.ca/jfox



> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jack Talley
> Sent: Monday, July 24, 2017 7:17 PM
> To: r-help@r-project.org
> Subject: [R] Loading Rcmdr
> 
> With the lastest version of R 3.4.1 I have not been able to loard Rcmdr.
> Advice please.
> 
> Thank you,
> 
> Jack Talley, PhD
> 
>   [[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.


[R] To Supporting graphpad prism in R, add external library to poratbleR

2017-07-25 Thread Ashish Ranjan
Hi Team,

Please suggest me on below :-

1).are There any linux based library for dplyr and tidyr? I could find
these r-libraries for windows and Mac but not for linux. 2). is it possible
to add external library to portableR zip(http://nafiux.github.io/portableR/)
file if yes then how to add external library to poratbleR zip file?

In our application AWS lambda invoking the R-script by using portableR zip
file.we want to add new external dplyr library to this poratbleR zip file.


Thanks

Ashish Ranjan

[[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-es] Problema con shiny en Fedora

2017-07-25 Thread Guillermo.Vinue
Hola Freddy,

Muchas gracias por la respuesta. Lo he probado y no ha funcionado. Una vez 
ejecutado update.packages(ask = FALSE, checkBuilt = TRUE)​, cuando entro en R 
desde la terminal con: 
$ sudo R 

y ejecuto la app:

> library(shiny)
> runExample("01_hello")

me aparece el mensaje de error que adjunto en un txt.

En cambio, cuando entro en R desde la terminal simplemente con:
$ R 
sí que me aparece la aplicación de 01_hello y funciona bien.

Viendo el mensaje de error, he probado a poner google-chrome como servidor por 
defecto (en lugar de firefox), pero entrando con $ sudo R la app sigue sin 
abrirse y entrando con $ R sí que se sigue abriendo, es decir, la app se abre 
en el servidor que esté definido por defecto, que es como debería ser, tanto 
entrando con $ sudo R como desde RStudio, donde tampoco se abre.

He mirado si es un problema de las librerías y RStudio y R sin ser root tienen 
las mismas:

$ sudo R
> libPaths()
[1] "/usr/lib64/R/library" 
[2] "/usr/share/R/library"

$ R
> libPaths()
[1] "/home/guillevinue/R/x86_64-redhat-linux-gnu-library/3.4"
[2] "/usr/lib64/R/library"   
[3] "/usr/share/R/library" 

En RStudio:
> .libPaths()
[1] "/home/guillevinue/R/x86_64-redhat-linux-gnu-library/3.4"
[2] "/usr/lib64/R/library"   
[3] "/usr/share/R/library" 

¿Alguna posible sugerencia?

Saludos,

Guillermo

> ​Hola Guillermo.
> ​
> 
> "Reinstalling packages with the new version of R" dice "The following code
> > should be run as root after upgrading R on Linux". Esto podría ser una
> > solución pero ciertamente no sé cómo hacerlo porque en la terminal:
> > $ sudo update.packages(ask = FALSE, checkBuilt = TRUE)
> > no se puede ejecutar.
> >
> 
> ​¿Servirá escribir desde la terminal
> 
> sudo R​
> >
> 
> ​ingresar la contraseña y luego actualizar con
> 
> update.packages(ask = FALSE, checkBuilt = TRUE)​
> 
> 
> ?
> 
> ​Haznos saber.
> 
> ¡Salud!​
> 
> -- 
> «Pídeles sus títulos a los que te persiguen, pregúntales
> cuándo nacieron, diles que te demuestren su existencia.»
> 
> Rafael Cadenas
> 

> library(shiny)
> runExample("01_hello")

Listening on http://127.0.0.1:6671
No protocol specified
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0
/usr/bin/xdg-open: line 832: x-www-browser: command not found
No protocol specified
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0
/usr/bin/xdg-open: line 832: iceweasel: command not found
/usr/bin/xdg-open: line 832: seamonkey: command not found
/usr/bin/xdg-open: line 832: mozilla: command not found
No protocol specified
Unable to init server: Could not connect: Connection refused
Failed to parse arguments: Cannot open display: 
/usr/bin/xdg-open: line 832: konqueror: command not found
/usr/bin/xdg-open: line 832: chromium-browser: command not found
No protocol specified

(google-chrome:3239): Gtk-WARNING **: cannot open display: :0
/usr/bin/xdg-open: line 832: www-browser: command not found
/usr/bin/xdg-open: line 832: links2: command not found
/usr/bin/xdg-open: line 832: elinks: command not found
/usr/bin/xdg-open: line 832: links: command not found
/usr/bin/xdg-open: line 832: lynx: command not found
/usr/bin/xdg-open: line 832: w3m: command not found
xdg-open: no method available for opening 'http://127.0.0.1:6671'


___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R-es] Problema con shiny en Fedora

2017-07-25 Thread Freddy Omar López Quintero
​Hola Guillermo.
​

"Reinstalling packages with the new version of R" dice "The following code
> should be run as root after upgrading R on Linux". Esto podría ser una
> solución pero ciertamente no sé cómo hacerlo porque en la terminal:
> $ sudo update.packages(ask = FALSE, checkBuilt = TRUE)
> no se puede ejecutar.
>

​¿Servirá escribir desde la terminal

sudo R​
>

​ingresar la contraseña y luego actualizar con

update.packages(ask = FALSE, checkBuilt = TRUE)​


?

​Haznos saber.

¡Salud!​

-- 
«Pídeles sus títulos a los que te persiguen, pregúntales
cuándo nacieron, diles que te demuestren su existencia.»

Rafael Cadenas

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R] axis() after image.plot() does not work except if points() is inserted between

2017-07-25 Thread Martin Maechler
> Marc Girondot via R-help 
> on Mon, 24 Jul 2017 09:35:06 +0200 writes:

> Thanks for the proposition. As you see bellow, par("usr") is the same 
> before and after the points() (the full code is bellow):
> 
>> par("usr")
> [1] -0.250  1.250 -0.167  1.167
>> # if you remove this points() function, axis will show nothing.
>> 
>> points(1.5, 1.5, type="p")
>> p2 <- par(no.readonly=TRUE)
>> par("usr")
> [1] -0.250  1.250 -0.167  1.167
> ...

> I can reproduce it in Ubuntu and MacosX R Gui and Rstudio (R 3.4.1).

> Marc

> Here is the code:
> library(fields)
> par(mar=c(5,4.5,4,7))
> D <- matrix(c(10, 20, 25, 30, 12, 22, 32, 35, 13, 25, 38, 40), nrow=3)

> p0 <- par(no.readonly=TRUE)
> image.plot(D, col=rev(heat.colors(128)),bty="n", xlab="Lines",
>   ylab="Columns", cex.lab = 0.5, 
>   zlim=c(min(D, na.rm=TRUE),max(D, na.rm=TRUE)),
>   las=1, axes=FALSE)
> p1 <- par(no.readonly=TRUE)

> par("usr")
> par("xpd")

> # if you remove this points() function, axis will show nothing.

> points(1.5, 1.5, type="p")
> p2 <- par(no.readonly=TRUE)
> par("usr")
> par("xpd")

> ##
> axis(1, at=seq(from=0, to=1, length=nrow(D)), labels=0:2, cex.axis=0.5)
> axis(2, at=seq(from=0, to=1, length=ncol(D)), labels=0:3, las=1,
> cex.axis=0.5)

> identical(p1, p2)

Have you ever carefully read the detailed help page about image.plot()?
   
I haven't, but a cursory reading already shows me that the
author of the function did this partly on purpose:

  > Side Effects:
  > 
  >  After exiting, the plotting region may be changed to make it
  >  possible to add more features to the plot. To be explicit,
  >  ‘par()\$plt’ may be changed to reflect a smaller plotting region
  >  that has accommodated room for the legend subplot.

Unfortunately, there it does _not_ mention the following :

From looking at its code, and then re-reading parts of the help page,
I see that there is a 'graphics.reset' argument which you can
set to TRUE in such a case:

 image.plot(D, col=rev(heat.colors(128)),bty="n", xlab="Lines",
   ylab="Columns", cex.lab = 0.5, 
   zlim= range(D, na.rm=TRUE),
   graphics.reset = TRUE, # < the solution
   las=1, axes=FALSE)

Also note that
 zlim = range(D ...)
is infinitely more elegant than
 zlim = c(min((D, ...), max(D, ...)))


Martin Maechler
ETH Zurich (and R core)

__
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] Precision of values > 53 bits

2017-07-25 Thread peter dalgaard
This got revived by a long-standing bug in Mail.app on Mac: If you sort mails 
newest-last, it may unpredictably scroll back, often by several years. If you 
happen to have a large mailbox with some old unread mails in it, say from a 
mailing list, and don't pay attention to the date

-pd
 
> On 25 Jul 2017, at 07:25 , Jeff Newmiller  wrote:
> 
> What an impressively zombified thread. Though wondering how 53 bits were 
> supposed to fit into 32 might just warrant revivification.
> -- 
> Sent from my phone. Please excuse my brevity.
> 
> On July 20, 2017 5:33:34 AM PDT, peter dalgaard  wrote:
>> 
>>> On 10 Jan 2013, at 15:56 , S Ellison  wrote:
>>> 
>>> 
>>> 
 I am working with large numbers and identified that R looses 
 precision for such high numbers.
>>> Yes. R uses standard 32-bit double precision.
>> 
>> 
>> Well, for large values of 32... such as 64.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
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-es] Problema con shiny en Fedora

2017-07-25 Thread Guillermo.Vinue
Hola,

He actualizado las versiones con las que trabajo de Fedora, R y RStudio y shiny 
me ha dejado de funcionar. Cuando ejecuto simplemente:

library(shiny)
runExample("01_hello")

RStudio se cierra. He buscado en google con cosas similares a "Rstudio crashes 
shiny linux" y no me ha funcionado ninguna de las sugerencias que he 
encontrado. Tengo actualizados todos los paquetes. En este link:

https://shiny.rstudio.com/articles/upgrade-R.html

en el apartado "Reinstalling packages with the new version of R" dice "The 
following code should be run as root after upgrading R on Linux". Esto podría 
ser una solución pero ciertamente no sé cómo hacerlo porque en la terminal:
$ sudo update.packages(ask = FALSE, checkBuilt = TRUE)
no se puede ejecutar. 

Estos son los datos de las versiones con las que trabajo: ¿Alguien ha tenido un 
problema similar y sabe cómo resolverlo? Muchas gracias.

> RStudio.Version()
$mode
[1] "desktop"

$version
[1] ‘1.0.153’

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 26 (Workstation Edition)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
[1] LC_CTYPE=en_US.UTF-8LC_NUMERIC=C   LC_TIME=en_US.UTF-8   
[4] LC_COLLATE=en_US.UTF-8  LC_MONETARY=en_US.UTF-8   LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=en_US.UTF-8LC_NAME=C   LC_ADDRESS=C  
[10] LC_TELEPHONE=C 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] compiler_3.4.1 tools_3.4.1 

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R] Ifelse statements and combining columns

2017-07-25 Thread PIKAL Petr
Hi

I may be completely wrong, but if your data was factor you could easily change 
its levels without any ifelse stuff.

Some sample data
> dat<-factor(paste("cond", sample(1:7, 20, replace=T), sep=""))
> dat
 [1] cond2 cond1 cond7 cond5 cond7 cond7 cond3 cond4 cond2 cond4 cond2 cond2
[13] cond6 cond2 cond3 cond6 cond2 cond4 cond6 cond4
Levels: cond1 cond2 cond3 cond4 cond5 cond6 cond7

Changing levels
> levels(dat)<- c(rep("uniform", 4), rep("BiasedLow",2), rep("BisaedHigh", 2))
> dat
 [1] uniformuniformBisaedHigh BiasedLow  BisaedHigh BisaedHigh
 [7] uniformuniformuniformuniformuniformuniform
[13] BiasedLow  uniformuniformBiasedLow  uniformuniform
[19] BiasedLow  uniform
Levels: uniform BiasedLow BisaedHigh

Cheers
Petr


> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kirsten
> Morehouse
> Sent: Monday, July 24, 2017 2:24 PM
> To: R-help 
> Subject: [R] Ifelse statements and combining columns
>
> Hi everyone,
>
> I'm having some trouble with my ifelse statements.
>
> I'm trying to put 12 conditions within 3 groups. Here is the code I have so
> far:
>
> dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2"  |
> dat$cond == "cond3" dat$cond == "cond4"
>yes = "Uniform"
>no = ifelse(test = dat$cond == "cond5" | dat$cond ==
> "cond6") | dat$cond == "cond7" dat$cond == "cond8"
>yes = "Biased Low"
>no = "Biased High" )
>
>
> I keep getting an error statement about an invalid ). I've tried several
> permutations to fix, but without luck.
>
> Also, can anyone help me bind columns together? I've tried:
>
>  cbind[, c(15:25)] but get the error:  object of type 'closure' is not 
> subsettable
>
> Thank you in advance!
>
> Kirsten
>
>   [[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.


Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny 
pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně 
jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze 
svého systému.
Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email 
jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či 
zpožděním přenosu e-mailu.

V případě, že je tento e-mail součástí obchodního jednání:
- vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a 
to z jakéhokoliv důvodu i bez uvedení důvodu.
- a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; 
Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce 
s dodatkem či odchylkou.
- trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným 
dosažením shody na všech jejích náležitostech.
- odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost 
žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně 
pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně 
osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi 
či osobě jím zastoupené známá.

This e-mail and any documents attached to it may be confidential and are 
intended only for its intended recipients.
If you received this e-mail by mistake, please immediately inform its sender. 
Delete the contents of this e-mail with all attachments and its copies from 
your system.
If you are not the intended recipient of this e-mail, you are not authorized to 
use, disseminate, copy or disclose this e-mail in any manner.
The sender of this e-mail shall not be liable for any possible damage caused by 
modifications of the e-mail or by delay with transfer of the email.

In case that this e-mail forms part of business dealings:
- the sender reserves the right to end negotiations about entering into a 
contract in any time, for any reason, and without stating any reasoning.
- if the e-mail contains an offer, the recipient is entitled to immediately 
accept such offer; The sender of this e-mail (offer) excludes any acceptance of 
the offer on the part of the recipient containing any amendment or variation.
- the sender insists on that the respective contract is concluded only upon an 
express mutual agreement on all its aspects.
- the sender of this e-mail informs that he/she is not authorized to enter into 
any contracts on behalf of the company except for cases in which he/she is 
expressly authorized to do so in writing, and such authorization or power of 
attorney is