Bug #2881

R perspective, R package installation broken

Added by Serge Heiden about 1 month ago. Updated about 1 month ago.

Status:New Start date:07/24/2020
Priority:High Due date:
Assignee:- % Done:

0%

Category:Stats / R Spent time: -
Target version:TXM 0.8.2

Description

It is no more possible to run the basic "Tutorial to use the stylometric tools of the Stylo R package into TXM":
https://groupes.renater.fr/wiki/txm-users/public/tutorial_to_use_stylo_into_txm

When installing the stylo package, we get the following stacktrace:

Exécution de session1.R…
R-err>Installing package into ‘/home/sheiden/TXM-0.8.1/R/libraries’
** Erreur lors de l'exécution du script R /home/sheiden/TXM-0.8.1/scripts/R/session1.R : org.txm.statsengine.r.core.exceptions.RException: install.packages("stylo")
; ** Erreur R : "Error in contrib.url(repos, type) : 
  trying to use CRAN without setting a mirror
" 
lors de l'évaluation de : try({install.packages("stylo")
}, silent=FALSE) .
org.txm.statsengine.r.core.exceptions.RException: install.packages("stylo")
; ** Erreur R : "Error in contrib.url(repos, type) : 
  trying to use CRAN without setting a mirror
" 
lors de l'évaluation de : try({install.packages("stylo")
}, silent=FALSE) 
    at org.txm.statsengine.r.core.RWorkspace.eval(RWorkspace.java:1148)
    at org.txm.statsengine.r.core.RScriptEngine.executeScript(RScriptEngine.java:124)
    at org.txm.rcp.handlers.scripts.ExecuteScript.executeScript(ExecuteScript.java:206)
    at org.txm.rcp.handlers.scripts.ExecuteScript.execute(ExecuteScript.java:178)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
    at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:431)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:446)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:472)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4602)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4183)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.txm.rcp.Application.start(Application.java:260)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Caused by: org.txm.statsengine.r.core.exceptions.RException: ** Erreur R : "Error in contrib.url(repos, type) : 
  trying to use CRAN without setting a mirror
" 
lors de l'évaluation de : try({install.packages("stylo")
}, silent=FALSE) 
    at org.txm.statsengine.r.core.RWorkspace.safeEval(RWorkspace.java:1559)
    at org.txm.statsengine.r.core.RWorkspace.eval(RWorkspace.java:1141)
    ... 46 more
Exécution de session1.R…

Solution 1

  • use "https://cloud.r-project.org" as default packages repository
  • add the new R preference : "packages repository"

Solution 2

Open the R package repository dialog box or open a SWT dialog box (clone of the R dialog box)

History

#1 Updated by Matthieu Decorde about 1 month ago

  • Subject changed from R Perspective broken to R perspective, R package installation broken
  • Description updated (diff)

Also available in: Atom PDF