Replies: 2 comments
-
I tried uninstall and install and there is no problem. It is very likely that you need to update or not update the dietaryindex's dependency packages. Enter 3 or 1 before using the library(dietaryindex). Otherwise, dietaryindex is not ever installed. See below:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your reply. I have solved this problem. The reason for the problem is that there are packages that need to be upgraded. This function is really convenient.
发自我的iPhone
…------------------ Original ------------------
From: James Jiada Zhan ***@***.***>
Date: Thu,Jan 18,2024 11:36 PM
To: jamesjiadazhan/dietaryindex ***@***.***>
Cc: wangdsds ***@***.***>, State change ***@***.***>
Subject: Re: [jamesjiadazhan/dietaryindex] After installing the dietaryindexpackage, the library (dietaryindex) shows that the package does not exist, sonothing can be inputted. (Discussion #247)
I tried uninstall and install and there is no problem.
It is very likely that you need to update or not update the dietaryindex's dependency packages.
Enter 3 or 1 before using the library(dietaryindex). Otherwise, dietaryindex is not ever installed.
See below:
r$> remove.packages("dietaryindex") Removing package from ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library’ (as ‘lib’ is unspecified) r$> devtools::install_github("jamesjiadazhan/dietaryindex") # Install the package from GitHub Downloading GitHub repo ***@***.*** These packages have more recent versions available. It is recommended to update all of them. Which would you like to update? 1: All 2: CRAN packages only 3: None 4: progress (1.2.2 -> 1.2.3) [CRAN] 5: withr (2.5.2 -> 3.0.0) [CRAN] 6: fansi (1.0.5 -> 1.0.6) [CRAN] 7: glue (1.6.2 -> 1.7.0) [CRAN] 8: vctrs (0.6.4 -> 0.6.5) [CRAN] 9: cpp11 (0.4.6 -> 0.4.7) [CRAN] 10: vroom (1.6.4 -> 1.6.5) [CRAN] 11: rlang (1.1.2 -> 1.1.3) [CRAN] 12: cli (3.6.1 -> 3.6.2) [CRAN] 13: readr (2.1.4 -> 2.1.5) [CRAN] 14: haven (2.5.3 -> 2.5.4) [CRAN] Enter one or more numbers, or an empty line to skip updates: 3 ── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ checking for file ‘/private/var/folders/r7/g81tj9ds70bdmgdbnp49ddn80000gn/T/RtmppA355x/remotes16b1debd4aea/jamesjiadazhan-dietaryindex-0fbabed/DESCRIPTION’ ... ─ preparing ‘dietaryindex’: ✔ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories NB: this package now depends on R (>= 3.5.0) WARNING: Added dependency on R >= 3.5.0 because serialized objects in serialize/load version 3 cannot be read in older versions of R. File(s) containing such objects: ‘dietaryindex/data/NHANES_20032004.rda’ ─ building ‘dietaryindex_1.0.3.tar.gz’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘dietaryindex/Validation file for publication/HEI2015_ASA24_example_data/HEI2015_ASA24_dietaryindex.csv’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘dietaryindex/Validation file for publication/HEI2015_ASA24_example_data/SAS code ASA24 validation.sas’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘dietaryindex/Validation file for publication/HEI2015_ASA24_example_data/THR_2022-09-13_86071_Totals.csv’ Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: ‘dietaryindex/Validation file for publication/HEI2015_DHQ3_example_data/Sample total daily results.csv’ * installing *source* package ‘dietaryindex’ ... ** using staged installation ** R ** data *** moving datasets to lazyload DB ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (dietaryindex) r$> library(dietaryindex) Loaded dietaryindex Thank you for using dietaryindex! Tutorials: https://github.com/jamesjiadazhan/dietaryindex Questions, issues: Follow the prompts at https://github.com/jamesjiadazhan/dietaryindex/blob/main/.github/ISSUE_TEMPLATE/bug_report.md Cite us: citation('dietaryindex') or Jiada James Zhan, Rebecca A Hodge, Anne Dunlop, et al. Dietaryindex: A User-Friendly and Versatile R Package for Standardizing Dietary Pattern Analysis in Epidemiological and Clinical Studies. bioRxiv. Published online August 09, 2023:2023.08.09.548466. doi:10.1101/2023.08.07.548466
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jamesjiadazhan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
library(devtools)
install_github("jamesjiadazhan/dietaryindex")
library(dplyr)
library(haven)
library(readr)
library(dietaryindex)
setwd("C:/Users/CJL040/Desktop/new")
DEMO_PATH = read_xpt(file ='09-10human.XPT')
FPED_PATH_1 = read_sas('fped_dr1tot_0910.sas7bdat')
NUTRIENT_PATH_1 = read_xpt(file ='09-10nuXPT')
DII_NHANES_FPED(FPED_PATH=FPED_PATH_1, NUTRIENT_PATH=NUTRIENT_PATH_1, DEMO_PATH=DEMO_PATH)
HEI2015_NHANES_FPED(FPED_PATH=FPED_PATH_1, NUTRIENT_PATH=NUTRIENT_PATH_1, DEMO_PATH=DEMO_PATH)
Error in library(dietaryindex) : 不存在叫‘dietaryindex’这个名字的程辑包
Beta Was this translation helpful? Give feedback.
All reactions