+ Reply to Thread
Results 1 to 6 of 6

Thread: Storing all function and data / for future restoring in a new PC.

  1. #1
    Points: 2,816, Level: 32
    Level completed: 44%, Points required for next Level: 84

    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    Storing all function and data / for future restoring in a new PC.




    Dear-

    It seems that there is NO easy way to move all functions and data to a new PC.

    There is an alternative way using

    dump(ls()[sapply(ls(), function(x) is.function(get(x)))], "functions.Rdmpd.txt")

    for storing all functions in text format for future use by source().


    Now how to store all the data (into mostly 2 by 2 csv format )for future use?

    How about 3-dimensional array?

    -Jay

  2. #2
    Devorador de queso
    Points: 97,410, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent PosterActivity Award
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,981
    Thanks
    308
    Thanked 2,639 Times in 2,254 Posts

    Re: Storing all function and data / for future restoring in a new PC.

    What exactly are you asking about? Do you just want to save the functions and data that are in your workspace? If not you really need to describe your situation better.
    I don't have emotions and sometimes that makes me very sad.

  3. #3
    Points: 2,816, Level: 32
    Level completed: 44%, Points required for next Level: 84

    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Storing all function and data / for future restoring in a new PC.

    Of course, all function and data is automatically stored in R workspace when we log out.

    In case that 1) we move R system to a new PC or 2) we move current R system to Splus (an old version of R), we need text (csv) version of all function and data, for easy and clear moving.

    Instead of the binary format in current R (that we cannot see), we like to change to a format (that any other software can understand).

  4. #4
    Points: 8,120, Level: 60
    Level completed: 85%, Points required for next Level: 30

    Posts
    169
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Re: Storing all function and data / for future restoring in a new PC.

    1. Copy the folders with your R Programs.
    2. Copy the folders with your (external original) data.
    3. Install R and R-Studio on the new PC.
    4. Make a list of your installed R packages and reinstall them on the new PC (you can write a little R program for this).

    Consuli
    Prediction is very difficult, especially about the future. (Niels Bohr)

  5. #5
    Points: 2,816, Level: 32
    Level completed: 44%, Points required for next Level: 84

    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Storing all function and data / for future restoring in a new PC.

    Of course, we all know above 4 steps (moving binary file to new PC).

    Here, we are looking for safe(versatile) way to move R function and data ( with the safest method as a text (csv) format ).

    There are too many number of local functions and data so that it is hard(time-consuming) to move everything separately.

    We like to use simple R commands (a few line with such as apply) to backup everything everyday.

    PS) The above one line seems to work for storing local functions. How about (2-dim) data?

  6. #6
    Devorador de queso
    Points: 97,410, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent PosterActivity Award
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,981
    Thanks
    308
    Thanked 2,639 Times in 2,254 Posts

    Re: Storing all function and data / for future restoring in a new PC.


    You could just use dput on everything in the workspace
    I don't have emotions and sometimes that makes me very sad.

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats