Import decimal coordinates from excel in r

I have an excel file with two columns, like this: lon lat 14,1910200 40,8283663 14,1910947 40,8284298 14,1912717 40,8283315 14,1910512 40,8284435 14,1910553 40,8284285 when i try to import it in R with read.xlsx , it truncates the last two decimal places. lon lat 1 14.19102 40.82837 2 14.19109 40.82843 3 14.19127 40.82833 4 14.19105 40.82844 5 14.19106 40.

从r中的excel导入小数坐标

我有一个有两列的excel文件,像这样: lon lat 14,1910200 40,8283663 14,1910947 40,8284298 14,1912717 40,8283315 14,1910512 40,8284435 14,1910553 40,8284285 当我尝试用read.xlsx将它导入R时,它会截断最后两位小数。 lon lat 1 14.19102 40.82837 2 14.19109 40.82843 3 14.19127 40.82833 4 14.19105 40.82844 5 14.19106 40.82843 如果我使用read.xlsx2它将lon和lat类型更

Most efficient format for array data for R import?

I'm in the enviable position of being able to set up the format for my data collection ahead of time, rather than being handed some crazy format and having to struggle with it. I'd like to make sure I'm setting it up in a way that minimizes headaches down the road, but I'm not very familiar with importing into multidimensional arrays so I'd like input. It also seems like a t

用于R导入的阵列数据的最有效格式?

