R 패키지 메타데이터와 수집 신호를 모아 봅니다.
첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.
DESCRIPTION에서 감지한 backend 관련 package입니다.
기본 메타데이터를 작은 카드와 토큰으로 압축합니다.
| Package | Type | Spec |
|---|---|---|
| clipr CRAN · 0.0.3 · 2026-05-30 | Imports | clipr |
| httr CRAN · 0.0.3 · 2026-05-30 | Imports | httr |
| jsonlite CRAN · 0.0.3 · 2026-05-30 | Imports | jsonlite |
| miniUI CRAN · 0.0.3 · 2026-05-30 | Imports | miniUI |
| rstudioapi CRAN · 0.0.3 · 2026-05-30 | Imports | rstudioapi |
| shiny CRAN · 0.0.3 · 2026-05-30 | Imports | shiny |
| utils CRAN · 0.0.3 · 2026-05-30 | Imports | utils |
| 검색 결과가 없습니다. | ||
| Package | Type | Spec |
|---|---|---|
| 표시할 dependency edge가 없습니다. | ||
| 검색 결과가 없습니다. | ||
NEWS code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} perplexR 0.0.3 Response: Model output is pasted to clipboard perplexR 0.0.2 New function added: translateText() perplexR 0.0.1 Initial CRAN submission.Help for package perplexR const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {perplexR} Contents perplexR-package API_Request AskMe annotateCode buildUnitTests clarifyCode debugCode documentCode execAddin execAddin_AskMe finishCode namingGenie optimizeCode responseParser responseReturn rewriteText translateCode translateText Type: Package Title: A Coding Assistant using Perplexity's Large Language Models Version: 0.0.3 Maintainer: Gabriel Kaiser <quantresearch.gk@gmail.com> Description: A coding assistant using Perplexity's Large Language Models https://www.perplexity.ai/ API. A set of functions and 'RStudio' add-ins that aim to help R developers. License: GPL (≥ 3) URL: https://github.com/GabrielKaiserQFin/perplexR BugReports: https://github.com/GabrielKaiserQFin/perplexR/issues Imports: clipr, httr, jsonlite, miniUI, rstudioapi, shiny, utils Encoding: UTF-8 Language: en-US RoxygenNote: 7.2.3 NeedsCompilation: no Packaged: 2024-03-28 09:58:24 UTC; Gabriel Author: Gabriel Kaiser [aut, cre] Repository: CRAN Date/Publication: 2024-03-29 20:50:02 UTC perplexR: A Coding Assistant using Perplexity's Large Language Models Description A coding assistant using Perplexity's Large Language Models https://www.perplexity.ai/ API. A set of functions and 'RStudio' add-ins that aim to help R developers. Author(s) Maintainer : Gabriel Kaiser quantresearch.gk@gmail.com See Also Useful links: https://github.com/GabrielKaiserQFin/perplexR Report bugs at https://github.com/GabrielKaiserQFin/perplexR/issues Get Large Language Model Completions Endpoint Description Get Large Language Model Completions Endpoint Usage API_Request( prompt, PERPLEXITY_API_KEY = PERPLEXITY_API_KEY, modelSelection = modelSelection, systemRole = systemRole, maxTokens = maxTokens, temperature = temperature, top_p = top_p, top_k = top_k, presence_penalty = presence_penalty, frequency_penalty = frequency_penalty, proxy = proxy ) Arguments prompt The prompt to generate completions for. PERPLEXITY_API_KEY PERPLEXITY API key. modelSelection model choice. Default is mistral-7b-instruct. systemRole Role for model. Default is: "You are a helpful assistant with extensive knowledge of R programming." maxTokens The maximum integer of completion tokens returned by API. temperature The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic. Set either temperature or top_p. top_p Nucleus sampling threshold, valued between 0 and 1 inclusive. top_k The number of tokens to keep for highest top-k filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, top-k filtering is disabled. presence_penalty A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Incompatible with frequency_penalty. frequency_penalty A multiplicative penalty greater than 0. Values greater than 1.0 penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. A value of 1.0 means no penalty. proxy Default value is NULL. Ask Large Language Model Description Note: See also clearChatSession . Usage AskMe( question, PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL ) Arguments question The question to ask Large Language Model. PERPLEXITY_API_KEY PERPLEXITY API key. modelSelection model choice. Default is mistral-7b-instruct. systemRole Role for model. Default is: "You are a helpful assistant with extensive knowledge of R programming." maxTokens The maximum integer of completion tokens returned by API. temperature The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic. Set either temperature or top_p. top_p Nucleus sampling threshold, valued between 0 and 1 inclusive. top_k The number of tokens to keep for highest top-k filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, top-k filtering is disabled. presence_penalty A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Incompatible with frequency_penalty. frequency_penalty A multiplicative penalty greater than 0. Values greater than 1.0 penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. A value of 1.0 means no penalty. proxy Default value is NULL. Value A character value with the response generated by Large Language Model. Examples ## Not run: AskMe("What do you think about Large language models?") ## End(Not run) Large Language Model: Annotate code Description Large Language Model: Annotate code Usage annotateCode( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL ) Arguments code The code to be commented by Large Language Model. If not provided, it will use what's copied on the clipboard. PERPLEXITY_API_KEY PERPLEXITY API key. modelSelection model choice. Default is mistral-7b-instruct. systemRole Role for model. Default is: "You are a helpful assistant with extensive knowledge of R programming." maxTokens The maximum integer of completion tokens returned by API. temperature The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic. Set either temperature or top_p. top_p Nucleus sampling threshold, valued between 0 and 1 inclusive. top_k The number of tokens to keep for highest top-k filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, top-k filtering is disabled. presence_penalty A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Incompatible with frequency_penalty. frequency_penalty A multiplicative penalty greater than 0. Values greater than 1.0 penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. A value of 1.0 means no penalty. proxy Default value is NULL. Value A character value with the response generated by Large Language Model. Examples ## Not run: annotateCode("z <- function(x) scale(x)^2") ## End(Not run) Large Language Model: Create Unit Tests Description Create {testthat} test cases for the code. Usage buildUnitTests( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, topGet Large Language Model Completions Endpoint
API_Request( prompt, PERPLEXITY_API_KEY = PERPLEXITY_API_KEY, modelSelection = modelSelection, systemRole = systemRole, maxTokens = maxTokens, temperature = temperature, top_p = top_p, top_k = top_k, presence_penalty = presence_penalty, frequency_penalty = frequency_penalty, proxy = proxy )Note: See also clearChatSession.
AskMe( question, PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )AskMe("What do you think about Large language models?")Large Language Model: Annotate code
annotateCode( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )annotateCode("z <- function(x) scale(x)^2")Create testthat test cases for the code.
buildUnitTests( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )buildUnitTests("squared_numbers <- function(numbers) numbers ^ 2")Large Language Model: Clarify Code
clarifyCode( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )clarifyCode("z <- function(x) scale(x)^2")Large Language Model: Find Issues in Code
debugCode( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )debugCode("z <- function(x) scale(x)2")Large Language Model: Code Documentation (roxygen2 style)
documentCode( code = clipr::read_clip(allow_non_interactive = TRUE), inLineDocumentation = "roxygen2", PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )documentCode("z <- function(x) scale(x)^2")Run a Large Language Model as RStudio add-in
execAddin(FUN)Opens an interactive chat session with Large Language Model
execAddin_AskMe()Large Language Model: Finish code
finishCode( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )finishCode("# A function to square each element of a vector_each <- function(")Large Language Model: Create a Function or Variable Name
namingGenie( code = clipr::read_clip(allow_non_interactive = TRUE), namingConvention = "camelCase", PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )namingGenie("sapply(1:10, function(i) i ** 2)")Large Language Model: Optimize Code
optimizeCode( code = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )optimizeCode("z <- function(x) scale(x)^2")A coding assistant using Perplexity's Large Language Models https://www.perplexity.ai/ API. A set of functions and 'RStudio' add-ins that aim to help R developers.
Takes the raw response from the Perplexity API and extracts the text content from it.
responseParser(raw)responseReturn
responseReturn(raw)Large Language Model: Rewrite Text
rewriteText( text = clipr::read_clip(allow_non_interactive = TRUE), PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )rewriteText("Dear Recipient, I hope this message finds you well.")This function takes a snippet of code and translates it from one programming language to another using Perplexity API. The default behavior is to read the code from the clipboard and translate from R to Python.
translateCode( code = clipr::read_clip(allow_non_interactive = TRUE), from = "R", to = "Python", PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant with extensive programming skills.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )translateCode("your R code here", from = "R", to = "Python")Large Language Model: Translate Text
translateText( text = clipr::read_clip(allow_non_interactive = TRUE), toLanguage = "German", PERPLEXITY_API_KEY = Sys.getenv("PERPLEXITY_API_KEY"), modelSelection = c("mistral-7b-instruct", "mixtral-8x7b-instruct", "codellama-70b-instruct", "sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online"), systemRole = "You are a helpful assistant.", maxTokens = 265, temperature = 1, top_p = NULL, top_k = 100, presence_penalty = 0, frequency_penalty = NULL, proxy = NULL )translateText("Dear Recipient, I hope this message finds you well.")| Repository | Version | Published | First seen | Last seen | Docs |
|---|---|---|---|---|---|
| CRAN | 0.0.3 | 2026-05-29 | 2026-05-30 |
표시할 OSV 데이터가 없습니다.
표시할 OpenAlex 데이터가 없습니다.