need help with renaming a variable

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

need help with renaming a variable

Pavel Yakovlev
Hello.

I am new to R, so my question/problem might be very basic, but I cannot
figure out how to solve it.
So, I would really appreciate your help.

I would like to rename a variable in a very large file (181GB) called
"2013.xdf" that is saved on my external hard drive.

I tried running the following code to rename variable # 2 in the file and
save this change, which produced some errors that I cannot resolve:

> temp.data <- rxGetVarInfo("E:/2013.xdf")
> temp.data[2] <- "transsactionnumber"
> rxSetVarInfo(2013fixed.data, outfile)
Error: unexpected symbol in "rxSetVarInfo(2013fixed.data"
> rxSetVarInfo(temp.data, outfile)
Error in is.data.frame(file) : object 'outfile' not found
> rxSetVarInfo(outfile)
Error in rxSetVarInfoXdf(varInfo, file = data) :
  object 'outfile' not found


Please help me figure out how to do it right.

Gratefully,
--

Pavel A. Yakovlev, Ph.D.
Associate Professor
819 Rockwell Hall
Department of Economics and Finance
Duquesne University
600 Forbes Avenue
Pittsburgh, PA 15282
Work Phone: 412-396-1908

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: need help with renaming a variable

Jim Lemon-4
Hi Pavel,
The problem may be with the name "2013fixed.data". I don't know where
that came from, but try naming it "fixed2013.data".

Jim


On Fri, Jan 23, 2015 at 4:53 AM, Pavel Yakovlev <[hidden email]> wrote:

> Hello.
>
> I am new to R, so my question/problem might be very basic, but I cannot
> figure out how to solve it.
> So, I would really appreciate your help.
>
> I would like to rename a variable in a very large file (181GB) called
> "2013.xdf" that is saved on my external hard drive.
>
> I tried running the following code to rename variable # 2 in the file and
> save this change, which produced some errors that I cannot resolve:
>
>> temp.data <- rxGetVarInfo("E:/2013.xdf")
>> temp.data[2] <- "transsactionnumber"
>> rxSetVarInfo(2013fixed.data, outfile)
> Error: unexpected symbol in "rxSetVarInfo(2013fixed.data"
>> rxSetVarInfo(temp.data, outfile)
> Error in is.data.frame(file) : object 'outfile' not found
>> rxSetVarInfo(outfile)
> Error in rxSetVarInfoXdf(varInfo, file = data) :
>   object 'outfile' not found
>
>
> Please help me figure out how to do it right.
>
> Gratefully,
> --
>
> Pavel A. Yakovlev, Ph.D.
> Associate Professor
> 819 Rockwell Hall
> Department of Economics and Finance
> Duquesne University
> 600 Forbes Avenue
> Pittsburgh, PA 15282
> Work Phone: 412-396-1908
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: need help with renaming a variable

JS Huang
In reply to this post by Pavel Yakovlev
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: need help with renaming a variable

Jim Lemon-4
In reply to this post by Jim Lemon-4
Hi Pavel,
I probably should have explained that an object name beginning with a
number is not valid. See "An Introduction to R", section 1.8. I think
that the invalid name "2013fixed.data" has somehow been generated. If
you can find where this occurred and change it to "fixed2013.data" the
original error should disappear.

Jim


On Sat, Jan 24, 2015 at 5:51 AM, Pavel Yakovlev <[hidden email]> wrote:

> Jim, I tried as you suggested but it also did not work. Here's the error:
> rxSetVarInfo(fixed2013.data, outfile)
> Error in rxSetVarInfoXdf(varInfo, file = data) :
>   object 'fixed2013.data' not found
>
> On Thu, Jan 22, 2015 at 5:50 PM, Jim Lemon <[hidden email]> wrote:
>>
>> Hi Pavel,
>> The problem may be with the name "2013fixed.data". I don't know where
>> that came from, but try naming it "fixed2013.data".
>>
>> Jim
>>
>>
>> On Fri, Jan 23, 2015 at 4:53 AM, Pavel Yakovlev <[hidden email]>
>> wrote:
>> > Hello.
>> >
>> > I am new to R, so my question/problem might be very basic, but I cannot
>> > figure out how to solve it.
>> > So, I would really appreciate your help.
>> >
>> > I would like to rename a variable in a very large file (181GB) called
>> > "2013.xdf" that is saved on my external hard drive.
>> >
>> > I tried running the following code to rename variable # 2 in the file
>> > and
>> > save this change, which produced some errors that I cannot resolve:
>> >
>> >> temp.data <- rxGetVarInfo("E:/2013.xdf")
>> >> temp.data[2] <- "transsactionnumber"
>> >> rxSetVarInfo(2013fixed.data, outfile)
>> > Error: unexpected symbol in "rxSetVarInfo(2013fixed.data"
>> >> rxSetVarInfo(temp.data, outfile)
>> > Error in is.data.frame(file) : object 'outfile' not found
>> >> rxSetVarInfo(outfile)
>> > Error in rxSetVarInfoXdf(varInfo, file = data) :
>> >   object 'outfile' not found
>> >
>> >
>> > Please help me figure out how to do it right.
>> >
>> > Gratefully,
>> > --
>> >
>> > Pavel A. Yakovlev, Ph.D.
>> > Associate Professor
>> > 819 Rockwell Hall
>> > Department of Economics and Finance
>> > Duquesne University
>> > 600 Forbes Avenue
>> > Pittsburgh, PA 15282
>> > Work Phone: 412-396-1908
>> >
>> >         [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>
>
>
>
> --
>
> Pavel A. Yakovlev, Ph.D.
> Associate Professor
> 819 Rockwell Hall
> Department of Economics and Finance
> Duquesne University
> 600 Forbes Avenue
> Pittsburgh, PA 15282
> Work Phone: 412-396-1908

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.