如何拯救我的本地计算机上的Rs​​tudio AMI EC2文件 [英] How to save files from Rstudio AMI EC2 on my local computer

查看:521
本文介绍了如何拯救我的本地计算机上的Rs​​tudio AMI EC2文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Rstudio服务器的Amazon EC2。它工作正常,但我不知道如何拯救我的本地计算机上的文件...

I have installed Rstudio server Amazon EC2. It works fine, but I can't understand how to save files on my local computer...

在例子中,

x=5
write.csv(x,file="x.csv")
getwd()
[1] "/home/rstudio"

I can see the file in my working directory, but I cannot change w.d...

setwd("C:\\Users\\Paul\\Documents\\R")
Error in setwd("C:\\Users\\Paul\\Documents\\R") : 
  cannot change working directory

编辑: 我得到的网络错误:连接超时...如果我使用使用腻子从codingthis.com/platforms/ec2/...说明...或者主机不存在如果我使用WinSCP赋予...

I get Network error: Connection timeout... if i use instructions from codingthis.com/platforms/ec2/… using Putty... Or "Host does not exist" if I use winSCP...

有什么建议?

祝商祺!

推荐答案

如果你不能让SCP的工作,这里有一个简单的方法。首先,我将介绍如何保存一个情节,那该怎么救你已经用R做了一个CSV文件

If you can't make SCP work, here's a simpler way. First I'll show how to save a plot, then how to save a CSV file that you've made with R.

您已经开始RStudio您的EC2实例,这要归功于有用的指示在其他地方 ...

You've started your EC2 instance of RStudio, thanks to helpful instructions elsewhere...

现在你已经有了一个阴谋,你想保存的情节...... 看图形窗口的导出按钮并单击,然后单击保存剧情为图像(或PDF格式,如果你preFER)

Now you've made a plot and you want to save that plot... Look at the plot window for the "Export" button and click that, then click 'save plot as image' (or PDF if you prefer)

根据系统提示,将它保存在默认位置...

Follow the prompt and save it in the default location...

现在从图形窗口的文件窗口中点击RStudio的文件选项卡上的开关......你应该看到在列表中有你的阴谋图像文件。现在,点击更多,然后导出...

Now switch from the plot window to the files window by clicking on the 'Files' tab in RStudio... You should see your plot image file in the list there. Now click 'More' then "Export..."

您可以在这一点上编辑文件名...

You can edit the file name at this point...

然后在你点击下载将下载到默认下载目录...

And then after you click download it will download to your default download directory...

如果您已经使用R来使输出的CSV文件,您可以在下一个导出到您的下载目录中以同样的方式,你可以看到我的文件d.csv',这里的检查框,它在文件窗口。我点击更多...按钮,然后点击导出...

If you've used R to make a csv file of output, you can export that to your download directory in the same way, you can see my file 'd.csv', here with the checked box next to it in the 'Files' window. I've clicked on the 'More...' button, then 'Export...'

现在我可以编辑姓名,点击下载,并会去我的默认下载目录:

Now I can edit the name, click 'Download' and will go to my default download directory:

这是否回答你的问题?如果你的下一个问题将是我怎么获取文件到RStudio在EC2上?,请第一个实验中Rstudio的文件窗口中的上传按钮。

Does that answer your question? If your next question will be "how do I get files into RStudio on EC2?", please first experiment with the "Upload" button in the 'Files' window of Rstudio.

这篇关于如何拯救我的本地计算机上的Rs​​tudio AMI EC2文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