Re: [R] HISTOGRAM

2018-11-09 Thread Rick Bilonick
First, a histogram would not be appropriate (your data appear to be categorical - a histogram is for continuous numeric vales) - you would need a bar plot. You should make two vectors (one for the category names and the other for the frequencies) and use the barplot function. On Fri, Nov 9, 2018

Re: [R] Read

2018-11-09 Thread Rui Barradas
Hello, I've just tested Jeff's solution, it works but the second code line should be dsh <- sh[ , -length( sh ) ] (dsh doesn't exist yet.) Hope this helps, Rui Barradas Às 02:46 de 10/11/2018, Jeff Newmiller escreveu: Your file has 5 commas in the first data row, but only 4 in the

Re: [R] Read

2018-11-09 Thread Jeff Newmiller
Your file has 5 commas in the first data row, but only 4 in the header. R interprets this to mean your first column is intended to be row names (has no corresponding column label) rather than data. (Row names are "outside" the data frame... use str(dsh) to get a better picture.) Basically,

[ESS] makeinfo error in MacOS

2018-11-09 Thread Cyrus Harmon via ESS-help
When I try to build ESS on MacOS (mojave, 10.14.1) (and other systems as I’ve seen this for a while now), I see the following error: ... making Info documentation... LC_ALL=C LANG=en makeinfo ess.texi /Users/sly/.emacs.d/site-lisp/ESS/doc//newfeat.texi:42: warning: `.' or `,' must follow @xref,

[R] Read

2018-11-09 Thread Val
HI all, I am trying to read a csv file, but have a problem in the row names. After reading, the name of the first column is now "row.names" and all other column names are shifted to the right. The value of the last column become all NAs( as an extra column). My sample data looks like as follow,

Re: [R] list contingency tables

2018-11-09 Thread Bert Gunter
Yes, exactly (heh, heh). ?fisher.test is probably what is wanted. For arbitrary rxc tables with fixed marginals, this is a difficult problem. Mehta's efficient network algorithm to solve it can be found by a web search on "algorithm for Fisher exact test." -- Bert On Fri, Nov 9, 2018 at

Re: [R] list contingency tables

2018-11-09 Thread David Winsemius
Seems like you are trying to recreate the calculations needed to perform an exact test. Why not look at the code for that or even easier, just use the function. -- David. On 11/8/18 8:05 PM, li li wrote: Hi all, I am trying to list all the 4 by 2 tables with some fixed margins. For

Re: [R] list contingency tables

2018-11-09 Thread Jeff Newmiller
Don't give up on for loops entirely... some of the largest time savings in optimizing loops are achieved by managing memory effectively. [1] [1] https://www.r-bloggers.com/r-tip-use-vectormode-list-to-pre-allocate-lists On November 8, 2018 8:05:39 PM PST, li li wrote: >Hi all, > I am trying

Re: [R] HISTOGRAM

2018-11-09 Thread Rui Barradas
Hello, You probably want a bar plot, not a histogram. old.sci <- options(scipen=999) with(mydata, barplot(number, space = 0, names.arg = name, beside = TRUE)) options(scipen = old.sci) #- mydata <- read.table(text = " name number ds6277 lk 24375 ax46049 dd

Re: [ESS] ESS R code evaluation in package

2018-11-09 Thread Cyrus Harmon via ESS-help
On 11/8/18 2:32 PM, Vitalie Spinu via ESS-help wrote: Namespaced evaluation should work for R code as described above. If not, it's a bug. These probably aren't bugs but now that I've gotten things to a somewhat more manageable state my next problem is getting things working with

[R-es] Data frame: eliminar caracteres raros y convertir 2 columnas a formato numerico

2018-11-09 Thread Sebastian Kruk
Estimados usuarios de R: Muy buenas tardes. Hace días que estoy dando vueltas con un data frame de 28 observaciones con 3 variables llamado data que lo obtuve de transformar unas tablas html. La primer y segunda variable tienen 28 niveles y la tercera 25 niveles. ¿Hay alguna forma de dejarlo

[R] HISTOGRAM

2018-11-09 Thread Medic
What would be the correct code (simplest version) (without gplot()) for histogram (with 7 bars), which would include 7 names of bars under the X-axis. The data are: name number ds6277 lk 24375 ax46049 dd70656 az216544 df 220620 gh641827 (I'm attaching mydata.r, making

Re: [R] randomForrest-imputation

2018-11-09 Thread Dénes Tóth
Hi, The missRanger package performs predictive mean matching which should generate positive values if the non-missing values are positive. Regards, Denes On 11/09/2018 01:11 PM, Rebecca Bingert wrote: Hi! How can I generate only positive data with randomForrest-imputation? I'm working

[R] randomForrest-imputation

2018-11-09 Thread Rebecca Bingert
Hi! How can I generate only positive data with randomForrest-imputation? I'm working with laboratory values which are always positive. Can anybody help out? Thanks! (P.S.: I needed to send this request again because there were problems by delivering it)

[R] [R-pkgs] New Package pgsc

2018-11-09 Thread Philip Barrett
Dear all, I am pleased to announce a new CRAN package, "pgsc" version 1.0.0 < https://cran.r-project.org/package=pgsc>. This package implements the extension of the synthetic control method to allow for continuous and time-varying treatments described in Powell (2017) . Functions for both

Re: [R-es] Visualizar grandes volumenes de datos

2018-11-09 Thread Jesús Para Fernández
Gracias chicos Jesús De: Carlos Ortega Enviado: jueves, 8 de noviembre de 2018 22:05 Para: Jesús Para Fernández Cc: Lista R Asunto: Re: [R-es] Visualizar grandes volumenes de datos Otra opción es esta: https://db.rstudio.com/dbplot/ Que es un paquete que ha