Re: [ESS] Trouble evaluating in namespace

2018-12-20 Thread Kevin Wright via ESS-help
Got it, thanks.

On Sat, Dec 8, 2018 at 6:02 AM Vitalie Spinu  wrote:

>
> You cannot evaluate your input line by line inside a package. The entire
> function should be sent at once. Use C-c C-c instead.
>
> The current doc string of `ess-eval-region-or-line-visibly-and-step` says:
>
>   Note that when inside a package and namespaced evaluation is in place
> (see
>   ‘ess-r-set-evaluation-env’) evaluation of multiline input will fail.
>
> >> On Thu, Dec 06 2018 16:07, Kevin Wright via ESS-help wrote:
>
> >  (ess-inject-source nil)
>
> Not the best idea. At least for functions you would like to have source
> references on errors. There is really no benefits at all for changing the
> default to nil.
>
>   Vitalie
>
>

-- 
Kevin Wright

[[alternative HTML version deleted]]

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [R] Reformatting output of Forecasts generated by mlp model

2018-12-20 Thread Bert Gunter
The printed output you have shown is meaningless (and maybe mangled, since
you posted in HTML): it is the result of a call to a print method for the
forecast object. You need to examine that object (e.g. via str()) and/or
the print method to see how to extract the data you want in whatever form
you want them. If these remarks don't make sense to you, I suggest you
spend some time with an R tutorial or two to learn about (S3, I assume)
objects and methods and how R uses these for printing output. The important
point is: what you see in printed output may not at "look like" the
structure of the object from which the output is obtained.

You have also failed to tell us what package(s) you are using, which is
part of the requested minimal info. There appear to be at least two that
seem relevant.

Cheers,
Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Dec 20, 2018 at 7:12 AM Paul Bernal  wrote:

