-
2020-08-12 18:59:05
golang导入包
介绍 (Introduction)
There will be times when your code needs additional functionality outside of your current program. In these cases, you can use packages to make your program more sophisticated. A package represents all the files in a single directory on disk. Packages can define functions, types, and interfaces that you can reference in other Go files or packages.
有时您的代码需要当前程序之外的其他功能。 在这些情况下,您可以使用软件包使程序更复杂。 包代表磁盘上单个目录中的所有文件。 包可以定义您可以在其他Go文件或包中引用的功能,类型和接口。
This tutorial will walk you through installing, importing, and aliasing packages.
本教程将指导您完成安装,导入和别名化软件包。
标准库软件包 (Standard Library Packages)
The standard library that ships with Go is a set of packages. These packages contain many of the fundamental building blocks to write modern software. For instance, the
fmt
package contains basic functions for formatting and printing strings. Thenet/http
package contains functions that allow a developer to create web services, send and retrieve data over thehttp
protocol, and more.Go附带的标准库是一组软件包。 这些软件包包含编写现代软件的许多基本构件。 例如,
fmt
软件包包含用于格式化和打印字符串的基本功能。net/http
软件包包含允许开发人员创建Web服务,通过http
协议发送和检索数据等功能。To make use of the functions in a package, you need to access the package with an
import
statement. Animport
statement is made up of theimport
keyword along with the name of the package.要使用包中的功能,您需要使用
import
语句访问包。import
语句由import
关键字以及包名组成。As an example, in the Go program file
random.go
you can import themath/rand
package to generate random numbers in this manner:例如,在Go程序文件
random.go
您可以导入math/rand
包以这种方式生成随机数:random.gorandom.goimport "math/rand"
When we import a package, we are making it available in our current program as a separate namespace. This means that we will have to refer to the function in dot notation, as in
package.function
.导入包时,我们将其作为单独的命名空间在当前程序中使用。 这意味着我们将不得不像
package . function
那样以点表示法引用该函数package . function
package . function
。In practice, a function from the
math/rand
package could look like these examples:实际上,来自
math/rand
包的函数可能类似于以下示例:rand.Int()
which calls the function to return a random integer.rand.Int()
调用函数返回一个随机整数。rand.Intn()
which calls the function to return a random element from0
up to the specified number provided.rand.Intn()
调用该函数以返回从0
到提供的指定数字的随机元素。
Let’s create a
for
loop to show how we will call a function of themath/rand
package within ourrandom.go
program:让我们创建一个
for
循环,以展示如何在random.go
程序中调用math/rand
包的random.go
:random.gorandom.gopackage main import "math/rand" func main() { for i := 0; i < 10; i++ { println(rand.Intn(25)) } }
This program first imports the
math/rand
package on the third line, then moves into afor
loop which that will run 10 times. Within the loop, the program will print a random integer within the range of0
up to25
. The integer25
is passed torand.Intn()
as its parameter.该程序首先在第三行上导入
math/rand
程序包,然后进入for
循环,该循环将运行10次。 在循环内,程序将打印0
到25
范围内的随机整数。 整数25
作为参数传递给rand.Intn()
。When we run the program with
go run random.go
, we’ll receive 10 random integers as output. Because these are random, you’ll likely get different integers each time you run the program. The output will look something like this:当我们使用
go run random.go
运行程序时,我们将收到10个随机整数作为输出。 由于这些是随机的,因此每次运行该程序时,您可能会获得不同的整数。 输出将如下所示:Output6 12 22 9 6 18 0 15 6 0The integers will never go below 0 or above 24.
整数永远不会低于0或高于24。
When importing more than one package, you can use the
()
to create a block. By using a block you can avoid repeating theimport
keyword on every line. This will make your code look cleaner:导入多个软件包时,可以使用
()
创建一个块。 通过使用块,可以避免在每一行上重复import
关键字。 这将使您的代码看起来更简洁:random.gorandom.goimport ( "fmt" "math/rand" )
To make use of the additional package, we can now format the output and print out the iteration that each random number was generated on during the loop:
为了使用附加包,我们现在可以格式化输出并打印出在循环期间生成每个随机数的迭代:
random.gorandom.gopackage main import ( "fmt" "math/rand" ) func main() { for i := 0; i < 10; i++ { fmt.Printf("%d) %d\n", i, rand.Intn(25)) } }
Now, when we run our program, we’ll receive output that looks like this:
现在,当我们运行程序时,我们将收到如下所示的输出:
Output0) 6 1) 12 2) 22 3) 9 4) 6 5) 18 6) 0 7) 15 8) 6 9) 0In this section, we learned how to import packages and use them to write a more sophisticated program. So far, we have only used packages from the standard library. Next, let’s see how to install and use packages that are written by other developers.
在本节中,我们学习了如何导入包并使用它们编写更复杂的程序。 到目前为止,我们仅使用了标准库中的软件包。 接下来,让我们看看如何安装和使用其他开发人员编写的软件包。
安装套件 (Installing Packages)
While the standard library ships with many great and useful packages, they are intentionally designed to be general purpose and not specific in nature. This allows developers to build their own packages on top of the standard library for their own specific needs.
尽管标准库附带了许多很棒且有用的软件包,但它们是有意设计为通用的,而并非特定性质。 这使开发人员可以根据自己的特定需求在标准库的顶部构建自己的软件包。
The Go tool chain ships with the
go get
command. This command allows you to install third party packages to your local development environment and use them in your program.Go工具链随附
go get
命令。 此命令允许您将第三方程序包安装到本地开发环境中,并在程序中使用它们。When using
go get
to install third party packages, it is common for a package to be referenced by its canonical path. That path can also be a path to a public project that is hosted in a code repository such as GitHub. As such, if you want to import theflect
package, you would use the full canonical path:当使用
go get
安装第三方软件包时,通常会通过其规范路径来引用软件包。 该路径也可以是公共代码的路径,该公共项目托管在代码存储库(例如GitHub)中。 这样,如果要导入flect
包,则应使用完整的规范路径:- go get github.com/gobuffalo/flect 去获取github.com/gobuffalo/flect
The
go get
tool will find the package, on GitHub in this case, and install it into your$GOPATH
.在这种情况下,
go get
工具将在GitHub上找到该软件包,并将其安装到$GOPATH
。For this example the code would be installed in this directory:
对于此示例,代码将安装在以下目录中:
$GOPATH/src/github.com/gobuffalo/flect
Packages are often being updated by the original authors to address bugs or add new features. When this happens, you may want to use the latest version of that package to take advantage of the new features or resolved bug. To update a package, you can use the
-u
flag with thego get
command:软件包通常由原始作者更新,以解决错误或添加新功能。 发生这种情况时,您可能希望使用该软件包的最新版本来利用新功能或已解决的错误。 要更新软件包,可以在
go get
命令中使用-u
标志:- go get -u github.com/gobuffalo/flect 去获取-u github.com/gobuffalo/flect
This command will also have Go install the package if it is not found locally. If it is already installed, Go will attempt to update the package to the latest version.
如果在本地找不到该命令,Go也将安装该软件包。 如果已经安装,Go将尝试将软件包更新为最新版本。
The
go get
command always retrieves the latest version of the package available. However, there may be updates to previous versions of the package that are still newer than you are using, and would be useful to update in your program. To retrieve that specific version of the package, you would need to use a Package Management tool, such as Go Modules.go get
命令始终会检索可用软件包的最新版本。 但是,可能会有对该软件包以前版本的更新,这些更新仍比您使用的更新,这对于在程序中进行更新很有用。 要检索该特定版本的软件包,您需要使用“ 软件包管理”工具,例如Go Modules 。As of Go 1.11, Go Modules are used to manage what version of the package you want imported. The topic of package management is beyond the scope of this article, but you can read more about it on the Go Modules GitHub page.
从Go 1.11开始,Go模块用于管理您要导入的软件包的版本。 包管理的主题不在本文讨论范围之内,但是您可以在Go Modules GitHub页面上阅读有关它的更多信息。
别名导入的程序包 (Aliasing Imported Packages)
You may want to change a package name if you have a local package already named the same as a third party package you are using. When this happens, aliasing your import is the best way to handle the collision. You can modify the names of packages and their functions within Go by putting an
alias
name in front of the imported package.如果您已经使用与第三方软件包相同的名称来命名本地软件包,则可能需要更改软件包名称。 发生这种情况时,别名导入将是处理冲突的最佳方法。 您可以通过在导入的包前面放置一个
alias
在Go中修改包的名称及其功能。The construction of this statement looks like this:
该语句的构造如下所示:
import another_name "package"
In this example, modify the name of the
fmt
package in therandom.go
program file. We’ll change the package name offmt
tof
in order to abbreviate it. Our modified program will look like this:在此示例中,在
random.go
程序文件中修改fmt
软件包的名称。 我们将fmt
的软件包名称更改为f
以便缩写。 我们修改后的程序将如下所示:random.gorandom.gopackage main import ( f "fmt" "math/rand" ) func main() { for i := 0; i < 10; i++ { f.Printf("%d) %d\n", i, rand.Intn(25)) } }
Within the program, we now refer to the
Printf
function asf.Printf
rather thanfmt.Printf
.在程序中,我们现在将
Printf
函数称为f.Printf
而不是fmt.Printf
。While other languages favor aliasing a package for ease of use later in the program, Go does not. For instance, aliasing the
fmt
package tof
would not be consistent with the style guide.尽管其他语言更喜欢为程序包加上别名,以便于以后在程序中使用,但Go却没有。 例如,将
fmt
包别名为f
将与样式指南不一致。When renaming imports to avoid a name collision, you should aim to rename the most local or project specific import. For instance, if you had a local package called
strings
, and you also needed to import the system package calledstrings
, you would favor renaming your local package over the system package. Whenever possible, it’s best to avoid name collision altogether.在重命名导入以避免名称冲突时,您应该旨在重命名最本地或特定于项目的导入。 例如,如果您有一个名为
strings
的本地程序包,并且还需要导入一个名为strings
的系统程序包,则您将重命名本地程序包而不是系统程序包。 只要有可能,最好完全避免名称冲突。In this section, we learned how we can alias an import to avoid colliding with another import in our program. It is important to remember that readability and clarity of your program is important, so you should only use aliasing to make the code more readable or when you need to avoid a naming collision.
在本节中,我们学习了如何为导入别名,以避免与程序中的另一个导入冲突。 重要的是要记住,程序的可读性和清晰度很重要,因此,应仅使用别名来使代码更具可读性,或者在需要避免命名冲突时使用。
格式化导入 (Formatting Imports)
By formatting imports, you can sort the packages into a specific order that will make your code more consistent. Additionally, this will prevent random commits from taking place when the only thing that changes is the sort order of the imports. Since formatting imports will prevent random commits, this will prevent unnecessary code churn and confusing code reviews.
通过格式化导入,您可以按特定顺序对软件包进行排序,这将使您的代码更加一致。 另外,当唯一改变的是导入的排序顺序时,这将防止发生随机提交。 由于格式化导入将防止随机提交,因此这将避免不必要的代码搅动和混乱的代码审查。
Most editors will format imports for you automatically, or will let you configure your editor to use
goimports
. It is considered standard practice to usegoimports
in your editor, as trying to manually maintain the sort order of your imports can be tedious and prone to errors. Additionally, if any style changes are made,goimports
will be updated to reflect those style changes. This ensures that you, and anyone that works on your code, will have consistent styling in your import blocks.大多数编辑器会自动为您格式化导入,或者让您将编辑器配置为使用
goimports
。 在您的编辑器中使用goimports
被认为是标准做法,因为尝试手动维护导入的排序顺序可能很乏味并且容易出错。 此外,如果进行了任何样式更改,goimports
将被更新以反映这些样式更改。 这样可以确保您和任何处理您的代码的人在您的导入块中都具有一致的样式。Here is what an example import block may look like before formatting:
这是格式化之前示例导入块的外观:
import ( "fmt" "os" "github.com/digital/ocean/godo" "github.com/sammy/foo" "math/rand" "github.com/sammy/bar" )
Running the
goimport
tool (or with most editors that have it installed, saving the file will run it for you), you will now have the following format:运行
goimport
工具(或在大多数安装了它的编辑器中,保存文件将为您运行),您现在将具有以下格式:import ( "fmt" "math/rand" "os" "github.com/sammy/foo" "github.com/sammy/bar" "github.com/digital/ocean/godo" )
Notice that it groups all standard library packages first and then groups third party packages together with blank lines. This makes is easier to read and understand what packages are being used.
请注意,它首先将所有标准库软件包分组,然后将第三方软件包和空白行分组在一起。 这样可以更容易阅读和理解正在使用的软件包。
In this section we learned that using
goimports
will keep all of our import blocks properly formatted, and prevent unnecessary code churn between developers working on the same files.在本节中,我们了解到使用
goimports
将使我们的所有导入块保持正确的格式,并防止使用相同文件的开发人员之间不必要的代码goimports
。结论 (Conclusion)
When we import packages we’re able to call functions that are not built in to Go. Some packages are part of the standard library that installs with Go, and some we will install through
go get
.导入包时,我们可以调用Go内置的函数。 有些软件包是随Go一起安装的标准库的一部分,而有些则是通过
go get
安装的。Making use of packages allows us to make our programs more robust and powerful as we’re leveraging existing code. We can also create our own packages for ourselves and for other programmers to use in future programs.
利用包可以使我们在利用现有代码的同时使程序更强大,更强大。 我们还可以为自己和其他程序员创建自己的程序包 ,以供将来的程序使用。
翻译自: https://www.digitalocean.com/community/tutorials/importing-packages-in-go
golang导入包
更多相关内容 -
详解易语言导入语言包方法
2020-08-26 15:06:13在本文里小编给大家分享的是关于易语言导入语言包的详细步骤内容,有需要的朋友们可以学习下。 -
java导入其他软件下的包资源
2020-09-07 19:26:46Junit-4-4,fastjson-1.2.72,,Gson-2.8.5JUnit是一个Java语言的单元测试框架。它由Kent Beck和Erich Gamma建立,逐渐成为源于Kent Beck的sUnit的xUnit家族中最为成功的一个。 JUnit有它自己的JUnit扩展生态圈。多数... -
R软件导入数据_r语言怎么导入数据_R软件导入数据
2021-01-30 07:54:23R软件导入数据_r语言怎么导入数据_R软件导入数据R软件导入数据1.Rcmdr安装包导入数据:1.安装Rcmdr包,输入:install.packages(“Rcmdr”)回车接着就让其自动操作,选择一下镜像站就可以了。2.接着运行,输入:...R软件导入数据_r语言怎么导入数据_R软件导入数据
R软件导入数据
1.Rcmdr安装包导入数据:
1.安装Rcmdr包,输入:
install.packages(“Rcmdr”)
回车
接着就让其自动操作,选择一下镜像站就可以了。
2.接着运行,输入:
library(Rcmdr)
回车
就会出现附件的图形界面,在这个界面上可以实现几乎所有的统计分析方法。
以后运行,只要输入 library(Rcmdr) 即可。
————————————————————————————
2.鼠标导入:
另外数据导入还可以采用如下方式:read.table(choose.files())
——————————————————————————————
3.更改目录,语句导入:
手动方式定义自己的默认文档。导入数据。
1.右键R软件快捷方式=》属性=》起始位置=》输入目录名如:D:/data
2.打开R
3.输入 getwd() 回车怎么样,默认目录变成D:/data了吧。
4.输入read.table(“文件名.格式”)回车。导入成功。
以后只需把数据这个默认文件夹就可以了。
若想将数据转化为对数形式,输
入下面语句:
关键词:R软件 [] [,] 对数 log[,
da=read.table(“x.txt”,header=T)
注:da是这里取的名字。
读取数据时,txt文件第一行可以是数据标签。header=T则会从第二行开始取数据,否则从第一行开始取。
>daa=log(da[,1])
这里[,]是什么意思呢?维度的意思。
R软件初步:导入数据
因为我的txt数据只有一列所以我这里输入的是[,1]
好了这样就转化为对数形式了。
请问R软件如何导入数据,我在论坛中看到了相应的问答,但是没有得到答案,请大家帮忙,谢谢!说是要放在一个目录下,是什么意思,是将数据与R安装放在一个目录下吗?
文件不需要跟R安装文件放在同意文件夹下。 你只需要把R的working directory 改成数据所在文件夹就行了。
有几种不通的读入方法,根据你的数据类型, read, read.csv, read.table…..
若果数据是.csv,如下:
read.csv“” 应该就可以了。
R的working directory 在哪里??
就是R软件→文件→改变工作目录→数据所在的目录,前面说的working directory就是工作目录
首先看你的数据文件是什么类型,假如是txt文档并且放在C盘目录文件下,程序就是 read.table(“C:/***.txt”)
如果是SPSS文件就是read.spss(“C:/***,sav”)
如何用R软件导入excel数据表中数据
请问如何在R中引用电子表格中的数据,我看了有关数据导入的文献,可是不太明白,期盼知道的同仁给予说明!
把EXCEL数据转换成单表格格式.csv,然后利用read.csv读入
我有一篇关于R数据导入导出的文章,可是写的不是很详细,
还想请教一下 如何对指定目录的数据导入
我用read.table(“file”…)格式导入 可是显示 文件不存在 但事先我已经将文件放在 文件bin 中了
excel表可以先转化成“文本文件(制表符分隔)”,
用函数read.delm()读该文本文件!
即>rd
如果你有什么细节的问题可以采用help命令,help(read.table)
可以下载这个包 xlsReadWrite
然后可以用read.xls
将excel表格转换成“文本文件(制表符分隔)”,
用read.table(“.txt 文件的绝对路径”,header=T)
或者转换成.csv也行,用法与read.table()一样
只需改成read.csv()即可
一定要用绝对路径,否则运行出错,最好放在R 文件区
试试 用 package “XLConnect”, 不过总会出现一些问题:比如script 无法保存,R界面无法正常工作
library(XLConnect)
wd
setwd(wd)
dir()
fnm
fnm
wb1
gini.header
gini
library(RODBC)
随便起个名 = odbcConnectExcel(file.choose())
sqlTables(上面那个名)
随便起个名 = sqlFetch(上面那个名, “excel里的文件名”)
第一种方法:首先将当前工作目录更改所使用的文件下,利用change directory修改工作目录。
第二种方法:在read.table()中给出路径。路径中的“\”必须全部用”/”替换。
excel另存为.CSV
R命令:read.csv(file.choose()) 【如果第一行为标题行,命令为:read.csv(file.choose(),header=TRUE)】
喜欢 (2)or分享 (0)
-
SAP语言包的导入与配置并编译系统(实践版)[汇编].pdf
2021-10-12 00:17:56SAP语言包的导入与配置并编译系统(实践版)[汇编].pdf -
浅谈pycharm导入pandas包遇到的问题及解决
2020-12-17 12:54:00python刚入门的小白,不定时更新自己在做实验的遇到的问题及解决方案。...因为实验的之前需要用到Pandas来进行处理,而刚刚新安装的pycharm里不具备这个包,需要打开cmd进行安装 打开cmd,进行安装pandas包 -
R语言作图入门——软件安装,数据导入
2022-04-09 15:58:14R软件安装,数据导入原创:黄小仙
小仙最近受到了一个打击,之前小仙以为自己写的教程已经比较适合入门了,初学的选手就跟着就能画出图。但是小仙却忽略了一点,粉丝们可能来自不同的行业,拥有不同的专业背景。有些同学可能在特定的情况下接触到了R语言,在下定决心要自己试试的时候,却不知如何入手。
如果你是这种情况…
擅长跟瓶瓶罐罐和仪器打交道,却由于项目的需要,不得不赶鸭子上架自己来写代码进行一些数据处理或分析,或者画一些比较复杂的图;
第一次使用R,软件下载安装好了之后便不知所措;那么这篇文章可能会帮到你!
小仙决定再补充一篇入门文章,给小白中的小白,让你从R的门外走到门内来!软件下载和安装
https://cran.r-project.org/bin/windows/base/ R软件的下载链接
https://www.rstudio.com/products/rstudio/download/#download RStudio下载链接
RStudio相当于是R的集成开发环境,安装好两个软件之后,直接打开RStudio软件,直接在RStudio里写代码就好了,一般情况下不需要打开R,但是RStudio的使用依赖于R。
导入数据
① 查看文件格式
② 另存为csv格式
③ 打开RStudio,输入代码
④ 数据成功导入,查看运行结果
成功导入数据之后呢,就可以按照R语言作图系列的其他文章来画出你想要的图啦。
本次用来示例的数据来自《R语言作图——density plot》
数据可以通过在生信了(公众号) 回复 :数据 获得。 -
Pycharm导入Python包,模块的图文教程
2020-12-24 04:20:08...以上这篇Pycharm导入Python包,模块的图文教程就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持软件开发网。 您可能感兴趣的文章:python基础之包的导入和__init__.p -
Data Import for MySQL试用版:一款MySQL数据库数据导入软件
2021-07-17 06:02:11开发语言: 软件 可用平台: Windows 当前版本: v3.7 EMS Data Import:trade_mark: for MySQL是一款交叉平台的数据库工具,它用于快速将数据导入至您的MySQL:registered:表中,支持的导入文件包括MS Access (只支持... -
Data Import for SQL Server试用版:一款功能强大的SQL数据库数据导入软件
2021-07-16 05:13:51开发语言: 软件 可用平台: Windows 当前版本: v3.7 EMS Data Import:trade_mark: for SQL Server是一款功能强大的数据库工具它用于快速将数据导入至您的Microsoft:registered: SQL Server或者MSDE表中,支持的... -
R语言导入xlsx包方法及常见错误解决
2016-10-14 11:11:31R软件提供了范围广泛的数据导入工具,下面我们来学习一下,向R中导入Excel数据的方法及可能出现的常见错误。 前提:安装Java环境(jre32) 1 打开32位 R 2 安装xlsx包 3 载入xlsx包 显示上述效果...R软件提供了范围广泛的数据导入工具,下面我们来学习一下,向R中导入Excel数据的方法及可能出现的常见错误。
前提:安装Java环境(jre32)
1 打开32位 R
2 安装xlsx包
3 载入xlsx包
显示上述效果,证明加载包成功。
常见问题:
1. 没有安装Java环境
2. Java环境与R软件版本不一致。使用R32,应该安装Java32位环境。使用R64,应该安装Java64位环境。
-
【Go基础】Go自定义导入包以及Go常用命令
2022-03-31 20:26:34在Go语言入门环境搭建中有两个重要的概念GOPATH和GOROOT,其中GOROOT是我们安装的go路径例如D:\Go,将这个路径设置到环境变量就配置好了GO目录的安装路径了。PATH环境变量就是%GOROOT%\bin路径,如D:\Go\bin路径。 ... -
R语言数据导入
2021-11-11 09:52:43- read.csv("C:\\Users\\Administrator\\Desktop\\aa.csv",header = TRUE,encoding=UTF-8)#默认编码方式为GBK,因此导入文本数据后可能会出现乱码,可以设置编码为“UTF-8” aa <- read.table("C:\\Users\\... -
workbook需要引入的包
2022-05-18 09:23:50JAVA导入(读取)Excel中的数据(支持xls与xlsx文件),主要包括JAVA导入(读取)Excel中的数据(支持xls与xlsx文件) -
[软构博客]关于java中包package、子包及导入import的理解和用法
2021-06-17 15:24:14包与子包 什么是一个包? 包(package)是一系列功能相关的类放在一起组成的类库单元。简单地说,包就是一系列功能相关的类的集合。 那么为什么要引入包的概念呢? 这是为了解决类的重名冲突。 生活中,我们... -
R语言如何导入数据
2021-01-17 19:28:47在使用R的时候,我们肯定需要导入数据,现在总结一下如何导入不同类型的数据:1.使用键盘输入数据在导入数据比较少的时候,我们使用这种方法。R中的函数 edit() 会自动调用一个允许手动输入数据的文本编辑器。具体... -
林志玲语音合成软件v1.0免费最新安装版
2019-07-25 00:56:00听过林志玲声音的人,想必都不会忘记那嗲嗲感觉,如果你想一直拥有那种声音的话,就只需要选择林志玲语音合成软件,就能够快速合成属于自己的林志玲声音哦! 林志玲语音合成软件最大功能 真人发音,男女声都有,还... -
Java工程中使用Redis时导入驱动包的步骤
2019-09-29 20:12:40这两天看论文看的太苦b了ε(┬┬﹏┬┬)3,忙里偷闲,苦中作乐写一个文档~( ̄▽ ̄~)(~ ̄▽ ̄)~,针对的是Java工程中使用Redis时导入驱动包: 有些同学可能对Java程序和外部软件的连接使用的方法存在问题,实际这... -
《Nuitka打包教程》自定义导入包
2022-04-02 12:21:203.2、打包示例 1、导入方式分类 1.1、插件导入 我们制作复杂软件常会import许多包,这些包我们都可以理解为依赖,其中一些包,Nuitka将他们定义为插件,我们使用时按要求启用相关的插件;另外一些Nuitka -
R语言导入数据
2021-09-14 19:20:56一,读取数据前的准备工作 二,读取...通过R包(比如openxlsx包)读入.xlsx文件 四、读取spss文件 通过foreign包中的函数read.spss读入 library(foreign) a2(file=" .sav", use.value.labels = T, to.data.frame = T) -
Python自定义包在linux服务器导入错误的解决办法
2021-05-16 18:38:02在本地机器上跑python代码,自己定义的文件进行导包运行是没有问题,但是放到linux服务器上的时候就会提示 ImportError:No module named xxxx(要导入的文件包名)在python导包的时候有三条铁规:1. 严格区分包和... -
R语言导入数据文件(数据导入、加载、读取)、使用Hmisc包的sasxport.get函数导入SAS中的xpt格式文件
2022-02-17 20:19:16R语言导入数据文件(数据导入、加载、读取)、使用Hmisc包的sasxport.get函数导入SAS中的xpt格式文件 -
IntelliJ IDEA 自动导入包 快捷方式
2020-12-20 04:57:46idea可以自动优化导入包,但是有多个同名的类调用不同的包,必须自己手动Alt+Enter设置设置idea导入包勾选标注 1 选项,IntelliJ IDEA 将在我们书写代码的时候自动帮我们优化导入的包,比如自动去掉一些没有用到的包... -
R语言——导入Excel表格数据方法
2021-10-02 18:42:59工具/原料: R语言 openxls包 Rstudio软件 首先安装openxlsx包 install.packages("openxlsx") -
欧路词典 13.0一款功能强大的语言翻译工具软件.exe
2022-05-18 22:47:51欧路词典是一个功能强大的语言翻译工具。欧路词典支持用户根据需要扩展他们的字典,并且有大量的字典正在等着你。该词典包含了30多万条常用的英中条目和40万个专业条目。此外,用户还可以添加自己的国外资源,所以... -
R语言 导入其他统计软件文件
2020-04-07 12:50:12使用R中的foreign包可以较方便地读取其他统计软件的数据文件,比如SPSS、SAS等数据文件等 函数 描述 read.arff 从ARFF文件中读取文件,著名的数据挖掘开源软件weka的数据就是这种格式 read.dbf 读取DBF... -
Oxwall社交软件汉化包 v1.7.1
2019-10-24 03:27:00汉化说明:oxwall汉化语言包由oxwall中文网翻译并整理发布。支持最新版Oxwall-1.7.1。使用方法:后台导入,激活,并设置为默认语言即可。软件介绍:Oxwall是一个采用PHP+MySQL开发的,功能齐全的SNS社交网络系统,... -
QM语言文件本地化软件QMpareV0.3.2汉化绿色特别版
2019-07-25 00:27:31QMpare 是一款非常好用的 QT 编程语言编译的 QM 语言文件本地化软件,它界面简洁实用,可以直接打开 QM 文件并编辑其中的字符串,支持字符串的搜索、导出和导入,支持旧文件升级和从二个不同语言文件中提取翻译字串... -
语言汉化包
2019-04-22 13:03:56开发软件,英文软件,可通过文件目录导入汉化包,eclipse、CE等软件汉化包