Re: [R] read

2019-08-08 Thread Bert Gunter
I stand corrected! 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, Aug 8, 2019 at 7:11 PM Jeff Newmiller wrote: > Val 1 > Bert 0 > > On August 8, 2019

Re: [R] read

2019-08-08 Thread Jeff Newmiller
Assuming your actual case is a file containing those characters, your example R string has to quote them. However, it seems like you want to disable interpreting quotes while you read this file. vld<-read.table(text= "name prof A '4.5 B \"3.2 C 5.5 "

Re: [R] read

2019-08-08 Thread Jeff Newmiller
Val 1 Bert 0 On August 8, 2019 5:22:13 PM PDT, Bert Gunter wrote: >read.table() does not have a "text" argument, so maybe you need to go >back >and go through a tutorial or two to learn R basics (e.g. about function >calls and function arguments ?) >See ?read.table (of course) > >Cheers, >

Re: [R] read

2019-08-08 Thread Peter Langfelder
I would remove the quotes using sub, something like # Read the file as text lines text = readLines(con = file(yourFileName)) # Remove the offending quotes text = gsub("'|\"", "", text) # Concatenate and turn into a data frame concat = paste(text, collapse = "\n") df = read.table(text = concat,

Re: [R] read

2019-08-08 Thread Val
Thank you all, I can read the text file but the problem was there is a single quote embedded in the first row of second column. This quote causes the problem vld<-read.table(text="name prof A '4.5 B "3.2 C 5.5 ",header=TRUE) On Thu, Aug 8, 2019 at 7:24 PM Anaanthan

Re: [R] read

2019-08-08 Thread Bert Gunter
read.table() does not have a "text" argument, so maybe you need to go back and go through a tutorial or two to learn R basics (e.g. about function calls and function arguments ?) See ?read.table (of course) Cheers, Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] read

2019-08-08 Thread Anaanthan Pillai
data <- read.table(header=TRUE, text=' name prof A 4.5 B 3.2 C 5.5 ') > On 9 Aug 2019, at 8:11 AM, Val wrote: > > Hi all, > > I am trying to red data where single and double quotes are embedded > in some of the fields and prevented to read the data. As an example > please see

Re: [R] read

2019-08-08 Thread Thevaraja, Mayooran
Hi you can save your data file in txt or csv file. Then you can use function " vld <-read.table("C:/Users/ .txt",header=T)". Regards Mayooran -Original Message- From: R-help On Behalf Of Val Sent: Friday, 9 August 2019 12:11 PM To: r-help@R-project.org (r-help@r-project.org)

[R] read

2019-08-08 Thread Val
Hi all, I am trying to red data where single and double quotes are embedded in some of the fields and prevented to read the data. As an example please see below. vld<-read.table(text="name prof A '4.5 B "3.2 C 5.5 ",header=TRUE) Error in read.table(text = "name prof \n

Re: [R] broken installation on ubuntu 16.04 for 3.4.4-1xenial0

2019-08-08 Thread David Winsemius
The proper place for Ubuntu/Debian questions is r-sig-deb...@r-project.org -- David On 8/8/19 12:52 PM, k...@breadfinance.com wrote: Sorry for unintentionally sending a rich text email. I have confirmed that installation follows ubuntu guide lines in your link and I reproduce the output of

Re: [R] broken installation on ubuntu 16.04 for 3.4.4-1xenial0

2019-08-08 Thread kz
Sorry for unintentionally sending a rich text email. I have confirmed that installation follows ubuntu guide lines in your link and I reproduce the output of git blame of the installation recipe showing that it has always been using the right key. The change before we get these errors are on

Re: [R] how to reverse colors on boxplot

2019-08-08 Thread Rui Barradas
Hello, Maybe I don't understand the question but isn't all you have to do is to, well, reverse the colors col = c("palevioletred1", "royalblue1") in the boxplot call? boxplot(flcn_M ~ subject, data = dx, col = c("palevioletred1", "royalblue1"), xlab="subjects",

Re: [R] Extract row as NA with no matching name

2019-08-08 Thread David Winsemius
I don't know a clean way of delivering that result but if you use logical indexing you can get an empty matrix with three columns: str( mdat["nope" %in% rownames(mdat), ] )  num[0 , 1:3]  - attr(*, "dimnames")=List of 2   ..$ : NULL   ..$ : chr [1:3] "C.1" "C.2" "C.3" # it prints thus to the

[R] Creating a web site checker using R

2019-08-08 Thread Chris Evans
I use R a great deal but the huge web crawling power of it isn't an area I've used. I don't want to reinvent a cyberwheel and I suspect someone has done what I want. That is a program that would run once a day (easy for me to set up as a cron task) and would crawl a single root of a web site

[R] how to reverse colors on boxplot

2019-08-08 Thread Ana Marija
Hello, I made plot in attach using: boxplot(flcn_M~subject,data=dx,col = c("royalblue1","palevioletred1"),xlab="subjects",ylab="Expression estimate in delta (log2)",boxwex = 0.2,frame.plot = FALSE) stripchart(flcn_M~subject, vertical = TRUE, data = dx,method = "jitter", add = TRUE,pch = 20,

Re: [R] Error exporting dataframe from Julia to R with Feather

2019-08-08 Thread Bert Gunter
Jeff: Fair enough. As I have no data (no experience with crashes), I am happy to defer to those who do. Cheers, Bert On Thu, Aug 8, 2019 at 10:28 AM Jeff Newmiller wrote: > If R crashes, RStudio typically also crashes... so not necessarily news to > them. > > I will say that reproducible

Re: [R] Error exporting dataframe from Julia to R with Feather

2019-08-08 Thread Jeff Newmiller
If R crashes, RStudio typically also crashes... so not necessarily news to them. I will say that reproducible examples are nearly always necessary in cases like this to obtain meaningful answers from anyone, and the output of sessionInfo() is also usually needed. On August 8, 2019 8:35:49 AM

Re: [R] gen.geneaslogy

2019-08-08 Thread Thomas Bolger
Hi Many thanks for your very quick response. I should have spotted the error in the data. I have corrected it but the error remains. Hopefully. the package maintainer will be able to help. Thank you very much for your reply. Tom On Thu, 8 Aug 2019 at 15:57, Jeff Newmiller wrote: > This is a

Re: [R] conflicting results for a time-varying coefficient in a Cox model

2019-08-08 Thread Therneau, Terry M., Ph.D. via R-help
This is an excellent question. The answer, in this particular case, mostly has to do with the outlier time values.  (I've never been convinced that the death at time 999 isn't really a misplaced code for "missing", actually).    If you change the knots used by the spline you can get quite

[R] Extract row as NA with no matching name

2019-08-08 Thread Christofer Bogaso
Hi, Let say I have below matrix mdat <- matrix(c(1,2,3, 11,12,13), nrow = 2, ncol = 3, byrow = TRUE, dimnames = list(c("row1", "row2"), c("C.1", "C.2", "C.3"))) Now I can extract a raw by rowname as > mdat['row1', ] C.1 C.2 C.3 1 2 3

Re: [R] Error exporting dataframe from Julia to R with Feather

2019-08-08 Thread Bert Gunter
That is a better path, I agree. However, I suspect that RStudio would still like to know about the issue, even *if* feather/R is what crashes. They probably do not want RStudio to crash even so. -- Bert On Thu, Aug 8, 2019 at 8:29 AM peter dalgaard wrote: > Alternatively, try running your

Re: [R] Error exporting dataframe from Julia to R with Feather

2019-08-08 Thread peter dalgaard
Alternatively, try running your example from plain R (in a terminal, R.app, or Rgui, depending on your platform), and see if the problem occurs without RStudio in the equation. If it does, then the feather package probably owns the problem. -pd > On 8 Aug 2019, at 16:34 , Bert Gunter wrote:

Re: [R-es] Gráfico tiempos de supervivencia

2019-08-08 Thread Griera
Hola Francisco: Muchas gracias por este refinamiento. Tienes razón, el gráfico de Lexis representa mucho mejor los datos. Y gracias por el código. Lo guardo también para el futuro. Saludos On Thu, 8 Aug 2019 09:42:50 +0200 Francisco Viciana wrote: > Hola, aunque con un poco de retraso,

Re: [R] gen.geneaslogy

2019-08-08 Thread Jeff Newmiller
This is a rather specialized issue... you probably should be cc'ing the package maintainer as added here. I have never used this package.. but perhaps the fact that 701 is female yet listed as a father of 801 and 802 could be causing problems. (If so, this may raise issues of family structure

Re: [R] Error exporting dataframe from Julia to R with Feather

2019-08-08 Thread Bert Gunter
You may have to contact RStudio about this. RStudio is a separate IDE independent of R -- i.e. developed and maintained by a separate organization from the R project. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

Re: [R] CoxPH multivariate frailty model with coxph (survival)

2019-08-08 Thread Denise b
Chris, Thanks a lot for the help and your investigation by simulations. > Interacting a fixed effect with a strata variable is not uncommon. No > main effect of the strata variable is > possible but the interaction term > allows the fixed effect variable to have different values in different

[R] gen.geneaslogy

2019-08-08 Thread Thomas Bolger
Hi I have just started to do some analysis of genealogies and seem to be doing something wrong when using gen.genealogy. The following is the script and output that I used. Any help greatfully apprciated library(GENLIB) > library(ggenealogy) > library(igraph) > # > # > ###Data input as data

[R] Error exporting dataframe from Julia to R with Feather

2019-08-08 Thread Luigi Marongiu
Hello, since I am encountering a lot of problems exporting dataframes from julia to R (there is always something wrong with the formatting, probably a missing quote) so I am trying to use Feather to do the job. I have installed Feather in Julia with `pkg.add("Feather")` and imported it with

Re: [R-es] Completar datos buscando información en otro Data Frame

2019-08-08 Thread Javier Marcuzzi
Estimado Cleiver Yam Pienso que usted está bien encaminado, pero habría una llave combinada entre las dos primeras columnas, ¿El id en la base de datos está compuesto por ambas?, o posiblemente no pero usted podría estar requiriendo esto, es simple, intente creando una columna con una combinación

Re: [R] Simulations of GAM and MARS models : sample size ; Y-outliers and missing X-data

2019-08-08 Thread varin sacha via R-help
Dear Abby, Many thanks for your response. To answer your question. For me better all the x variables (collectively), to have m% missing values. When you tell me : "Modify your code so that a single function say sim.test() computes your simulated statistics, for n sample size and m missing

Re: [R-es] Completar datos buscando información en otro Data Frame

2019-08-08 Thread Mauricio Monsalvo
Hola. Como las dos tablas tienen la variable común definida, podés hacerlo simple con library(tidyverse) datos <- inner_join(df1, df2) Saludos. El jue., 8 ago. 2019 a las 8:59, Clei Y () escribió: > > Hola a todos > > Tengo una duda, puede ser un poco básica pero no encuentro la respuesta, >

[R-es] Completar datos buscando información en otro Data Frame

2019-08-08 Thread Clei Y
Hola a todos Tengo una duda, puede ser un poco básica pero no encuentro la respuesta, tengo dos base de datos como la siguiente: Data frame 1: Id_1Id_2Dato 1 1 3 1 2 6 1 2 5 2 1 2 2 1 4 2 3 5 Data frame 2: Id_1

Re: [R] Help with if else statement

2019-08-08 Thread Linus Chen
Bert's answer is great, but since there is only two columns to be used, why not simply pt$pheno <- pmax( p$phenoQ ,p$phenoH ) Cheers, Lei On Wed, 7 Aug 2019 at 21:23, Bert Gunter wrote: > > The ifelse() construction is fast, but after a couple of nested iterations, > it gets messy and

Re: [R-es] Gráfico tiempos de supervivencia

2019-08-08 Thread Francisco Viciana
Hola, aunque con un poco de retraso, hago una aportación a este hilo: Si tienes un problema con dos escalas de tiempo sobre las que evolucionan las lineas de seguimiento, creo que es mejor que hacer un solo gráfico en forma de   diagrama de Lexis, que dos gráficos independientes. Muestro