> Dear friends,
>
> Hope you are doing great. I am using the multiple layer perceptron model
> (provided in R´s mlp() function for time series forecasting, but I don´t
> know how to reformat the output forecasts generated.
>
> mydata <- dput(datframe$Transits)
>
> > dput(datframe$Transits)
> c(77L, 75L, 85L, 74L, 73L, 96L, 82L, 90L, 91L, 81L, 81L, 77L,
> 84L, 81L, 82L, 86L, 81L, 81L, 83L, 88L, 88L, 92L, 97L, 89L, 96L,
> 94L, 94L, 95L, 92L, 94L, 95L, 95L, 87L, 102L, 94L, 91L, 93L,
> 86L, 96L, 85L, 81L, 84L, 88L, 91L, 89L, 89L, 93L, 83L, 92L, 92L,
> 76L, 98L, 80L, 95L, 89L, 92L, 96L, 86L, 98L, 84L, 90L, 95L, 90L,
> 99L, 85L, 91L, 90L, 88L, 97L, 93L, 97L, 87L, 92L, 87L, 86L, 85L,
> 82L, 90L, 89L, 101L, 94L, 92L, 109L, 101L, 103L, 96L, 89L, 102L,
> 87L, 101L, 100L, 99L, 101L, 98L, 101L, 90L, 106L, 90L, 99L, 105L,
> 91L, 96L, 91L, 96L, 93L, 101L, 105L, 98L, 110L, 100L, 101L, 106L,
> 99L, 111L, 114L, 112L, 113L, 120L, 105L, 111L, 114L, 111L, 118L,
> 115L, 108L, 120L, 119L, 120L, 118L, 117L, 121L, 111L, 114L, 107L,
> 121L, 109L, 106L, 116L, 105L, 119L, 120L, 123L, 126L, 117L, 127L,
> 128L, 132L, 138L, 120L, 132L, 134L, 136L, 144L, 152L, 155L, 146L,
> 155L, 138L, 141L, 146L, 123L, 133L, 123L, 137L, 133L, 143L, 132L,
> 126L, 134L, 129L, 138L, 134L, 132L, 139L, 130L, 152L, 150L, 153L,
> 161L, 152L, 154L, 154L, 138L, 149L, 137L, 144L, 146L, 152L, 140L,
> 151L, 168L, 148L, 157L, 152L, 153L, 166L, 157L, 156L, 166L, 168L,
> 179L, 188L, 190L, 185L, 184L, 185L, 202L, 191L, 175L, 197L, 187L,
> 195L, 204L, 218L, 220L, 212L, 220L, 211L, 221L, 204L, 196L, 209L,
> 205L, 217L, 211L, 212L, 224L, 206L, 225L, 206L, 219L, 232L, 220L,
> 242L, 241L, 261L, 252L, 261L, 269L, 251L, 264L, 261L, 266L, 274L,
> 236L, 270L, 263L, 276L, 276L, 300L, 303L, 301L, 318L, 294L, 308L,
> 308L, 269L, 303L, 302L, 318L, 282L, 311L, 305L, 304L, 309L, 298L,
> 295L, 295L, 281L, 280L, 287L, 313L, 276L, 296L, 307L, 307L, 309L,
> 287L, 286L, 290L, 261L, 285L, 279L, 286L, 284L, 267L, 271L, 259L,
> 268L, 243L, 242L, 237L, 208L, 250L, 237L, 267L, 257L, 276L, 277L,
> 269L, 282L, 264L, 270L, 270L, 251L, 272L, 271L, 288L, 266L, 283L,
> 266L, 270L, 282L, 272L, 264L, 269L, 253L, 269L, 283L, 288L, 275L,
> 301L, 292L, 283L, 287L, 261L, 265L, 269L, 234L, 251L, 261L, 262L,
> 249L, 256L, 255L, 253L, 253L, 233L, 234L, 235L, 217L, 244L, 232L,
> 261L, 236L, 252L, 242L, 252L, 251L, 230L, 240L, 254L, 226L, 267L,
> 245L, 263L, 261L, 286L, 281L, 265L, 274L, 250L, 260L, 265L, 242L,
> 251L, 249L, 251L, 247L, 248L, 234L, 206L, 219L, 194L, 218L, 209L,
> 192L, 207L, 200L, 208L, 208L, 209L, 213L, 216L, 219L, 195L, 217L,
> 217L, 197L, 210L, 211L, 229L, 232L, 227L, 233L, 217L)
>
> TransitsDat <- ts(mydata, start=(1985,10), end=c(2018,9), frequency=12)
>
> Model <- mlp(TransitsDat)
>
> ModelForecasts <- forecast(Model, h=10)
>
> And the output I get is this:
>
>Jan Feb Mar Apr May
> Jun Jul Aug Sep Oct Nov Dec
> 2018
> 224.9970134 221.7932717 220.2698789
> 2019 223.8440115 219.3309631 221.5382052 221.5720276 222.0963057
> 223.8392450 224.0982199
>
> But I would like to have the results in tabular form, where the first
> column is the date with format mmm- (for example jan-2019) and the
> second row are the actual forecasts.
>
> Like this
> Date   TransitForecast
> Jan-2019 230
> Feb-2019217
> etc.
>
> Any guidance will be greatly appreciated,
>
> Best regards,
>
> Paul
>
> [[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 -- 

[R-es] comando max

2018-12-20 Thread Jhon Vidal Figueroa Céspedes
Muy buenas tardes tengo una pregunta con respecto a estas preguntas

setwd("")


library(readxl)


fabk = read_excel("dataset_Facebook.xlsx")


head(fabk)


1.   Obtener las cantidades de los Tipos de contenido (tabla y gráfico
de barras)

table(fabk$Type)

ggplot(fabk, aes(x=Type)) + geom_bar()


ggplot(fabk, aes(x=Type, fill=Type)) + geom_bar()

2.   Crear otra data con el nombre *dataset_Facebook_2*, y que
solamente tenga los registros del Tipo de contenido con mayor cantidad
(analizado en el punto 2)

#no encuentro la función indicada para esto


agradecería su apoyo


dataset_Facebook.xlsx
Description: MS-Excel 2007 spreadsheet
___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] test of independence

2018-12-20 Thread Greg Snow
The basic test of independence for a table based on the Chi-squared
distribution can be done using the `chisq.test` function.  This is in
the stats package which is installed and loaded by default, so you
don't need to do anything additional.  There is also the `fisher.test`
function for Fisher's exact test (similar hypotheses, different
methodology and assumptions, may be really slow on your table).

If you need more than the basics provided in those functions, then a
search of CRAN may be helpful, or give us more detail to be able to
help.

On Thu, Dec 20, 2018 at 12:08 AM km  wrote:
>
> Dear All,
>
> How do I do a test of independence with 16x16 table of counts.
> Please suggest.
>
> Regards,
> KM
>
> [[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.



-- 
Gregory (Greg) L. Snow Ph.D.
538...@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] Problem with system() and source on linux

2018-12-20 Thread Jeff Newmiller
Read the man page for bash... source is built-in to the shell interpreter. You 
should invoke a single shell instance that first sources the profile and then 
executes the program... but this has nothing to do with R... this would be true 
for any program invoking an external program on a POSIX-compatible operating 
system (i.e. not Windows), and so is OT here.

On December 20, 2018 3:00:04 AM PST, Agustin Lobo  wrote:
>Hi!
>I quite often use system() to run other programs from within R, but
>have just hitted
>a problem:
>
>For a given program, I need to set up its environment, which I normally
>do with
>source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
>from the terminal.
>Now, when I try to do the same from within R, I get:
>
>> system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",
>intern=TRUE)
>sh: 1: source: not found
>Error in system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile", 
>:
>  error in running command
>
>I need this command to set the environment before I actually run the
>program. My idea was saving a simple script from within R  in which
>the first line would be
>source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
>
>and then run the script with system(), but I get that odd error with
>source. I thought source was just
>a plain linux command, how can it be "not found" from within system()?
>
>Any help much appreciated,
>Thanks

-- 
Sent from my phone. Please excuse my brevity.

__
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] Problem with system() and source on linux

2018-12-20 Thread Ivan Krylov
On Thu, 20 Dec 2018 12:00:04 +0100
Agustin Lobo  wrote:

> For a given program, I need to set up its environment, which I
> normally do with source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
> from the terminal.

The problem with this approach is that in Unix-like systems, child
processes cannot directly modify environment variables of their
parents (or any other processes besides those they are about to spawn).
In /bin/bash, `source` is a special builtin command that runs without
spawning child processes - therefore being able to modify the
environment of the *current* process.

> Now, when I try to do the same from within R, I get:
> 
> > system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",
> > intern=TRUE)  
> sh: 1: source: not found

Moreover, `source` is a bash-ism and R launches the `system` commands
using /bin/sh, which might be different from /bin/bash. The
POSIX-correct way to include a batch file in the current shell session
is a dot: `. /home/alobo/OTB-6.6.0-Linux64/otbenv.profile`
http://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap02.html#dot

Since this way you can only modify the environment of the temporary
shell process spawned by `system`, you have set up the environment and
launch the executable in a single `system` command:

system(". /home/alobo/OTB-6.6.0-Linux64/otbenv.profile; exec
otbcli_something")

-- 
Best regards,
Ivan

__
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] Problem with system() and source on linux

