Re: [R] Display a dataframe

2014-07-05 Thread David Winsemius
On Jul 4, 2014, at 7:27 AM, Gang Chen wrote: I really your kind help! This is exactly what I was looking for except that I need to get rid of the numbered row names. Look at the documentation: ?print.data.frame You cannot get rid of rownames in dataframes (at least as far as I know)

Re: [R] Transform a data.frame with ; sep column and another one in a a new one with the same two column but with repetitions

2014-07-05 Thread arun
Hi, Try: dat1 - read.table(text='1 TC' 'WC' '2 0'  'Instruments Instrumentation; Nuclear Science Technology;Physics, Particles Fields; Spectroscopy' '3 0' 'Nanoscience Nanotechnology; Materials Science,Multidisciplinary; Physics, Applied' '4 2'    'Physics, Nuclear; Physics, Particles

Re: [R] Transform a data.frame with ; sep column and another one in a a new one with the same two column but with repetitions

2014-07-05 Thread João Azevedo Patrício
Em 04-07-2014 15:15, arun escreveu: Hi, Try: dat1 - read.table(text='1 TC' 'WC' '2 0' 'Instruments Instrumentation; Nuclear Science Technology;Physics, Particles Fields; Spectroscopy' '3 0' 'Nanoscience Nanotechnology; Materials Science,Multidisciplinary; Physics, Applied' '4 2'

Re: [R] Display a dataframe

2014-07-05 Thread arun
You can use: print(dd1, row.names=F)     # Chisq DF   Pr(Chisq) term    153.0216306  1 7.578366e-35 # Sex    13.3696538  1 5.114571e-04 # Volume      0.8476713  1 7.144239e-01 # Weight      1.2196050  1 5.388764e-01 # Intensity    2.6349405  1 2.090719e-01 # ISO     6.0507714  1

[R] Rugarch package: arfimaspec and arfimafit

2014-07-05 Thread Anne-Marie B.
Hello, My question is related to the rugarch package and its arfimafit function. I am trying to fit an arfima(7,d,1) with an exogenous variable. Here is a part of my code: spec1- arfimaspec(mean.model = list(armaOrder = c(7, 1), include.mean = FALSE,arfima = TRUE,

Re: [R] Transform a data.frame with ; sep column and another one in a a new one with the same two column but with repetitions

2014-07-05 Thread John McKown
On Fri, Jul 4, 2014 at 7:50 AM, João Azevedo Patrício joao.patri...@gmx.pt wrote: Hi, I've been trying to solve this issue but with no success. I have some data like this: 1 TC WC 2 0 Instruments Instrumentation; Nuclear Science Technology; Physics, Particles Fields; Spectroscopy

[R] Calling Matrices from a Function

2014-07-05 Thread Cheryl Johnson
When I call matrices from a function, they are called but are not recognized as matrices. I use the code below. From the main function, when I use the command is.matrix(), the response is FALSE. Why are the matrices not recognized as matrices? Thanks in advance for any guidance. #This function

Re: [R] Best practice: to factor or not to factor for float variables

2014-07-05 Thread Sebastian Schubert
Hi Hadley, actually, I started with floating point numbers, ensured that the respective numbers are equal in R but I still got strange behaviour with dplyr's group_by: https://github.com/hadley/dplyr/issues/482 If I had to guess, I would suppose the source of this error somewhere in the C++

Re: [R] Calling Matrices from a Function

2014-07-05 Thread Sarah Goslee
Hi, This line needs double brackets: result_1 - (result[[1]]) With single brackets you're keeping the list object. With double brackets you're extracting just the object within the list. Sarah On Friday, July 4, 2014, Cheryl Johnson johnson.cheryl...@gmail.com wrote: When I call matrices

[R] Predictions from coxph or cph objects

2014-07-05 Thread Axel Urbiz
Dear R users, My apologies for the simple question, as I'm starting to learn the concepts behind the Cox PH model. I was just experimenting with the survival and rms packages for this. I'm simply trying to obtain the expected survival time (as opposed to the probability of survival at a given

Re: [R] how does a valid subscript can produce an subscript out of bounds error?

2014-07-05 Thread Witold E Wolski
Thank you. You example helped to FIX IT. The problem is I guess somehow related to: class(msexp$pepinfo$transition_group_id) [1] factor and the whole R type conversion , riddle. For subscripts my intuition is: either require integer or do the cast to the rowname type (character). However, it

Re: [R] how does a valid subscript can produce an subscript out of bounds error?

2014-07-05 Thread peter dalgaard
On 05 Jul 2014, at 16:19 , Witold E Wolski wewol...@gmail.com wrote: Thank you. You example helped to FIX IT. The problem is I guess somehow related to: class(msexp$pepinfo$transition_group_id) [1] factor and the whole R type conversion , riddle. For subscripts my intuition is:

Re: [R] how does a valid subscript can produce an subscript out of bounds error?

2014-07-05 Thread Patrick Burns
I think you are somewhere between Circle 8.2.6 of 'The R Inferno' http://www.burns-stat.com/documents/books/the-r-inferno/ and the basics of subscripting http://www.burns-stat.com/documents/tutorials/impatient-r/more-r-subscript/ Pat On 05/07/2014 15:19, Witold E Wolski wrote: Thank you.

Re: [R] metafor package: changing decimal in forest plot to midline decimal

2014-07-05 Thread Viechtbauer Wolfgang (STAT)
I found this: https://stat.ethz.ch/pipermail/r-help/2012-August/321057.html So, use this before drawing the forest plot: options(OutDec=\xB7) Best, Wolfgang -- Wolfgang Viechtbauer, Ph.D., Statistician Department of Psychiatry and Psychology School for Mental Health and Neuroscience Faculty

Re: [R] Using subplot (from Hmisc) along with par(mfrow)

2014-07-05 Thread Greg Snow
The subplot function in the TeachingDemos package is more up to date than the version in Hmisc (the Hmisc version is a copy of an earlier version of the one in TeachingDemos). If you replace library(Hmisc) with library(TeachingDemos) (with a recent version of TeachingDemos installed) then the

Re: [R] Using R to analyze multiple MRI studies

2014-07-05 Thread Suzen, Mehmet
Did you inspect the CRAN view for Medical imaging? http://cran.r-project.org/web/views/MedicalImaging.html On 3 July 2014 17:09, moleps islon mole...@gmail.com wrote: I need to analyze multiple T1 contrast enhanced MRI studies from different patients. They are all in DICOM format. I see that

Re: [R] Predictions from coxph or cph objects

2014-07-05 Thread David Winsemius
On Jul 5, 2014, at 5:28 AM, Axel Urbiz wrote: Dear R users, My apologies for the simple question, as I'm starting to learn the concepts behind the Cox PH model. I was just experimenting with the survival and rms packages for this. I'm simply trying to obtain the expected survival time

Re: [R] Best practice: to factor or not to factor for float variables

2014-07-05 Thread MacQueen, Don
However, format((0.1+0.2)) == format(0.3) [1] TRUE Which suggests that if you want to treat measured variables as categories, one way to do it is to format them first. Of course, one may have to control the format more carefully than above (if necessary, see for example ?formatC). merge() on

Re: [R] Predictions from coxph or cph objects

2014-07-05 Thread Axel Urbiz
Thank you David. It is my understanding that using survit below I get the median predicted survival. I actually was looking for the mean. I can't seem to find in the documentation how to get that. options(na.action=na.exclude) # retain NA in predictions fit - coxph(Surv(time, status) ~ age +

Re: [R] Predictions from coxph or cph objects

2014-07-05 Thread David Winsemius
On Jul 5, 2014, at 12:43 PM, Axel Urbiz wrote: Thank you David. It is my understanding that using survfirsurvit below I get the median predicted survival. I actually was looking for the mean. I can't seem to find in the documentation how to get that. options(na.action=na.exclude) #

Re: [R] Predictions from coxph or cph objects

2014-07-05 Thread David Winsemius
On Jul 5, 2014, at 9:12 PM, David Winsemius wrote: On Jul 5, 2014, at 12:43 PM, Axel Urbiz wrote: Thank you David. It is my understanding that using survfirsurvit below I get the median predicted survival. I actually was looking for the mean. I can't seem to find in the documentation how

Re: [R-es] error al leer una linea desde un archivo de texto

2014-07-05 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? Dos notas sobre este hilo: 1) La primera es que es fundamental especificar la plataforma sobre la que uno encuentra los problemas relacionados con los códigos de caracteres. Para los efectos, solo hay dos: Windows (aferrado al latin1) y el resto, que utiliza UTF-8. 2) Para leer