Re: [R] Remove all factor levels from an R dataframe

2020-11-10 Thread Jim Lemon
Hi John, df1<-sapply(df1,as.character) Should do what you ask. The error message probably means that you should do this: df1<-df1[order(as.character(df1$year)),] as "year" is the name of the first column in df1, not a separate object. Jim On Tue, Nov 10, 2020 at 6:57 PM John wrote: > Hi, >

Re: [R] Remove all factor levels from an R dataframe

2020-11-10 Thread John
Thanks Jim. Can we do descending order? Jim Lemon 於 2020年11月10日 週二 下午4:56寫道: > Hi John, > > df1<-sapply(df1,as.character) > > Should do what you ask. The error message probably means that you should > do this: > > df1<-df1[order(as.character(df1$year)),] > > as "year" is the name of the first co

Re: [R] Remove all factor levels from an R dataframe

2020-11-10 Thread Jim Lemon
Sure John, df1<-df1[order(as.character(df1$year),decreasing=TRUE),] Jim On Tue, Nov 10, 2020 at 8:05 PM John wrote: > Thanks Jim. Can we do descending order? > > Jim Lemon 於 2020年11月10日 週二 下午4:56寫道: > >> Hi John, >> >> df1<-sapply(df1,as.character) >> >> Should do what you ask. The error mess

Re: [R] Remove all factor levels from an R dataframe

2020-11-10 Thread Eric Berger
Hi John, I was thinking that you created df1 in a way that set the 'year' column as a factor when this is not what you wanted to do. The data.frame() function takes an argument stringsAsFactors which controls this behavior. For R versions 3.6.3 or earlier, the default setting is stringsAsFactors=TR

[R] R ioanalysis pkg

2020-11-10 Thread Gaspar Núñez
Hi, Hope you are doing well, I´m trying to start working with ioanalysis package, however its being difficult for me to prepare data from my own input-output table, import it into R in order to apply the ioanalysis functions Any help on this will be highly appreciated. Please note that I do not ne

Re: [R] R ioanalysis pkg

2020-11-10 Thread Bert Gunter
There are around 20,000 specialized packages for R. This list is set up to help on standard R features and packages, but cannot possibly be expected to support 20,000 packages. As the posting guide says (did you read it??!): "If the question relates to a *contributed package* , e.g., one downloade

Re: [R] R ioanalysis pkg

2020-11-10 Thread David Winsemius
On 11/10/20 5:08 PM, Bert Gunter wrote: There are around 20,000 specialized packages for R. This list is set up to help on standard R features and packages, but cannot possibly be expected to support 20,000 packages. As the posting guide says (did you read it??!): "If the question relates to a

Re: [R] R ioanalysis pkg

2020-11-10 Thread Jim Lemon
Hi Gaspar, I can see why you are having trouble with this. The "as.inputoutput" function seems to be the core. While the manual claims you can just input the "Z", "RS_label" and and "X" matrices to "as.inputoutput" and get the "InputOutput" object that you need for all the other functions, it looks