2018-12-20 Thread Sarah Goslee
Actually, here's another possibility:

system('bash -c "source filename"')

On Thu, Dec 20, 2018 at 10:13 AM Sarah Goslee  wrote:
>
> Hi,
>
> I can tell you what the problem is:
>
> You're probably running bash at the terminal command line, as I am:
>
> [sarahg@localhost]$ echo $0
> bash
>
> but the R system function uses sh
>
>  system("echo $0")
> sh
>
> The bash shell has a source command; the sh shell doesn't. See here
> for a possible solution:
>
> https://stackoverflow.com/questions/4732200/replacement-for-source-in-sh
>
>
> I don't know if there's a way to specify bash shell in system(); a
> very cursory googling didn't find anything. If you find a way, please
> report back.
>
> Sarah
>
> On Thu, Dec 20, 2018 at 10:00 AM Agustin Lobo  wrote:
> >
> > Hi!
> > I quite often use system() to run other programs from within R, but
> > have just hitted
> > a problem:
> >
> > For a given program, I need to set up its environment, which I normally do 
> > with
> > source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
> > from the terminal.
> > Now, when I try to do the same from within R, I get:
> >
> > > system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile", intern=TRUE)
> > sh: 1: source: not found
> > Error in system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",  :
> >   error in running command
> >
> > I need this command to set the environment before I actually run the
> > program. My idea was saving a simple script from within R  in which
> > the first line would be
> > source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
> >
> > and then run the script with system(), but I get that odd error with
> > source. I thought source was just
> > a plain linux command, how can it be "not found" from within system()?
> >
> > Any help much appreciated,
> > Thanks
> >
> >
> > --
> > Agustin Lobo
> > aloboa...@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.
>
>
>
> --
> Sarah Goslee (she/her)
> http://www.numberwright.com



-- 
Sarah Goslee (she/her)
http://www.numberwright.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] Problem with system() and source on linux

2018-12-20 Thread William Dunlap via R-help
Isn't 'source' a csh (tcsh, etc.) command?  The sh (bash, etc.) command is
a period, but
you probably will need to use sh constructs in the file (like
VAR=value;exportVAR)
instead of csh constructs (like setenv VAR value).

Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Thu, Dec 20, 2018 at 7:00 AM Agustin Lobo  wrote:

> Hi!
> I quite often use system() to run other programs from within R, but
> have just hitted
> a problem:
>
> For a given program, I need to set up its environment, which I normally do
> with
> source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
> from the terminal.
> Now, when I try to do the same from within R, I get:
>
> > system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",
> intern=TRUE)
> sh: 1: source: not found
> Error in system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",  :
>   error in running command
>
> I need this command to set the environment before I actually run the
> program. My idea was saving a simple script from within R  in which
> the first line would be
> source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
>
> and then run the script with system(), but I get that odd error with
> source. I thought source was just
> a plain linux command, how can it be "not found" from within system()?
>
> Any help much appreciated,
> Thanks
>
>
> --
> Agustin Lobo
> aloboa...@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] Problem with system() and source on linux

2018-12-20 Thread Sarah Goslee
Hi,

I can tell you what the problem is:

You're probably running bash at the terminal command line, as I am:

[sarahg@localhost]$ echo $0
bash

but the R system function uses sh

 system("echo $0")
sh

The bash shell has a source command; the sh shell doesn't. See here
for a possible solution:

https://stackoverflow.com/questions/4732200/replacement-for-source-in-sh


I don't know if there's a way to specify bash shell in system(); a
very cursory googling didn't find anything. If you find a way, please
report back.

Sarah

On Thu, Dec 20, 2018 at 10:00 AM Agustin Lobo  wrote:
>
> Hi!
> I quite often use system() to run other programs from within R, but
> have just hitted
> a problem:
>
> For a given program, I need to set up its environment, which I normally do 
> with
> source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
> from the terminal.
> Now, when I try to do the same from within R, I get:
>
> > system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile", intern=TRUE)
> sh: 1: source: not found
> Error in system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",  :
>   error in running command
>
> I need this command to set the environment before I actually run the
> program. My idea was saving a simple script from within R  in which
> the first line would be
> source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
>
> and then run the script with system(), but I get that odd error with
> source. I thought source was just
> a plain linux command, how can it be "not found" from within system()?
>
> Any help much appreciated,
> Thanks
>
>
> --
> Agustin Lobo
> aloboa...@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.



-- 
Sarah Goslee (she/her)
http://www.numberwright.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] Reformatting output of Forecasts generated by mlp model

2018-12-20 Thread Paul Bernal
Dear friends,

