I think the advice about the file format is an track, but you imply modifying
the file as a solution but that is probably not the best approach. Using a
decent text editor that shows you what invisible characters are in the file can
guide you in adjusting the arguments to read.table. for example
> On Feb 27, 2016, at 6:04 AM,
> wrote:
>
> Hi,
>
> I read data from file as follows
>
> Data<-read.table("file.txt",header=T,sep="\t")
>
> mode(Data)
> list
>
> I want to convert data to data frame,
It is already a dataframe. That is the class of object that read.table returns.
> I tr
To known the format of your object, please use
class(Data)
str(Data)
Be sure to have regular space between strings in your file.txt.
Karim
On Sat, Feb 27, 2016 at 3:56 PM, Ivan Calandra
wrote:
> Hi,
>
> I have seen this question a few days/weeks ago...
>
> Data.frames are special list, so it's
Hi,
I have seen this question a few days/weeks ago...
Data.frames are special list, so it's normal.
Read the help for read.table(), especially the "value" section (where
the output of the function is described). And read also some
introductory material, where the different data types are expla
Hi,
I read data from file as follows
Data<-read.table("file.txt",header=T,sep="\t")
mode(Data)
list
I want to convert data to data frame, I tried the following:
as.data.frame(Data)
data.frame(Data)
But the Data did not change
When I tried
as.data.frame(unlist(Data))
The Data converted to a
On 15/02/2016 7:41 AM, asma.r...@gmail.com wrote:
Hi,
I read data from file as follows
Data<-read.table("file.txt",header=T,sep="\t")
mode(Data)
list
I want to convert data to data frame, I tried the following:
as.data.frame(Data)
data.frame(Data)
But the Data did not change
It is alread
On Monday, February 15, 2016, wrote:
> Hi,
>
> I read data from file as follows
>
> Data<-read.table("file.txt",header=T,sep="\t")
>
> mode(Data)
> list
Data is a data frame; that's what read.table() produces. A data frame is a
special type of list.
Take a look at
class(Data)
>
> I want to
Hi,
I read data from file as follows
Data<-read.table("file.txt",header=T,sep="\t")
mode(Data)
list
I want to convert data to data frame, I tried the following:
as.data.frame(Data)
data.frame(Data)
But the Data did not change
When I tried
as.data.frame(unlist(Data))
The Data converted to a
On 8/24/2009 2:06 AM, Petr PIKAL wrote:
> Hi
>
> r-help-boun...@r-project.org napsal dne 23.08.2009 17:29:48:
>
>> On 8/23/2009 9:58 AM, David Winsemius wrote:
>>> I still have problems with this statement. As I understand R, this
>> should be impossible. I have looked at both you postings and ne
Hi
r-help-boun...@r-project.org napsal dne 23.08.2009 17:29:48:
> On 8/23/2009 9:58 AM, David Winsemius wrote:
> > I still have problems with this statement. As I understand R, this
> should be impossible. I have looked at both you postings and neither of
> them clarify the issues. How can you ha
On 8/23/2009 9:58 AM, David Winsemius wrote:
> I still have problems with this statement. As I understand R, this
should be impossible. I have looked at both you postings and neither of
them clarify the issues. How can you have blanks or spaces in an R
numeric vector?
Just because I search numeri
On Aug 23, 2009, at 2:47 AM, Alexander Shenkin wrote:
On 8/21/2009 3:04 PM, David Winsemius wrote:
On Aug 21, 2009, at 3:41 PM, Alexander Shenkin wrote:
Thanks everyone for their replies, both on- and off-list. I should
clarify, since I left out some important information. My original
dat
On 8/21/2009 3:04 PM, David Winsemius wrote:
>
> On Aug 21, 2009, at 3:41 PM, Alexander Shenkin wrote:
>
>> Thanks everyone for their replies, both on- and off-list. I should
>> clarify, since I left out some important information. My original
>> dataframe has some numeric columns, which get ch
On Aug 21, 2009, at 3:41 PM, Alexander Shenkin wrote:
Thanks everyone for their replies, both on- and off-list. I should
clarify, since I left out some important information. My original
dataframe has some numeric columns, which get changed to character by
gsub when I replace spaces with NAs.
Thanks everyone for their replies, both on- and off-list. I should
clarify, since I left out some important information. My original
dataframe has some numeric columns, which get changed to character by
gsub when I replace spaces with NAs. Thus, in going back to a
dataframe, those (now character
On Aug 21, 2009, at 11:47 AM, Alexander Shenkin wrote:
Hello all,
I have a list which I'd like to convert to a data frame, while
maintaining control of the columns' data types (akin to the colClasses
argument in read.table). My numeric columns, for example, are getting
converted to factors by
Hi Allie,
On Aug 21, 2009, at 11:47 AM, Alexander Shenkin wrote:
Hello all,
I have a list which I'd like to convert to a data frame, while
maintaining control of the columns' data types (akin to the colClasses
argument in read.table). My numeric columns, for example, are getting
converted to
Hello all,
I have a list which I'd like to convert to a data frame, while
maintaining control of the columns' data types (akin to the colClasses
argument in read.table). My numeric columns, for example, are getting
converted to factors by as.data.frame. Is there a way to do this, or
will I have
18 matches
Mail list logo