找回密码
 注册
查看: 2800|回复: 0

R语言:dataentry()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 17:31:42 | 显示全部楼层 |阅读模式
dataentry(utils)
dataentry()所属R语言包:utils

                                        Spreadsheet Interface for Entering Data
                                         输入数据的电子表格界面

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

A spreadsheet-like editor for entering or editing data.
一个类似电子表格的编辑器输入或编辑数据。


用法----------Usage----------


data.entry(..., Modes = NULL, Names = NULL)
dataentry(data, modes)
de(..., Modes = list(), Names = NULL)



参数----------Arguments----------

参数:...
A list of variables: currently these should be numeric or character vectors or list containing such vectors.
变量列表:目前,这些应该是数字或字符向量或列表含有这种向量。


参数:Modes
The modes to be used for the variables.
变量的使用模式。


参数:Names
The names to be used for the variables.
用于变量的名称。


参数:data
A list of numeric and/or character vectors.
数字和/或特征向量列表。


参数:modes
A list of length up to that of data giving the modes of (some of) the variables. list() is allowed.
列表的长度的data(部分)变量的模式。 list()是允许的。


Details

详情----------Details----------

The data entry editor is only available on some platforms and GUIs. Where available it provides a means to visually edit a matrix or a collection of variables (including a data frame) as described in the Notes section.
数据录入编辑,仅在某些平台和GUI。在哪里可以直观地编辑矩阵变量(包括数据框)中的“注释”部分中所述的集合,它提供了一种手段。

data.entry has side effects, any changes made in the spreadsheet are reflected in the variables.  The functions de, de.ncols, de.setup and de.restore are designed to help achieve these side effects. If the user passes in a matrix, X say, then the matrix is broken into columns before dataentry is called. Then on return the columns are collected and glued back together and the result assigned to the variable X.  If you don't want this behaviour use dataentry directly.
data.entry有副作用,在电子表格中所作的任何更改将反映在变量。职能de,de.ncols,de.setup和de.restore旨在帮助实现这些副作用。如果用户在一个矩阵时,X说,然后矩阵分解成dataentry被称为前列。然后返回列的收集和粘到一起,结果分配给变量X。如果你不希望这种行为直接使用的DataEntry。

The primitive function is dataentry. It takes a list of vectors of possibly different lengths and modes (the second argument) and opens a spreadsheet with these variables being the columns. The columns of the dataentry window are returned as vectors in a list when the spreadsheet is closed.
原始的功能是dataentry。它需要一个可能不同长度的向量和模式(第二个参数)的列表并打开这些变量列的电子表格。返回的DataEntry窗口的列列表中的电子表格关闭时的向量。

de.ncols counts the number of columns which are supplied as arguments to data.entry. It attempts to count columns in lists, matrices and vectors.  de.setup sets things up so that on return the columns can be regrouped and reassigned to the correct name. This is handled by de.restore.
de.ncols数列数,这是作为data.entry的参数提供。它试图以数列列表,矩阵和向量。 de.setup设置的东西,以便返回的列可以重组和重新分配给正确的名称。这是由de.restore处理。


值----------Value----------

de and dataentry return the edited value of their arguments. data.entry invisibly returns a vector of variable names but its main value is its side effect of assigning new version of those variables in the user's workspace.
de和dataentry返回他们的论据已编辑的值。 data.entry无形返回一个变量名的向量,但它的主要价值是其分配给用户的工作空间中的这些变量的新版本的副作用。


注意----------Note----------

The details of interface to the data grid may differ by platform and GUI.  The following description applies to the GraphApp-based implementation under Windows.
平台和GUI接口数据网格的细节可能会有所不同。下面的说明适用于Windows下的GraphApp的实现。

You can navigate around the grid using the cursor keys or by clicking with the (left) mouse button on any cell.  The active cell is highlighted by thickening the surrounding rectangle.  Moving to the right or down will scroll the grid as needed: there is no constraint to the rows or columns currently in use.
您可以浏览周围电网使用光标键或按一下上的任何单元(左)鼠标按钮。活动单元格突出显示增厚周围的矩形。向右移动或向下滚动电网急需:有没有正在使用中的行或列的约束。

There are alternative ways to navigate using the keys.  Return and (keypad) Enter and LineFeed all move down. Tab moves right and Shift-Tab move left.  Home moves to the top left.
有导航键使用的替代方法。返回(键盘)输入和换行符所有下移。 Tab键移动权利和Shift-Tab移动离开。首页移动到左上角。

PageDown or Control-F moves down a page, and PageUp or Control-B up by a page.  End will show the last used column and the last few rows used (in any column).
下一页“或”控制“ -  F向下移动一个页面,PageUp或控制-B的页面。年底将显示上次使用的列和最后几行使用(任何列)。

