Développer du code à l'aide de Posit Workbench (y compris RStudio Pro)
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Avant de commencer
Avant de commencer à utiliser Cloud Workstations, assurez-vous de disposer des autorisations requises et d'effectuer les étapes de configuration obligatoires suivantes :
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Si vous êtes administrateur, assurez-vous de disposer du rôle IAM Administrateur Cloud Workstations sur le projet afin de pouvoir créer des configurations de stations de travail.
Si vous êtes développeur et que vous ne disposez pas de configurations de station de travail dans la consoleGoogle Cloud , demandez à l'administrateur Cloud Workstations de votre organisation de créer une configuration de station de travail pour vous. Vous pouvez également vous assurer de disposer d'un rôle IAM d'administrateur Cloud Workstations sur le projet afin de pouvoir créer ces ressources vous-même.
Pour vérifier vos rôles IAM, accédez à la page IAM de la console Google Cloud :
Pour utiliser Posit Workbench (y compris RStudio Pro), vous devez créer une configuration de station de travail pour les développeurs de votre organisation :
Recherchez votre clé de licence Posit Workbench et gardez-la à portée de main, car vous en aurez besoin lors d'une étape ultérieure. Si vous avez besoin d'une clé de licence Posit Workbench, contactez votre représentant Posit chargé du succès client ou envoyez un e-mail à sales@posit.co.
Le lien Créer peut être désactivé s'il n'existe aucune configuration dans le projet ou si vous ne disposez pas des autorisations nécessaires pour les afficher.
Demandez à l'administrateur Cloud Workstations de votre organisation de créer une configuration de station de travail pour vous.
Saisissez le nom de votre station de travail.
Suivez les conventions de dénomination des ressources Compute Engine et choisissez un nom unique dans le cluster de stations de travail.
Cliquez sur la flèche de développement arrow_drop_down dans le champ Configuration, puis sélectionnez la configuration de station de travail Posit Workbench (tiers).
Cliquez sur Créer pour créer votre station de travail.
Lancer votre station de travail
Maintenant que vous avez créé votre poste de travail, vous pouvez le démarrer, puis le lancer pour commencer le développement :
Cliquez sur Postes de travail.
Recherchez la station de travail que vous avez créée dans la liste des stations de travail disponibles, cochez la case à côté, puis cliquez sur Démarrer. Votre station de travail est alors lancée et correspond à la configuration de la station de travail parente.
Si vous êtes invité à démarrer votre poste de travail, cliquez sur Démarrer pour confirmer.
L'état passe à Démarrage et l'icône d'état Actualiser tourne pendant l'opération de démarrage. Le démarrage de votre station de travail peut prendre quelques minutes.
Lorsque votre station de travail est prête, l'état passe à En cours d'exécution et l'icône d'état affiche la coche check_circle.
Cliquez sur Lancement.
Lancer une session RStudio Pro Posit Workbench
L'exemple suivant montre la page d'accueil de Posit Workbench.
L'apparence de votre page peut varier en fonction de la façon dont votre organisation définit la configuration de votre poste de travail :
Cliquez sur Nouvelle session.
Sélectionnez RStudio Pro comme IDE et laissez Cluster défini sur Local.
Pour en savoir plus sur Posit Workbench et les IDE qu'il prend en charge, tels que Jupyter Notebook, JupyterLab et VS Code, consultez la documentation Posit.
Cliquez sur Start Session (Démarrer la session).
Attendez que la session démarre, puis commencez à coder.
Importer des fichiers sur votre poste de travail
Pour importer des fichiers de votre ordinateur local vers votre poste de travail, cliquez sur Importer.
Sélectionnez le répertoire cible dans lequel vous souhaitez stocker les fichiers sur votre poste de travail.
Cliquez sur Sélectionner un fichier pour choisir le fichier à importer.
Pour lancer l'importation, cliquez sur OK.
Pour importer plusieurs fichiers ou un répertoire, créez un fichier ZIP. Le fichier ZIP est décompressé après l'importation.
Importer des fichiers depuis votre poste de travail
Pour importer des fichiers depuis votre poste de travail, cliquez sur Importer un ensemble de données, puis sélectionnez le type d'ensemble de données.
Accédez à l'ensemble de données à importer depuis votre poste de travail, puis sélectionnez-le.
L'IDE Posit Workbench dépend de différents packages R pour différentes fonctionnalités. Par exemple, si vous importez un fichier Excel, certains packages doivent être installés. Si vous êtes invité à installer les packages requis, cliquez sur Oui.
Pour commencer l'importation, cliquez sur Importer.
Obtenir de l'aide pour les problèmes liés à Posit Workbench
Si vous rencontrez des problèmes avec Posit Workbench ou avec l'image de conteneur Posit Workbench, signalez-les à Posit à l'adresse support@posit.co.
Pour en savoir plus sur Posit Workbench, consultez le hub de documentation de Posit Software.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/09 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/09 (UTC)."],[],[],null,["# Develop code using Posit Workbench (including RStudio Pro)\n\n| **Caution:** A third-party provider maintains the container image listed in this section. Google Cloud does not build, maintain, or officially support this image. Carefully evaluate any solution before deploying it in your production environment.\n\nBefore you begin\n----------------\n\nBefore you begin using Cloud Workstations, be sure that you have the\n[required permissions](/workstations/docs/access-control#enable_required_roles)\nand that you complete these required setup steps:\n\nSign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n\nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n\nEnable the Cloud Workstations API.\n\n\n[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=workstations.googleapis.com) \nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n\nEnable the Cloud Workstations API.\n\n\n[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=workstations.googleapis.com)\n1.\n\n\n Enable the Cloud Workstations API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=workstations.googleapis.com)\n2.\n If you are an administrator, make sure that you have a\n [Cloud Workstations Admin](/workstations/docs/access-control#workstations-admin)\n IAM role on the project so that you can create workstation\n configurations.\n\n\n If you are a developer and you don't have workstation configurations\n available in the\n [Google Cloud console](https://console.cloud.google.com/workstations/), ask your organization's Cloud Workstations Admin to\n create a workstation configuration for you, or make sure that you have a\n Cloud Workstations Admin IAM role on the project so\n that you can create these resources yourself.\n To check your IAM roles, go to the IAM\n page in the Google Cloud console:\n\n\n [Go to IAM](https://console.cloud.google.com/iam-admin/iam)\n\nCreate the workstation configuration\n------------------------------------\n\nTo use Posit Workbench (including RStudio Pro) the you must create a workstation configuration\nfor the developers in your organization:\n\n1. Find your Posit Workbench license key and keep it nearby because you\n need it in a subsequent step. If you need a Posit Workbench license key,\n contact your Posit Customer Success representative or email\n [sales@posit.co](mailto:sales@posit.co).\n\n2. Follow the instructions to\n [create a workstation configuration](/workstations/docs/create-configuration).\n\n 1. When you get to the\n [Environment customization](/workstations/docs/create-configuration#customize_the_environment)\n step, select **Code editors on base images**.\n\n 2. From the **Code editors** menu, select\n '**Posit Workbench (including RStudio Pro)** Third-party provided'.\n\n 3. Click the arrow_drop_downexpander\n arrow in the **Advanced container options** section.\n\n 1. Go to the **Environment variables** section, and then click\n **Add variable**.\n\n 2. Enter `RSW_LICENSE` in the **Key** field and paste your\n Posit Workbench license key into the **Value** field.\n\n 3. Click **Continue**.\n\n 4. When you get to the\n [Add users](/workstations/docs/create-configuration#add_users)\n step, give your developers\n [Cloud Workstations IAM access permissions](/workstations/docs/access-control)\n to the workstation configuration.\n\n 5. To create your workstation configuration and add these users to it,\n click **Create**.\n\n If you also elected to create a new cluster, cluster creation can take up\n to 20 minutes.\n\n Developers in your team should now be able to create workstations with\n Posit Workbench.\n\nSet up your workstation\n-----------------------\n\nTo create a workstation, follow these steps:\n\n1. In the Google Cloud console, navigate to the\n **Cloud Workstations** \\\u003e **Workstations**\n page.\n\n\n [Go to **Workstations**](https://console.cloud.google.com/workstations/list)\n\n \u003cbr /\u003e\n\n2. Click add_box**Create**.\n\n The **Create** link might be disabled if there aren't any\n configurations in the project or if you don't have permissions to view them.\n Ask your organization's Cloud Workstations Admin to create\n a workstation configuration for you.\n3. Enter your workstation **Name**.\n\n Follow the Compute Engine resource\n [naming conventions](/compute/docs/naming-resources)\n and choose a name that is unique within the workstation cluster.\n\n4. Click the arrow_drop_downexpander\n arrow in the **Configuration** field and select the\n **Posit Workbench (Third-party)** workstation configuration.\n\n5. Click **Create**\n to create your workstation.\n\nLaunch your workstation\n-----------------------\n\nNow that you have created your workstation, you can start it and then launch it\nto begin development:\n\n1. Click **Workstations**.\n2. Find the workstation that you created in the list of available workstations, select the checkbox beside it, and then click **Start**. This starts your workstation, and matches it to the parent workstation configuration.\n3. If prompted to start your workstation, click **Start** to confirm. The status changes to **Starting** and the status icon refreshspins while the start operation is in progress. It might take a few minutes to start your workstation.\n4. When your workstation is ready, the status changes to **Running** and the status icon changes to a check_circle checkmark.\n5. Click **Launch**.\n\nLaunch a Posit Workbench RStudio Pro session\n--------------------------------------------\n\n1. The following example shows the welcome page for the Posit Workbench.\n Your page might look different, depending on how your organization defines\n your workstation configuration:\n\n2. Click **New Session**.\n\n3. Select **RStudio Pro** as the IDE and leave **Cluster** set to **Local**.\n\n For more information about Posit Workbench and the IDEs that it\n supports, such as Jupyter Notebook, JupyterLab, and VS Code, see the\n [Posit documentation](https://docs.posit.co/ide/server-pro/user/).\n4. Click **Start Session**.\n\n5. Wait for the session to start up and then begin coding!\n\nUpload files to your workstation\n--------------------------------\n\n1. To upload files from your local machine to your workstation, click **Upload**.\n\n2. Select the **Target directory** where you want to store files on your\n workstation.\n\n3. Click **Choose File** to select the file to upload.\n\n4. To begin the upload, click **OK**.\n\nTo upload multiple files or a directory, create a ZIP file. The ZIP\nfile is expanded after upload.\n\nImport files from your workstation\n----------------------------------\n\n1. To import files from your workstation, click **Import dataset** and select\n the type of dataset.\n\n2. Navigate to and select the dataset to import from your workstation.\n\n The Posit Workbench IDE has dependencies on various R packages for\n different pieces of features. For example, if you are uploading an Excel\n file, certain packages need to be installed. If prompted to install required\n packages, click **Yes**.\n3. To begin the import, click **Import**.\n\nGet support for Posit Workbench issues\n--------------------------------------\n\nIf you encounter issues with Posit Workbench or with the Posit Workbench\ncontainer image, report them to Posit at [support@posit.co](mailto:support@posit.co).\n\nWhat's next\n-----------\n\n- Learn how to\n [customize container images](/workstations/docs/customize-container-images)\n to your organization's needs.\n\n- Refer to the Posit Software\n [documentation hub](https://docs.posit.co/)\n to learn more about Posit Workbench."]]