docs: update zh-tw (#265)

Reviewed-on: https://gitea.com/gitea/docs/pulls/265
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: ifurther <[email protected]>
Co-committed-by: ifurther <[email protected]>
This commit is contained in:
ifurther
2025-09-03 21:00:35 +00:00
committed by techknowlogick
parent 908a27589d
commit cb462089e9
88 changed files with 3545 additions and 3423 deletions
@@ -4,53 +4,53 @@ slug: "cran"
sidebar_position: 35
---
# CRAN 软件包注册
# CRAN 軟體包註冊
将 [R](https://www.r-project.org/) 软件包发布到您的用户或组织的类似 [CRAN](https://cran.r-project.org/) 的注册表。
将 [R](https://www.r-project.org/) 軟體包發佈到您的使用者或組織的类似 [CRAN](https://cran.r-project.org/) 的註冊表。
## 要求
要使用CRAN软件包注册表,您需要安 [R](https://cran.r-project.org/)。
要使用CRAN軟體包註冊表,您需要安 [R](https://cran.r-project.org/)。
## 配置软件包注册
## 配置軟體包註冊
要注册软件包注册表,您需要将其添加到 `Rprofile.site` 文件中,可以是系统级别、用户级别 `~/.Rprofile` 或项目级别:
要注册軟體包註冊表,您需要将其添加到 `Rprofile.site` 文件中,可以是系统级别、使用者级别 `~/.Rprofile` 或项目级别:
```
options("repos" = c(getOption("repos"), c(gitea="https://gitea.example.com/api/packages/{owner}/cran")))
```
| 参数 | 描述 |
| 參數 | 描述 |
| ------- | -------------- |
| `owner` | 软件包的所有者 |
| `owner` | 軟體包的所有者 |
如果需要提供凭据,可以将它们嵌入到URL(`https://user:[email protected]/...`)中。
## 发布软件
## 發佈軟體
发布 R 软件包,请执行带有软件包内容的 HTTP `PUT` 操作。
發佈 R 軟體包,請執行带有軟體包内容的 HTTP `PUT` 操作。
源代码软件包:
源代码軟體包:
```
PUT https://gitea.example.com/api/packages/{owner}/cran/src
```
| 参数 | 描述 |
| 參數 | 描述 |
| ------- | -------------- |
| `owner` | 软件包的所有者 |
| `owner` | 軟體包的所有者 |
进制软件包:
進制軟體包:
```
PUT https://gitea.example.com/api/packages/{owner}/cran/bin?platform={platform}&rversion={rversion}
```
| 参数 | 描述 |
| 參數 | 描述 |
| ---------- | -------------- |
| `owner` | 软件包的所有者 |
| `platform` | 平台的名 |
| `rversion` | 二制的R版本 |
| `owner` | 軟體包的所有者 |
| `platform` | 平台的名 |
| `rversion` | 二制的R版本 |
例如:
@@ -60,17 +60,17 @@ curl --user your_username:your_password_or_token \
https://gitea.example.com/api/packages/testuser/cran/bin?platform=windows&rversion=4.2
```
如果同名和版本的软件包已存在,则无法发布软件包。您必首先删除有的软件包。
如果同名和版本的軟體包已存在,则無法發佈軟體包。您必首先删除有的軟體包。
## 安装软件
## 安裝軟體
要从软件包注册表中安装R软件包,请执行以下命令:
要从軟體包註冊表中安裝R軟體包,請執行以下命令:
```shell
install.packages("{package_name}")
```
| 参数 | 描述 |
| 參數 | 描述 |
| -------------- | ----------------- |
| `package_name` | The package name. |