Using any other key starts an editing process on the currently selected cell: moving away from that cell enters the edited value whereas Esc cancels the edit and restores the previous value.  When the editing process starts the cell is cleared. The cursor changes to an I-beam to indicate that the cell is in enter mode. In numerical columns (the default) only letters making up a valid number (including -.eE) are accepted, and entering an invalid edited value (such as blank) enters NA in that cell.  The last entered value can be deleted using the  BackSpace or Del(ete) key.  Only a limited number of characters (currently 29) can be entered in a cell, and if necessary only the start or end of the string will be displayed, with the omissions indicated by > or <.  (The start is shown except when editing.)
使用任何其他键,开始对当前选定的单元格的编辑过程中,单元进入编辑的值,而Esc键取消编辑和恢复以前的值。当编辑过程中的单元被清除。 I型光标变为,表明单元在进入模式。在数值列(默认值)的字母组成一个有效的数量(包括-.eE)被接受,并输入一个无效的编辑的值(如空白)进入NA在该单元格。使用Backspace键或DEL(ETE)键可删除最后输入的值。只有有限的字符数(目前为29),可以在一个单元格输入,只是一个开始或结束的字符串,如果有必要将显示与遗漏的,由>或<表示。 (开始编辑时除外)。

Double-clicking on a cell selects the cell and makes it into an editable field (a cursor will appear at the end of the text and it will change to the text highlight colour).  The edited text is entered by selecting another cell, for example by hitting Return. There is no way to cancel the edits.  The field will be expanded to the right if necessary to accommodate existing long strings, so it is preferable not to edit in the right-most displayed column.  (The editable field is itself scrollable.)
双击单元格,选择单元和成一个可编辑的字段(游标会出现在文本的末尾,它会改变文本高亮颜色)。编辑的文本输入选择另一个单元,例如打回。有没有办法取消编辑。将扩大到外地的权利,如果有必要,以适应现有的长串,所以它是最好不要在最右边显示的列编辑。 (编辑领域本身就是滚动。)

Entering a value in a cell further down a column than the last used cell extends the variable and fills the gap (if any) by NAs (not shown on screen).
进入下来比过去使用的单元格的列值在单元进一步扩展了可变和填充NA的差距(如有)(不显示在屏幕上)。

The column names can only be selected by clicking in them.  This gives a popup menu to select the column type (currently Real (numeric) or Character) or to change the name.  Changing the type converts the current contents of the column (and converting from Character to Real may generate NAs.) Enter the changes made in the popup window by clicking on its close box.
列名,只能通过点击他们选择。这给出了一个弹出菜单中选择列类型(目前雷亚尔(数字)或字符),或更改名称。改变类型转换(转换字符可能产生NA。)在弹出窗口中单击关闭框输入的变化列的当前内容。

New columns are created by entering values in them (and not by just assigning a new name).  The mode of the column is auto-detected from the first value entered: if this is a valid number it gives a numeric column.  Unused columns are ignored, so adding data in var5 to a three-column grid adds one extra variable, not two.
创建新列在其中输入值(而不是只分配一个新的名字)。列的模式是从第一次输入的值自动检测:如果这是一个有效的数字,它给出了一个数字列。未使用的列将被忽略,所以加入var5一个三列的网格中的数据增加了一个额外的变量,而不是两个。

There is a popup-menu accessed by right-clicking anywhere in the window that refers to the currently selected cell. This can copy the value to or paste from the clipboard, or paste in common values in that column. Copying and pasting can also be accessed by the usual keyboard shortcuts Control-C and Control-V.
有一个弹出菜单的窗口,是指当前选定的单元格中的任何地方通过右击访问。这可复制的价值或从剪贴板粘贴或粘贴在该列中的共同价值观。复制和粘贴,也可以由通常的键盘快捷键控制,C和Control-V的访问。

Columns can be resized by selecting and dragging a line (the cursor will change) within limits: columns must be between 4 and 50 chars wide. The Autosize item on the popup menu will resize the currently selected column.
列可以调整大小选择和拖动内界线(光标会改变):列之间必须是4个和50个字符宽。在弹出菜单上的AutoSize项目将调整当前选定的列。

Control-L will refresh the display, recalculating field widths to fit the current entries.
控制-L将刷新显示,重新计算字段的宽度,以适应当前的条目。

In the default mode the column widths are chosen to fit the contents of each column, with a default of 10 characters for empty columns. you can specify fixed column widths by setting option de.cellwidth to the required fixed width (in characters). (set it to zero to return to variable widths).  The displayed width of any field is limited to 50 characters (and by the window width).
列的宽度,在默认模式下,选择适合每一列的内容,用默认的空列10个字符。通过设置选项de.cellwidth所需的固定宽度(以字符为单位),您可以指定固定的列宽。 (设置为0返回到变量的宽度)。任何领域的显示宽度被限制为50个字符(和窗口的宽度)。

The initial size of the data editor window is taken from the default dimensions of a pager (see Rconsole), but adjusted downwards to show a whole number of rows and columns.
寻呼机的默认尺寸的数据编辑器窗口的初始大小“(见Rconsole),但向下调整显示的行和列数。


参见----------See Also----------

vi, edit: edit uses dataentry to edit data frames.
vi,edit:edit使用dataentry编辑的数据框。


举例----------Examples----------


# call data entry with variables x and y[调用数据输入变量x和y]
## Not run: data.entry(x,y)[#无法运行:data.entry(X,Y)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 04:06 , Processed in 0.019904 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表