我处于能够提前设置数据收集格式的令人羡慕的位置,而不是被交给一些疯狂的格式,并且不得不为此而挣扎。 我想确保以最小化头痛的方式设置它,但我不熟悉导入多维数组,因此我想要输入。 它也似乎是其他人可能从中获得一些利用的思想练习。 我正在编译大量数据摘要(500+),每个实验有23个单一数据值,另外两个矢量在100到1500个数据值之间变化(这两个向量的长度总是匹配每个样本的长度,但它们的长度对于每个样品是不同的

Read multiple excel spreadsheets into R using readxl and correct variable types

I have several excel files that I am trying to read into R using the package readxl . The excel files consist of several tabs each of 60000 rows having four columns of variables. The first column is a simple integer count to track seconds from 0, 1, 2, etc. The second column is colon separated ( : ) time in HH:MM:SS. The third column is the forward slash separated ( / ) date as MM/DD/YYYY. Th

使用readxl和正确的变量类型将多个excel电子表格读入R中

我有几个excel文件,我试图用readxl包读入R中。 excel文件包含多个标签,每个标签有60000行,有四列变量。 第一列是一个简单的整数计数从0,1,2,等等跟踪秒第二列是冒号隔开( : MM::)在HH时间SS。 第三列是以MM / DD / YYYY分隔的正斜杠( / )日期。 第四列是浮点小数(例如338.6)。 使用下面的代码我得到了四列,一些格式是一致的,但有些数据似乎被误解为日期或小数而不是整数,时间或日期。 > data1 <

Reformatting times into data that can be manipulated

I have a data set that needs a lot of cleaning up in the formatting, and at some point I would like to calculate the time that people in the study spent fishing. This would be easy if the times that fishing started and stopped were in a normal format, but for some reason the data are not in a useful decimal format. For example, 10:45 in the morning is recorded as 10.45, while 11:10 would be 11.

将时间重新格式化为可以操纵的数据

我有一个数据集,需要在格式化方面进行大量的清理工作,并且在某些时候我想要计算研究人员在钓鱼的时间。 如果捕鱼开始和停止的时间是正常格式,这很容易,但由于某些原因数据不是有用的十进制格式。 例如,早上10:45记录为10.45,而11:10将是11.10。 我已经尝试过让Excel使用冒号替换所有的句点(它不会这样做,而其他人已经试图帮助我使Excel合作)。 我可以考虑一些在R中这样做的方法,但我不知道如何继续。 首先,如果

How to extract code from .Rdata file?

I have .Rdata file that "stores" some logic/code. How can I extract the code written in this .Rdata file? I want to edit/fix this code, but instead the general pipeline loads this .Rdata with it's variables and SVM model without the option to fix and edit. Please advise. PS .Rdata saves a workspace, which includes the function and value objects created during an open session

如何从.Rdata文件中提取代码?

我有.Rdata文件“存储”一些逻辑/代码。 我怎样才能提取写在这个.Rdata文件中的代码? 我想编辑/修复这段代码,但是一般的管道会加载这个.Rdata及其变量和SVM模型,而无需修复和编辑。 请指教。 PS .Rdata保存一个工作空间,其中包括R中打开会话期间创建的函数和值对象,为了创建这些对象,我需要实际的逻辑/代码/初始化,例如,我得到svm模型拟合结果,但没有创建这个对象的代码,这就是我需要的。 您可以尝试加载RData

Saving a single object within a function in R: RData file size is very large

I am trying to save trimmed-down GLM objects in R (ie with all the "non-essential" characteristics set to NULL eg residuals, prior.weights, qr$qr). As an example, looking at the smallest object that I need to do this with: print(object.size(glmObject)) 168992 bytes save(glmObject, "FileName.RData") Assigning this object in the global environment and saving leads to an RData file of

在R中的函数内保存单个对象:RData文件大小非常大

我试图在R中保存修剪下来的GLM对象(即将所有“非必要”特征设置为NULL,例如残差,prior.weights,qr $ qr)。 举个例子,看看我需要做的最小的对象: print(object.size(glmObject)) 168992 bytes save(glmObject, "FileName.RData") 在全局环境中分配此对象并保存会生成约6KB的RData文件。 但是,我需要在一个函数中创建并保存glm对象,这本身就是一个函数。 所以代码看起来像这样: subFn <- function(DT, otherArg,

Rshiny gives error after loading rpart.object type using .RData file

I have saved the .Rdata file, which contains 3 R objects: 1. Vector 2. Character String 3. rpart.object (I figured out that this object in .RData only creating issue, as if I remove this object from .RData file, Shiny app works fine.) Whenever I load the .RData file and refresh the application Rshiny gives error below: Error in .rs.getShinyFunction(params$name, params$where) : attempt to appl

使用.RData文件加载rpart.object类型后,Rshiny发生错误

我保存了包含3个R对象的.Rdata文件: 1. Vector 2. Character String 3. rpart.object (I figured out that this object in .RData only creating issue, as if I remove this object from .RData file, Shiny app works fine.) 每当我加载.RData文件并刷新应用程序Rshiny在下面给出错误: .rs.getShinyFunction错误(params $ name,params $ where):尝试应用非函数 为了避免上述问题,我尝试了以下选项: 在全球环境

convert list of Rdata into dataframe in R

I have 1000 lists saved as Rdata all saved in one directory. Each list has the same name, has 5 items and looks like this: list.hv_Amono_volume [[1]] [1] 1.059246 [[2]] [1] 1.047688 [[3]] [1] 10.70799 [[4]] [1] 10.30472 [[5]] [1] 2.53379 When first storing the files in my directory I had given each file a unique name ie.: 1_list.hv_Amono_volume_rand.Rdata, 2_list.hv_Amono_volume_rand.R

将Rdata的列表转换为R中的数据帧

我有1000个保存为Rdata的列表全部保存在一个目录中。 每个列表都有相同的名称,有5个项目,如下所示: list.hv_Amono_volume [[1]] [1] 1.059246 [[2]] [1] 1.047688 [[3]] [1] 10.70799 [[4]] [1] 10.30472 [[5]] [1] 2.53379 当首先将文件存储在我的目录中时,我给每个文件一个唯一的名称,例如:1_list.hv_Amono_volume_rand.Rdata, 2_list.hv_Amono_volume_rand.Rdata, 3_list.hv_Amono_volume_rand.Rdata ..

Most portable way to embed a README message in an RData (R workspace) file

I'm developing a workflow where user-submitted data are validated and some preliminary statistical tests are run, and then the resulting workspace is sent to a statistician for further analysis. In some scenarios, the RData file will be sent to a statistician who was, until then, not familiar with the project. I would like for them to be able to open the RData file and be shown a message s

大多数可移植的方式将README消息嵌入到RData(R workspace)文件中

我正在开发一个用户提交的数据经过验证的工作流程,并且运行了一些初步的统计测试,然后将生成的工作空间发送给统计人员进行进一步分析。 在某些情况下,RData文件将发送给统计员,直到那时,他们对项目不熟悉。 我希望他们能够打开RData文件并显示一条总结项目的消息,告诉他们打开的工作区中包含的内容以及可以查找更多信息的URL。 问题在于,我试图尽可能少地依赖统计学家运行命令或加载包。 我已经能够提出的最好的(

reading raw data in R to be saved as .RData file using the dropbox api

Having worked out the oauth signature approval system, for dropbox, I wanted to download an .RData file that I had saved there, using the API, and httr 's GET function. The request was sucessfull and comes back with data, but it is in a raw format, and was wondering how do I go about converting it into an RData file again on my local drive. This is what I've done so far:... require(h

读取R中的原始数据以使用Dropbox API保存为.RData文件

在编写了oauth签名认可系统后,我希望下载一个我保存在那里的.RData文件,使用API​​和httr的GET功能。 该请求成功并返回数据,但它是原始格式,并且想知道如何在本地驱动器上再次将其转换为RData文件。 这是我迄今为止所做的:... require(httr) db.file.name <- "test.RData" db.app <- oauth_app("db",key="xxxxx", secret="xxxxxxx") db.sig <- sign_oauth1.0(db.app, token="xxxxxxx", token_secret="xxxxxx")