Hope you are doing great. I am using the multiple layer perceptron model
(provided in R´s mlp() function for time series forecasting, but I don´t
know how to reformat the output forecasts generated.

mydata <- dput(datframe$Transits)

> dput(datframe$Transits)
c(77L, 75L, 85L, 74L, 73L, 96L, 82L, 90L, 91L, 81L, 81L, 77L,
84L, 81L, 82L, 86L, 81L, 81L, 83L, 88L, 88L, 92L, 97L, 89L, 96L,
94L, 94L, 95L, 92L, 94L, 95L, 95L, 87L, 102L, 94L, 91L, 93L,
86L, 96L, 85L, 81L, 84L, 88L, 91L, 89L, 89L, 93L, 83L, 92L, 92L,
76L, 98L, 80L, 95L, 89L, 92L, 96L, 86L, 98L, 84L, 90L, 95L, 90L,
99L, 85L, 91L, 90L, 88L, 97L, 93L, 97L, 87L, 92L, 87L, 86L, 85L,
82L, 90L, 89L, 101L, 94L, 92L, 109L, 101L, 103L, 96L, 89L, 102L,
87L, 101L, 100L, 99L, 101L, 98L, 101L, 90L, 106L, 90L, 99L, 105L,
91L, 96L, 91L, 96L, 93L, 101L, 105L, 98L, 110L, 100L, 101L, 106L,
99L, 111L, 114L, 112L, 113L, 120L, 105L, 111L, 114L, 111L, 118L,
115L, 108L, 120L, 119L, 120L, 118L, 117L, 121L, 111L, 114L, 107L,
121L, 109L, 106L, 116L, 105L, 119L, 120L, 123L, 126L, 117L, 127L,
128L, 132L, 138L, 120L, 132L, 134L, 136L, 144L, 152L, 155L, 146L,
155L, 138L, 141L, 146L, 123L, 133L, 123L, 137L, 133L, 143L, 132L,
126L, 134L, 129L, 138L, 134L, 132L, 139L, 130L, 152L, 150L, 153L,
161L, 152L, 154L, 154L, 138L, 149L, 137L, 144L, 146L, 152L, 140L,
151L, 168L, 148L, 157L, 152L, 153L, 166L, 157L, 156L, 166L, 168L,
179L, 188L, 190L, 185L, 184L, 185L, 202L, 191L, 175L, 197L, 187L,
195L, 204L, 218L, 220L, 212L, 220L, 211L, 221L, 204L, 196L, 209L,
205L, 217L, 211L, 212L, 224L, 206L, 225L, 206L, 219L, 232L, 220L,
242L, 241L, 261L, 252L, 261L, 269L, 251L, 264L, 261L, 266L, 274L,
236L, 270L, 263L, 276L, 276L, 300L, 303L, 301L, 318L, 294L, 308L,
308L, 269L, 303L, 302L, 318L, 282L, 311L, 305L, 304L, 309L, 298L,
295L, 295L, 281L, 280L, 287L, 313L, 276L, 296L, 307L, 307L, 309L,
287L, 286L, 290L, 261L, 285L, 279L, 286L, 284L, 267L, 271L, 259L,
268L, 243L, 242L, 237L, 208L, 250L, 237L, 267L, 257L, 276L, 277L,
269L, 282L, 264L, 270L, 270L, 251L, 272L, 271L, 288L, 266L, 283L,
266L, 270L, 282L, 272L, 264L, 269L, 253L, 269L, 283L, 288L, 275L,
301L, 292L, 283L, 287L, 261L, 265L, 269L, 234L, 251L, 261L, 262L,
249L, 256L, 255L, 253L, 253L, 233L, 234L, 235L, 217L, 244L, 232L,
261L, 236L, 252L, 242L, 252L, 251L, 230L, 240L, 254L, 226L, 267L,
245L, 263L, 261L, 286L, 281L, 265L, 274L, 250L, 260L, 265L, 242L,
251L, 249L, 251L, 247L, 248L, 234L, 206L, 219L, 194L, 218L, 209L,
192L, 207L, 200L, 208L, 208L, 209L, 213L, 216L, 219L, 195L, 217L,
217L, 197L, 210L, 211L, 229L, 232L, 227L, 233L, 217L)

TransitsDat <- ts(mydata, start=(1985,10), end=c(2018,9), frequency=12)

Model <- mlp(TransitsDat)

ModelForecasts <- forecast(Model, h=10)

And the output I get is this:

   Jan Feb Mar Apr May
Jun Jul Aug Sep Oct Nov Dec
2018
224.9970134 221.7932717 220.2698789
2019 223.8440115 219.3309631 221.5382052 221.5720276 222.0963057
223.8392450 224.0982199

But I would like to have the results in tabular form, where the first
column is the date with format mmm- (for example jan-2019) and the
second row are the actual forecasts.

Like this
Date   TransitForecast
Jan-2019 230
Feb-2019217
etc.

Any guidance will be greatly appreciated,

Best regards,

Paul

[[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] Problem with system() and source on linux

2018-12-20 Thread Agustin Lobo
Hi!
I quite often use system() to run other programs from within R, but
have just hitted
a problem:

For a given program, I need to set up its environment, which I normally do with
source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile
from the terminal.
Now, when I try to do the same from within R, I get:

> system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile", intern=TRUE)
sh: 1: source: not found
Error in system("source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile",  :
  error in running command

I need this command to set the environment before I actually run the
program. My idea was saving a simple script from within R  in which
the first line would be
source /home/alobo/OTB-6.6.0-Linux64/otbenv.profile

and then run the script with system(), but I get that odd error with
source. I thought source was just
a plain linux command, how can it be "not found" from within system()?

Any help much appreciated,
Thanks


-- 
Agustin Lobo
aloboa...@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] extract hyperplan from e1071 model

2018-12-20 Thread Sarah Goslee
Hi,

Please don't forget to copy R-help on your reply - other people are
likely to have more insight.

My understanding is that you want to replicate the shaded polygons
produced by plot.svm on your own plot. That's why I suggested you
first try add=TRUE, and if that doesn't work, then look at the code
for plot.svm so you can see how the predicted values are calculated on
a grid to be plotted. R is open source - you can extract the section
from that function that does what you want, and make your own code to
add it to another plot.

I have no idea what "the tutorial" is; I suggested two things you
could try based on the help and my understanding of R.

Sarah

On Thu, Dec 20, 2018 at 9:07 AM Luigi Marongiu  wrote:
>
> Dear Sarah,
> I have looked at the tutorial but I did not find what I was looking
> for. Essentially, I would like to extract the data that make the
> hyperplane (it should be a matrix of X,Y value, for a bidimensional
> plane, I guess) so I can plot a line in another plot. I tried with
> model$SV but it is not the right one.
> Luigi
>
> On Thu, Dec 20, 2018 at 2:59 PM Sarah Goslee  wrote:
> >
> > Hi,
> >
> > According to the help for svm, which you probably should have started
> > with, SV contains the support vectors, and index contains the position
> > of the support vectors in the data matrix.
> >
> > As for plotting, plot.svm lets you pass additional options to plot so
> > that you can customize the plot to your tastes. I'm not sure if
> > add=TRUE is a useful option there, but you should try it. If that
> > doesn't meet your needs, R is open source - you can easily look at the
> > code for plot.svm and see what you need (basically the predicted
> > values on agrid, if I'm understanding your goal correctly).
> >
> > Sarah
> >
> > On Thu, Dec 20, 2018 at 5:16 AM Luigi Marongiu  
> > wrote:
> > >
> > > Dear all,
> > > I am using the package e1071 for modeling SVM. I obtain a model from
> > > the data and I can plot the results; the plot shows the support
> > > vectors (as 'X's) and the shaded areas as it should be.
> > > However, I don't like the plot generated from the model and I would
> > > like instead to have more control upon the plotting; in particular, I
> > > would like to draw the hyperplane on plots I have already made from
> > > the data available.
> > > Is there a way to extract the values that are used to draw the hyperplane?
> > > That is: plot(model) -- where model is obtained from svm() -- draws an
> > > area in blue and one in red based on some values provided by model;
> > > can I get these values so I can plot a line in a pre-existing plot?
> > > Also, it is possible to extract the positions of the support vectors?
> > > The names of the model generated by svm() are:
> > > > names(mod)
> > >  [1] "call""type""kernel"  "cost"
> > >  [5] "degree"  "gamma"   "coef0"   "nu"
> > >  [9] "epsilon" "sparse"  "scaled"  "x.scale"
> > > [13] "y.scale" "nclasses""levels"  "tot.nSV"
> > > [17] "nSV" "labels"  "SV"  "index"
> > > [21] "rho" "compprob""probA"   "probB"
> > > [25] "sigma"   "coefs"   "na.action"   "fitted"
> > > [29] "decision.values" "terms"
> > >
> > > Which one should I look at?
> > > Thank you
> > > --
> > > Best regards,
> > > Luigi
> > >



-- 
Sarah Goslee (she/her)
http://www.numberwright.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] extract hyperplan from e1071 model

2018-12-20 Thread Sarah Goslee
Hi,

According to the help for svm, which you probably should have started
with, SV contains the support vectors, and index contains the position
of the support vectors in the data matrix.

As for plotting, plot.svm lets you pass additional options to plot so
that you can customize the plot to your tastes. I'm not sure if
add=TRUE is a useful option there, but you should try it. If that
doesn't meet your needs, R is open source - you can easily look at the
code for plot.svm and see what you need (basically the predicted
values on agrid, if I'm understanding your goal correctly).

Sarah

On Thu, Dec 20, 2018 at 5:16 AM Luigi Marongiu  wrote:
>
> Dear all,
> I am using the package e1071 for modeling SVM. I obtain a model from
> the data and I can plot the results; the plot shows the support
> vectors (as 'X's) and the shaded areas as it should be.
> However, I don't like the plot generated from the model and I would
> like instead to have more control upon the plotting; in particular, I
> would like to draw the hyperplane on plots I have already made from
> the data available.
> Is there a way to extract the values that are used to draw the hyperplane?
> That is: plot(model) -- where model is obtained from svm() -- draws an
> area in blue and one in red based on some values provided by model;
> can I get these values so I can plot a line in a pre-existing plot?
> Also, it is possible to extract the positions of the support vectors?
> The names of the model generated by svm() are:
> > names(mod)
>  [1] "call""type""kernel"  "cost"
>  [5] "degree"  "gamma"   "coef0"   "nu"
>  [9] "epsilon" "sparse"  "scaled"  "x.scale"
> [13] "y.scale" "nclasses""levels"  "tot.nSV"
> [17] "nSV" "labels"  "SV"  "index"
> [21] "rho" "compprob""probA"   "probB"
> [25] "sigma"   "coefs"   "na.action"   "fitted"
> [29] "decision.values" "terms"
>
> Which one should I look at?
> Thank you
> --
> Best regards,
> Luigi
>
> __
> 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.



-- 
Sarah Goslee (she/her)
http://www.sarahgoslee.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] Combine recursive lists in a single list or data frame and write it to file

2018-12-20 Thread Ek Esawi
Thanks again Jim. The links below are for 2 files (papers) i
downloaded from Google Scholar for testing. You can use either both or
any other pdf files with tables. Thanks again-EK.

https://pdfs.semanticscholar.org/50a4/2b8146f08161b1036457fe0d241b6b898974.pdf
https://pdfs.semanticscholar.org/50a4/2b8146f08161b1036457fe0d241b6b898974.pdf


The code:
install.packages("rJava");library(rJava)
install.packages("tabulizer");library(tabulizer)
MyPath - "C:/Users/name/Documents/Temp"
ExtTable - function (Path,CalOrd){
  FileNames - dir(Path, pattern =".(pdf|PDF)",full.names = TRUE)
  MyFiles - lapply(FileNames, function(i) extract_tables(i,method
= "stream"))
  if(CalOrd == "Yes"){
MyOFiles - gsub("(\\s.*)|(.pdf|.PDF)","",basename(FileNames))
MyOFiles - match(MyOFiles,month.name)
MyNFiles - MyFiles[order(MyOFiles)]}
  else
MyFiles
}
MyTables - ExtTable(Path=MyPath,CalOrd = "Yes")

On Thu, Dec 20, 2018 at 12:28 AM Jim Lemon  wrote:
>
> Hi Ek,
> It looks to me as though you are not joining the lists into a single
> list, then calling FillList and then converting to a data frame. If
> you can send some data (if it's not too big) I can test it and make
> sure that it works, as it did every time for me.
>
> Jim
>
> On Thu, Dec 20, 2018 at 2:22 PM Ek Esawi  wrote:
> >
> > Thank you Jim. I did use unlist with the recursive option which
> > converted the 3 levels list to a list of 38 matrices. I tried your
> > earlier function to join the 38 matrices, all of which have different
> > number of columns and rows, but i kept getting an error.
> >
> > fillList<-function(x) {
> > + maxrows<-max(unlist(lapply(x,length)))
> > + return(lapply(x,"[",1:maxrows))
> > + }
> > >
> > > for (i in 1:length(MyTables)) {
> > + write.table(as.data.frame(fillList(MyTables[i])),
> > + file = "Temp.txt",append = TRUE,quote = TRUE)}
> > Error in (function (..., row.names = NULL, check.rows = FALSE,
> > check.names = TRUE,  :
> >   arguments imply differing number of rows: 3, 55, 56, 53, 54, 16, 21,
> > 23, 50, 24
> >
> >
> > On Wed, Dec 19, 2018 at 9:36 PM Jim Lemon  wrote:
> > >
> > > Hi Ek,
> > > Look at unlist and the argument "recursive". You can step down through
> > > the levels or a nested list to convert it to a single level list.
> > >
> > > Jim
> > >
> > > On Thu, Dec 20, 2018 at 1:33 PM Ek Esawi  wrote:
> > > >
> > > > Thank you Bert. I don't see how unlist will help. I want to combine
> > > > them but keep the "rectangular structure",e.g. list, data frame,
> > > > matrix  because i want to get the tables in their original form.
> > > > Unlist converts the whole output to a single vector; unless i am
> > > > missing something.
> > > >
> > > > On Wed, Dec 19, 2018 at 9:10 PM Bert Gunter  
> > > > wrote:
> > > > >
> > > > > Does ?unlist not help? Why not?
> > > > >
> > > > > Bert
> > > > >
> > > > >
> > > > > On Wed, Dec 19, 2018, 5:13 PM Ek Esawi  > > > >>
> > > > >> Hi All—
> > > > >>
> > > > >>  I am using the R tabulizer package to extract tables from pdf files.
> > > > >> The output is a set of lists of matrices. The package extracts tables
> > > > >> and a lot of extra stuff which is nearly impossible to clean with
> > > > >> RegEx. So, I want to clean it manually.
> > > > >> To do so I need to (1) combine all lists in a single list or data
> > > > >> frame and (2) then write the single entity to a text file to edit it.
> > > > >> I could not figure out how.
> > > > >>
> > > > >> I tried something like this but did not work.
> > > > >> lapply(MyTables, function(x)
> > > > >> lapply(x,write.table(file="temp.txt",append = TRUE)))
> > > > >>
> > > > >>  Any help is greatly appreciated.
> > > > >>
> > > > >>  Here is my code:
> > > > >>
> > > > >> install.packages("rJava");library(rJava)
> > > > >> install.packages("tabulizer");library(tabulizer)
> > > > >> MyPath <- "C:/Users/name/Documents/tEMP"
> > > > >> ExtTable <- function (Path,CalOrd){
> > > > >>   FileNames <- dir(Path, pattern =".(pdf|PDF)",full.names = TRUE)
> > > > >>   MyFiles <- lapply(FileNames, function(i) extract_tables(i,method = 
> > > > >> "stream"))
> > > > >>   if(CalOrd == "Yes"){
> > > > >> MyOFiles <- gsub("(\\s.*)|(.pdf|.PDF)","",basename(FileNames))
> > > > >> MyOFiles <- match(MyOFiles,month.name)
> > > > >> MyNFiles <- MyFiles[order(MyOFiles)]}
> > > > >>   else
> > > > >> MyFiles
> > > > >> }
> > > > >> MyTables <- ExtTable(Path=MyPath,CalOrd = "No")
> > > > >>
> > > > >> Here is cleaned portion of the output: The whole output consists of 3
> > > > >> lists, each contains 12, 15, and 12 sub-lists.
> > > > >>
> > > > >>  [[2]][[2]]
> > > > >>  [,1][,2][,3][,4]  [,5][,6][,7][,8]
> > > > >> [,9]  [,10]
> > > > >>  [1,] ""  "Avg."  "+_ lo" "n"   "Med."  ""  "Avg."  "+_
> > > > >> lo" "n"   "Med."
> > > > >>  [2,] "SiOz"  "44.0"  "1.26"  "375" "44.1"  "Nb""4.8"   "6.3"
> > > > >>  "58"  "2.7"
> > > > >>  [3,] "T i O  2"  "0.09"  

Re: [R] Webshot failed to take snapshot in Ubuntu machine

2018-12-20 Thread Martin Maechler
> Marc Girondot via R-help 
> on Tue, 18 Dec 2018 13:53:34 +0100 writes:

> Hi Christofer, I just try on MacOSX and ubuntu and it
> works on both:

> For ubuntu:
>> Sys.info()
>    sysname
>   "Linux"
>   release
>   "4.15.0-42-generic"
>   version "#45-Ubuntu
> SMP Thu Nov 15 19:32:57 UTC 2018"
>  nodename
>    "lepidochelys"
>   machine
>  "x86_64"

> Not sure what to do...
> Marc

Hmm, if I try it (on my Linux desktop), I get

  > library(webshot)
  > url <- 
"https://www.bseindia.com/stock-share-price/asian-paints-ltd/asianpaint/500820/;
  > webshot(url, 'bb.pdf')
  PhantomJS not found. You can install it with webshot::install_phantomjs(). If 
it is installed, please make sure the phantomjs executable can be found via the 
PATH variable.
  NULL

So, it is clear this relies on extra javascript based software
being available on your computer, *and* having that correctly in
your PATH.

On my linux system, I then did
   webshot::install_phantomjs()
and that downloaded things and installed a 67 Megabyte
executable in my PATH ... which then subsequently worked.

On that Linux system it did *not* work, try

  system("which phantomjs")

and you should see that it gets a version of 'phantomjs' on your
computer, i.e., the one that  webshot() will then try to use and
somehow fails.

I'd recommend you run   webshot::install_phantomjs()
which then should install a "better" version of the 'phantomjs'
executable that then *should* work ..

Let us know if this helped (or why not).

Best,
Martin Maechler
ETH Zurich

> Le 18/12/2018 à 13:37, Christofer Bogaso a écrit :
>> Hi,
>> 
>> I was using webshot package to take snapshot of a webpage
>> as below:
>> 
>> library(webshot) webshot('
>> 
https://www.bseindia.com/stock-share-price/asian-paints-ltd/asianpaint/500820/',
>> 'bb.pdf')
>> 
>> However what I see is a Blank PDF file is saved.
>> 
>> However if I use the same code in my windows machine it
>> is able to produce correct snapshot.
>> 
>> Below is my system information
>>> Sys.info()
>> sysname "Linux" release "4.4.0-139-generic" version
>> "#165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018" nodename
>> "ubuntu-s-2vcpu-4gb-blr1-01" machine "x86_64" login
>> "root" user "root" effective_user "root"
>> 
>> Any idea what went wrong would be highly helpful.
>> 
>> Thanks,
>> 
>> [[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-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] [R-pkgs] dbparser: 'DrugBank' Database XML Parser

2018-12-20 Thread mohammed ibrahim via R-packages
Hello,
Kindly find this new package for parsing the 'DrugBank' XML database 
. The parsed data are then returned in a proper 'R' 
dataframe with the ability to save them in a given database.
CRAN: 
Vignettes: 

Github: 




It will be great to know your feedback :). Thank you

Best Regards,
Mohammed Ali
MSc in Applied Data Science & Big Data
mohammed@edu.dsti.institute
+20 01000481973
eg.linkedin.com/in/mohammedali85

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

__
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] extract hyperplan from e1071 model

2018-12-20 Thread Luigi Marongiu
Dear all,
I am using the package e1071 for modeling SVM. I obtain a model from
the data and I can plot the results; the plot shows the support
vectors (as 'X's) and the shaded areas as it should be.
However, I don't like the plot generated from the model and I would
like instead to have more control upon the plotting; in particular, I
would like to draw the hyperplane on plots I have already made from
the data available.
Is there a way to extract the values that are used to draw the hyperplane?
That is: plot(model) -- where model is obtained from svm() -- draws an
area in blue and one in red based on some values provided by model;
can I get these values so I can plot a line in a pre-existing plot?
Also, it is possible to extract the positions of the support vectors?
The names of the model generated by svm() are:
> names(mod)
 [1] "call""type""kernel"  "cost"
 [5] "degree"  "gamma"   "coef0"   "nu"
 [9] "epsilon" "sparse"  "scaled"  "x.scale"
[13] "y.scale" "nclasses""levels"  "tot.nSV"
[17] "nSV" "labels"  "SV"  "index"
[21] "rho" "compprob""probA"   "probB"
[25] "sigma"   "coefs"   "na.action"   "fitted"
[29] "decision.values" "terms"

Which one should I look at?
Thank you
-- 
Best regards,
Luigi

__
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] R 3.5.2 is released

2018-12-20 Thread Peter Dalgaard via R-help
The build system rolled up R-3.5.2.tar.gz (codename "Eggshell Igloo") this 
morning.

The list below details the changes in this release.

You can get the source code from

http://cran.r-project.org/src/base/R-3/R-3.5.2.tar.gz

or wait for it to be mirrored at a CRAN site nearer to you.

Binaries for various platforms will appear in due course.


For the R Core Team,

Peter Dalgaard


These are the checksums (md5 and SHA-256) for the freshly created files, in 
case you wish
to check that they are uncorrupted:

MD5 (AUTHORS) = b9c44f9f78cab3184ad9898bebc854b4
MD5 (COPYING) = eb723b61539feef013de476e68b5c50a
MD5 (COPYING.LIB) = a6f89e2100d9b6cdffcea4f398e37343
MD5 (FAQ) = 3bba37aa1dd06de3f781200a8081302f
MD5 (INSTALL) = 7893f754308ca31f1ccf62055090ad7b
MD5 (NEWS) = 2e406d65b35c6e2f6f0cf07ce12f1697
MD5 (NEWS.0) = bfcd7c147251b5474d96848c6f57e5a8
MD5 (NEWS.1) = eb78c4d053ec9c32b815cf0c2ebea801
MD5 (NEWS.2) = 591dcf615162127f904e4e461f330ce9
MD5 (R-latest.tar.gz) = 3e4b40b2bbd4a2f8133ac45dbef6a485
MD5 (README) = f468f281c919665e276a1b691decbbe6
MD5 (RESOURCES) = 529223fd3ffef95731d0a87353108435
MD5 (THANKS) = 08158353102084599797db8c9ccf8e2a
MD5 (VERSION-INFO.dcf) = 2f0bb13198cfc16ce69d0c61d8cd57ad
MD5 (R-3/R-3.5.2.tar.gz) = 3e4b40b2bbd4a2f8133ac45dbef6a485

2cde824a7b18958e5f06b391c801c8288be0f84fa8934b7ddefef23c67e60c09  AUTHORS
e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4  COPYING
6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3  COPYING.LIB
98df47801c33cc4f4a4de98447cb2bd40e09c0920195f540a981ceed874714f2  FAQ
f87461be6cbaecc4dce44ac58e5bd52364b0491ccdadaf846cb9b452e9550f31  INSTALL
c1bb84ce9fb277e742e2545506c8d1233deb8d397c65329b9325162675a2516c  NEWS
4e21b62f515b749f80997063fceab626d7258c7d650e81a662ba8e0640f12f62  NEWS.0
12b30c724117b1b2b11484673906a6dcd48a361f69fc420b36194f9218692d01  NEWS.1
ca04f78ffe54afa326fe3ed40e7e1411acaed2fa5ead97ddf51c6aa5b7bc  NEWS.2
e53d8c3cf20f2b8d7a9c1631b6f6a22874506fb392034758b3bb341c586c5b62  
R-latest.tar.gz
2fdd3e90f23f32692d4b3a0c0452f2c219a10882033d1774f8cadf25886c3ddc  README
408737572ecc6e1135fdb2cf7a9dbb1a6cb27967c757f1771b8c39d1fd2f1ab9  RESOURCES
2d2e85e85574c4430951f6b070c08cd5aff1602abfd1bb162bed6d89c436b11f  THANKS
9d0e6e7f442952001c174cfc235cc4e6ec97f6e73865f605da30abf34f116fb0  
VERSION-INFO.dcf
e53d8c3cf20f2b8d7a9c1631b6f6a22874506fb392034758b3bb341c586c5b62  
R-3/R-3.5.2.tar.gz

This is the relevant part of the NEWS file:

CHANGES IN R 3.5.2:

  PACKAGE INSTALLATION:

* New macro CXX_VISIBILITY analogous to C_VISIBILITY (which several
  packages have been misusing for C++ code) for the default C++
  compiler (but not necessarily one used for non-default C++
  dialects like C++14).

  TESTING:

* The random number generator tests in tests/p-r-random-tests.R no
  longer fail occasionally as they now randomly sample from
  "certified" random seeds.

  BUG FIXES:

* The "glm" method of drop1() miscalculated the score test
  (test="Rao") when the model contained an offset.

* Linear multiple empty models such as lm(y ~ 0) now have a
  correctly dimensioned empty coefficient matrix; reported by Brett
  Presnell.

* vcov() and hence confint() now work (via a consistency
  change in summary.lm()).

* confint() now works correctly; reported on R-devel
  by Steven Pav.

* quade.test() now also works correctly when its arguments are not
  yet sorted along groups, fixing PR#15842.

* Installation on a Unix-alike tries harder to link to the pthread
  library where required (rather than relying on OpenMP to provide
  it: configuring with --disable-openmp was failing on some Linux
  systems).

* The data.frame method for print(x) is fast now also for large
  data frames x and got an optional argument max, thanks to
  suggestions by Juan Telleria.

* hist() no longer integer overflows in very rare cases, fixing
  PR#17450.

* untar() ignored a character compressed argument: however many
  external tar programs ignore the flags which should have been set
  and automagically choose the compression type, and if appropriate
  gzip or bzip2 compression would have been chosen from the magic
  header of the tarball.

* zapsmall(x) now works for more "number-like" objects.

* The tools-internal function called from R CMD INSTALL now gets a
  warnOption = 1 argument and only sets options(warn = warnOption)
  when that increases the warning level (PR#17453).

* Analogously, the tools-internal function called from R CMD check
  gets a warnOption = 1 argument and uses the larger of that and
  getOption("warn"), also allowing to be run with increased warning
  level.

* Parse data now have deterministic parent nodes (PR#16041).

* Calling match() with length one x and POSIXlt table gave a
  segfault (PR#17459).

* Fork clusters could hang due to a race condition in cluster

Re: [R] test of independence

2018-12-20 Thread PIKAL Petr
Hi

Did you search CRAN? I got **many** results for

test of independence

which may or may not provide you with suitable procedures.

Cheers
Petr


> -Original Message-
> From: R-help  On Behalf Of km
> Sent: Thursday, December 20, 2018 8:07 AM
> To: r-help@r-project.org
> Subject: [R] test of independence
>
> Dear All,
>
> How do I do a test of independence with 16x16 table of counts.
> Please suggest.
>
> Regards,
> KM
>
> [[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.
Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních 
partnerů PRECHEZA a.s. jsou zveřejněny na: 
https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about 
processing and protection of business partner’s personal data are available on 
website: https://www.precheza.cz/en/personal-data-protection-principles/
Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a 
podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti: 
https://www.precheza.cz/01-dovetek/ | This email and any documents attached to 
it may be confidential and are subject to the legally binding disclaimer: 
https://www.precheza.cz/en/01-disclaimer/

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