Re: [R-SIG-Mac] List of unnecessary messages when I plot something in R from Terminal

2023-02-12 Thread Christofer Bogaso
Thanks for all your inputs.

However I now installed latest version of R and still facing the same
problem. Normally these messages don't come, but they appear when I
make Quartz active window (i.e. bring this front)

> sessionInfo()

R version 4.2.2 (2022-10-31)

Platform: x86_64-apple-darwin17.0 (64-bit)

Running under: macOS Big Sur ... 10.16


Matrix products: default

BLAS:   
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib

LAPACK: 
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib


locale:

[1] C/UTF-8/C/C/C/C


attached base packages:

[1] stats graphics  grDevices utils datasets  methods   base


loaded via a namespace (and not attached):

[1] compiler_4.2.2

On Sun, Feb 12, 2023 at 5:14 PM Calboli Federico (LUKE)
 wrote:
>
> Brian,
>
> I can then report that on R 4.2.2 on aarch64-apple-darwin20 (64-bit), MacOS 
> 13.2
>
> plot(1:4)
>
> returns a plot with no warnings nor other unexpected output, so Christofer’s 
> problem is limited to the x86 achitecture.
>
>
>
>
>
> > On 12. Feb 2023, at 13.33, Prof Brian Ripley  wrote:
> >
> > Please do read ?sessionInfo
> >
> > Where R was compiled under macOS 10.x (as the CRAN Intel
> > distributions have been) but running under ‘Big Sur’ or later,
> > macOS reports itself as ‘10.16’ (which R recognizes as ‘Big Sur
> > ...’) and not ‘11.x’ or later.
> >
> > This is only an issue on Intel binary distributions: the arm64 ones are 
> > built on macOS 11.
> >
> > On 12/02/2023 09:48, Calboli Federico (LUKE) wrote:
> >> Pretty use R does disinguish MacOS versions:
> >>> sessionInfo()
> >> R version 4.2.2 (2022-10-31)
> >> Platform: aarch64-apple-darwin20 (64-bit)
> >> Running under: macOS Ventura 13.2
> >> for me.  So if one is on Ventura but R thinks it is running on a different 
> >> OS, that’s a starting point right there.
> >> BW
> >> F
> >>> On 11. Feb 2023, at 23.53, Jeff Newmiller  
> >>> wrote:
> >>>
> >>> Operating systems are designed to be as backward-compatible as 
> >>> possible... R Core doesn't generally know what distinguishing features 
> >>> will identify a new OS until it is released, nor what it will be called, 
> >>> so R has a handicap.
> >>>
> >>> On February 11, 2023 1:12:42 PM PST, Christofer Bogaso 
> >>>  wrote:
> >>>> Actually when I check from the Apple icon, then I see that I am
> >>>> actually running Ventura
> >>>>
> >>>> For some reason, R's sessionInfo() is reporting that I am running Big 
> >>>> Sur.
> >>>>
> >>>> Not sure why R is reporting wrong. Thanks,
> >
> > 'macOS Big Sur ...' is not 'wrong'.
> >
> >>>> On Sun, Feb 12, 2023 at 2:38 AM Christofer Bogaso
> >>>>  wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> I am running Big Sur. Below is my sessionInfo()
> >>>>>
> >>>>>> sessionInfo()
> >>>>>
> >>>>> R version 4.2.1 (2022-06-23)
> >>>>>
> >>>>> Platform: x86_64-apple-darwin17.0 (64-bit)
> >>>>>
> >>>>> Running under: macOS Big Sur ... 10.16
> >>>>>
> >>>>>
> >>>>> Matrix products: default
> >>>>>
> >>>>> BLAS:   
> >>>>> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
> >>>>>
> >>>>> LAPACK: 
> >>>>> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
> >>>>>
> >>>>>
> >>>>> locale:
> >>>>>
> >>>>> [1] C/UTF-8/C/C/C/C
> >>>>>
> >>>>>
> >>>>> attached base packages:
> >>>>>
> >>>>> [1] stats graphics  grDevices utils datasets  methods   base
> >>>>>
> >>>>>
> >>>>> loaded via a namespace (and not attached):
> >>>>>
> >>>>> [1] compiler_4.2.1
> >>>>>
> >>>>> On Sun, Feb 12, 2023 at 1:55 AM Simon Urbanek
> >>>>>  wrote:
> >>>>>>
> >>>>>> Christofer,
> >>>>>>
> >>>>>> yes, unfortunately this is a known bug in macOS Ventura affecting 

Re: [R-SIG-Mac] List of unnecessary messages when I plot something in R from Terminal

2023-02-11 Thread Christofer Bogaso
Actually when I check from the Apple icon, then I see that I am
actually running Ventura

For some reason, R's sessionInfo() is reporting that I am running Big Sur.

Not sure why R is reporting wrong. Thanks,

On Sun, Feb 12, 2023 at 2:38 AM Christofer Bogaso
 wrote:
>
> Hi,
>
> I am running Big Sur. Below is my sessionInfo()
>
> > sessionInfo()
>
> R version 4.2.1 (2022-06-23)
>
> Platform: x86_64-apple-darwin17.0 (64-bit)
>
> Running under: macOS Big Sur ... 10.16
>
>
> Matrix products: default
>
> BLAS:   
> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
>
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
>
>
> locale:
>
> [1] C/UTF-8/C/C/C/C
>
>
> attached base packages:
>
> [1] stats graphics  grDevices utils datasets  methods   base
>
>
> loaded via a namespace (and not attached):
>
> [1] compiler_4.2.1
>
> On Sun, Feb 12, 2023 at 1:55 AM Simon Urbanek
>  wrote:
> >
> > Christofer,
> >
> > yes, unfortunately this is a known bug in macOS Ventura affecting a lot of 
> > command-line programs that use GUI. Do not upgrade to Ventura (usually a 
> > good advice given the long list of known bugs in Ventura) or wait for a fix 
> > from Apple.
> >
> > Cheers,
> > Simon
> >
> >
> >
> > > On Feb 11, 2023, at 11:28 PM, Christofer Bogaso 
> > >  wrote:
> > >
> > > Hi,
> > >
> > > When I plot something in R, then it open Quartz and in the console I
> > > see below messages
> > >
> > >> plot(1:4)
> > >
> > >> 1   HIToolbox   0x7ff8229a2726 
> > >> _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 102
> > >
> > > 2   HIToolbox   0x7ff8229a22b8
> > > _ZN15MenuBarInstance14EnableAutoShowEv + 52
> > >
> > > 3   HIToolbox   0x7ff822946908
> > > SetMenuBarObscured + 408
> > >
> > > 4   HIToolbox   0x7ff8229464ca
> > > _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh
> > > + 164
> > >
> > > 5   HIToolbox   0x7ff822940996
> > > _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 252
> > >
> > > 6   HIToolbox   0x7ff822908bd2
> > > _NotifyEventLoopObservers + 153
> > >
> > > 7   HIToolbox   0x7ff8229403e6
> > > AcquireEventFromQueue + 494
> > >
> > > 8   HIToolbox   0x7ff82292f3ec
> > > ReceiveNextEventCommon + 285
> > >
> > > 9   HIToolbox   0x7ff82292f2b3
> > > _BlockUntilNextEventMatchingListInModeWithFilter + 70
> > >
> > > 10  AppKit  0x7ff81c136f33 _DPSNextEvent 
> > > + 909
> > >
> > > 11  AppKit  0x7ff81c135db4
> > > -[NSApplication(NSEvent)
> > > _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
> > >
> > > 12  grDevices.so0x0001086f7a3b input_handler 
> > > + 155
> > >
> > > 13  libR.dylib  0x000108b142cf
> > > Rstd_ReadConsole + 2127
> > >
> > > 14  libR.dylib  0x000108a15b74
> > > Rf_ReplIteration + 100
> > >
> > > 15  libR.dylib  0x000108a174b1 R_ReplConsole 
> > > + 161
> > >
> > > 16  libR.dylib  0x000108a17402 run_Rmainloop 
> > > + 82
> > >
> > > 17  libR.dylib  0x000108a1753e Rf_mainloop + 
> > > 14
> > >
> > > 18  R   0x00010847af5b main + 27
> > >
> > > 19  dyld0x7ff818bde310 start + 2432
> > >
> > > 1   HIToolbox   0x7ff822aa952b
> > > _ZN15MenuBarInstance21IsAutoShowHideAllowedEv + 259
> > >
> > > 2   HIToolbox   0x7ff8229a233e
> > > _ZN15MenuBarInstance24UpdateAutoShowVisibilityE5Pointh + 34
> > >
> > > 3   HIToolbox   0x7ff8229117a4
> > > _ZN15MenuBarInstance16ForEachMenuBarDoEU13block_pointerFvPS_E + 46
> > >
> > > 4   HIToolbox   0x7ff8229a2

Re: [R-SIG-Mac] List of unnecessary messages when I plot something in R from Terminal

2023-02-11 Thread Christofer Bogaso
Hi,

I am running Big Sur. Below is my sessionInfo()

> sessionInfo()

R version 4.2.1 (2022-06-23)

Platform: x86_64-apple-darwin17.0 (64-bit)

Running under: macOS Big Sur ... 10.16


Matrix products: default

BLAS:   
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib

LAPACK: 
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib


locale:

[1] C/UTF-8/C/C/C/C


attached base packages:

[1] stats graphics  grDevices utils datasets  methods   base


loaded via a namespace (and not attached):

[1] compiler_4.2.1

On Sun, Feb 12, 2023 at 1:55 AM Simon Urbanek
 wrote:
>
> Christofer,
>
> yes, unfortunately this is a known bug in macOS Ventura affecting a lot of 
> command-line programs that use GUI. Do not upgrade to Ventura (usually a good 
> advice given the long list of known bugs in Ventura) or wait for a fix from 
> Apple.
>
> Cheers,
> Simon
>
>
>
> > On Feb 11, 2023, at 11:28 PM, Christofer Bogaso 
> >  wrote:
> >
> > Hi,
> >
> > When I plot something in R, then it open Quartz and in the console I
> > see below messages
> >
> >> plot(1:4)
> >
> >> 1   HIToolbox   0x7ff8229a2726 
> >> _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 102
> >
> > 2   HIToolbox   0x7ff8229a22b8
> > _ZN15MenuBarInstance14EnableAutoShowEv + 52
> >
> > 3   HIToolbox   0x7ff822946908
> > SetMenuBarObscured + 408
> >
> > 4   HIToolbox   0x7ff8229464ca
> > _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh
> > + 164
> >
> > 5   HIToolbox   0x7ff822940996
> > _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 252
> >
> > 6   HIToolbox   0x7ff822908bd2
> > _NotifyEventLoopObservers + 153
> >
> > 7   HIToolbox   0x7ff8229403e6
> > AcquireEventFromQueue + 494
> >
> > 8   HIToolbox   0x7ff82292f3ec
> > ReceiveNextEventCommon + 285
> >
> > 9   HIToolbox   0x7ff82292f2b3
> > _BlockUntilNextEventMatchingListInModeWithFilter + 70
> >
> > 10  AppKit  0x7ff81c136f33 _DPSNextEvent + 
> > 909
> >
> > 11  AppKit  0x7ff81c135db4
> > -[NSApplication(NSEvent)
> > _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
> >
> > 12  grDevices.so0x0001086f7a3b input_handler + 
> > 155
> >
> > 13  libR.dylib  0x000108b142cf
> > Rstd_ReadConsole + 2127
> >
> > 14  libR.dylib  0x000108a15b74
> > Rf_ReplIteration + 100
> >
> > 15  libR.dylib  0x000108a174b1 R_ReplConsole + 
> > 161
> >
> > 16  libR.dylib  0x000108a17402 run_Rmainloop + 
> > 82
> >
> > 17  libR.dylib  0x000108a1753e Rf_mainloop + 14
> >
> > 18  R   0x00010847af5b main + 27
> >
> > 19  dyld0x7ff818bde310 start + 2432
> >
> > 1   HIToolbox   0x7ff822aa952b
> > _ZN15MenuBarInstance21IsAutoShowHideAllowedEv + 259
> >
> > 2   HIToolbox   0x7ff8229a233e
> > _ZN15MenuBarInstance24UpdateAutoShowVisibilityE5Pointh + 34
> >
> > 3   HIToolbox   0x7ff8229117a4
> > _ZN15MenuBarInstance16ForEachMenuBarDoEU13block_pointerFvPS_E + 46
> >
> > 4   HIToolbox   0x7ff8229a293d
> > _ZN15MenuBarInstance20AutoShowHideObserverEjP14OpaqueEventRefPv + 165
> >
> > 5   HIToolbox   0x7ff822908bd2
> > _NotifyEventLoopObservers + 153
> >
> > 6   HIToolbox   0x7ff82293afb8
> > PostEventToQueueInternal + 700
> >
> > 7   HIToolbox   0x7ff82293c871
> > _ZL29CreateAndPostEventWithCGEventP9__CGEventjhP17__CFMachPortBoost +
> > 404
> >
> > 8   HIToolbox   0x7ff822948ee9
> > _ZL15Convert1CGEventh + 246
> >
> > 9   HIToolbox   0x7ff822948d91
> > _ZL16MainLoopObserverjP14OpaqueEventRefPv + 41
> >
> > 10  HIToolbox   0x7ff822908bd2
> > _NotifyEventLoopObservers + 153
> >
> > 11  HIToolbox  

[R-SIG-Mac] List of unnecessary messages when I plot something in R from Terminal

2023-02-11 Thread Christofer Bogaso
Hi,

When I plot something in R, then it open Quartz and in the console I
see below messages

> plot(1:4)

> 1   HIToolbox   0x7ff8229a2726 
> _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 102

2   HIToolbox   0x7ff8229a22b8
_ZN15MenuBarInstance14EnableAutoShowEv + 52

3   HIToolbox   0x7ff822946908
SetMenuBarObscured + 408

4   HIToolbox   0x7ff8229464ca
_ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh
+ 164

5   HIToolbox   0x7ff822940996
_ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 252

6   HIToolbox   0x7ff822908bd2
_NotifyEventLoopObservers + 153

7   HIToolbox   0x7ff8229403e6
AcquireEventFromQueue + 494

8   HIToolbox   0x7ff82292f3ec
ReceiveNextEventCommon + 285

9   HIToolbox   0x7ff82292f2b3
_BlockUntilNextEventMatchingListInModeWithFilter + 70

10  AppKit  0x7ff81c136f33 _DPSNextEvent + 909

11  AppKit  0x7ff81c135db4
-[NSApplication(NSEvent)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219

12  grDevices.so0x0001086f7a3b input_handler + 155

13  libR.dylib  0x000108b142cf
Rstd_ReadConsole + 2127

14  libR.dylib  0x000108a15b74
Rf_ReplIteration + 100

15  libR.dylib  0x000108a174b1 R_ReplConsole + 161

16  libR.dylib  0x000108a17402 run_Rmainloop + 82

17  libR.dylib  0x000108a1753e Rf_mainloop + 14

18  R   0x00010847af5b main + 27

19  dyld0x7ff818bde310 start + 2432

1   HIToolbox   0x7ff822aa952b
_ZN15MenuBarInstance21IsAutoShowHideAllowedEv + 259

2   HIToolbox   0x7ff8229a233e
_ZN15MenuBarInstance24UpdateAutoShowVisibilityE5Pointh + 34

3   HIToolbox   0x7ff8229117a4
_ZN15MenuBarInstance16ForEachMenuBarDoEU13block_pointerFvPS_E + 46

4   HIToolbox   0x7ff8229a293d
_ZN15MenuBarInstance20AutoShowHideObserverEjP14OpaqueEventRefPv + 165

5   HIToolbox   0x7ff822908bd2
_NotifyEventLoopObservers + 153

6   HIToolbox   0x7ff82293afb8
PostEventToQueueInternal + 700

7   HIToolbox   0x7ff82293c871
_ZL29CreateAndPostEventWithCGEventP9__CGEventjhP17__CFMachPortBoost +
404

8   HIToolbox   0x7ff822948ee9
_ZL15Convert1CGEventh + 246

9   HIToolbox   0x7ff822948d91
_ZL16MainLoopObserverjP14OpaqueEventRefPv + 41

10  HIToolbox   0x7ff822908bd2
_NotifyEventLoopObservers + 153

11  HIToolbox   0x7ff82292f726
RunCurrentEventLoopInMode + 228

12  HIToolbox   0x7ff82292f396
ReceiveNextEventCommon + 199

13  HIToolbox   0x7ff82292f2b3
_BlockUntilNextEventMatchingListInModeWithFilter + 70

14  AppKit  0x7ff81c136f33 _DPSNextEvent + 909

15  AppKit  0x7ff81c135db4
-[NSApplication(NSEvent)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219

16  grDevices.so0x0001086f7a3b input_handler + 155

17  libR.dylib  0x000108b142cf
Rstd_ReadConsole + 2127

18  libR.dylib  0x000108a15b74
Rf_ReplIteration + 100

19  libR.dylib  0x000108a174b1 R_ReplConsole + 161

20  libR.dylib  0x000108a17402 run_Rmainloop + 82

21  libR.dylib  0x000108a1753e Rf_mainloop + 14

22  R   0x00010847af5b main + 27

23  dyld0x7ff818bde310 start + 2432

1   HIToolbox   0x7ff82292f0c2
_ZN15MenuBarInstance22RemoveAutoShowObserverEv + 30

2   HIToolbox   0x7ff8229467e3
SetMenuBarObscured + 115

3   HIToolbox   0x7ff82294d29e
_ZN13HIApplication11FrontUILostEv + 34

4   HIToolbox   0x7ff822946622
_ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh
+ 508

5   HIToolbox   0x7ff822940950
_ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 182

6   HIToolbox   0x7ff822908bd2
_NotifyEventLoopObservers + 153

7   HIToolbox   0x7ff8229403e6
AcquireEventFromQueue + 494

8   HIToolbox   0x7ff82292f3ec
ReceiveNextEventCommon + 285

9   HIToolbox

[R-SIG-Mac] How to suppress message in system()

2018-11-29 Thread Christofer Bogaso
Hi,

There is a function called system() with which one can run system code
within R. But I am wondering if there is any way to suppress any message
when invoking system().

For example let run 'df_dummy' through system() [yes, this is just dummy
command which would throw error while invoking]

> suppressMessages(system('df_dummy'))

sh: df_dummy: command not found

I want to suppress the message 'sh: df_dummy: command not found'

I am running R in iOS Mavericks

Any help would be highly appreciated. Thanks,

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] How to change default Browser for R

2018-08-04 Thread Christofer Bogaso
It worked.

On Sat, Aug 4, 2018 at 5:48 PM Marc Schwartz  wrote:

>
> > On Aug 4, 2018, at 2:41 AM, Christofer Bogaso <
> bogaso.christo...@gmail.com> wrote:
> >
> > Hi,
> >
> > In my Mac, I have 2 browsers installed :
> >
> > Chrome (system default)
> > Google Chrome Canary
> >
> > While for my regular browsing work I use Chrome, However for R I prefer
> to
> > use Canary (like, opening Help page). Is there any way to set Canary only
> > for R, however keeping system default unchanged.
> >
> > Thanks for your feedback.
>
>
> Hi,
>
> There are several steps involved during R ?Startup that set system and
> session specific ?options.
>
> In your ~/.Rprofile, for session specific settings, you can add something
> like the following:
>
>   options(browser = "/usr/bin/open -a '/Applications/Google Chrome.app'")
>
> replacing the Chrome binary filename above with the Canary name.
>
> Be sure to exit your R session after setting the above, then start a new
> session to pick up the change.
>
> The above works for me, to change the default from Safari to Chrome, just
> within my R session, without affecting the system default.
>
> Regards,
>
> Marc Schwartz
>
>

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] How to change default Browser for R

2018-08-04 Thread Christofer Bogaso
Hi,

In my Mac, I have 2 browsers installed :

Chrome (system default)
Google Chrome Canary

While for my regular browsing work I use Chrome, However for R I prefer to
use Canary (like, opening Help page). Is there any way to set Canary only
for R, however keeping system default unchanged.

Thanks for your feedback.

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] Opening single Terminal window and running syntax sequentially from R

2018-01-10 Thread Christofer Bogaso
Hi,

I have an .app file saved in Harddisk, which I want to run from R. So
below is the code which I use:

system("open '.../My_File.app'")

However, if I run above code multiple times (sequentially) then each
time a new Terminal window opens that make my system cluttered.

So I wonder if there is any way to use a single Terminal window and
run above code sequentially there only. R should search if any
Terminal window is already open and then run syntax on that Terminal
window only.

Any pointer will be highly appreciated.

Thanks,

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Executing iOS system code within R

2017-10-10 Thread Christofer Bogaso
Hi Elijah, your suggestion is perfect - basically, I need to use ';'
as separator between multiple lines of iOS code. Thanks for this
pointer.

On Tue, Oct 10, 2017 at 11:46 PM, elijah wright <e...@stderr.org> wrote:
> something like:
>
> system("PWD=`pwd`; cd TARGETDIR; ./runme.sh; cd $PWD') will do basically this.
>
> Every time you run the system call it should be spawning a new shell
> with a fresh environment.
>
> --e
>
>
> On Tue, Oct 10, 2017 at 12:58 PM, Christofer Bogaso
> <bogaso.christo...@gmail.com> wrote:
>> Hi again,
>>
>> I need to execute few line of system codes for iOS from R. Basically
>> that execution involves (as an example) :
>>
>> 1. Change the Working directory first
>> 2. Execute some task (e.g.deleting a file)
>> 3. Then go back to original folder/directory
>>
>> I am aware of system() function which can be used here. However it
>> looks that system() function executes iOS code one-by-one i.e. after I
>> execute system('cd .') for #1 above, that changed directory is not
>> passed for #2 and so on.
>>
>> Is there any way where I can run a chain on iOS code as-a-whole using R.
>>
>> Your help will be highly appreciated.
>>
>> Thanks for your time.
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Executing iOS system code within R

2017-10-10 Thread Christofer Bogaso
Yes macOS - High Sierra

On Tue, Oct 10, 2017 at 11:33 PM, elijah wright <e...@stderr.org> wrote:
> Did you mean macOS?  I am not aware of anything that can run both R
> and iOS code - if there's some fancy thing out there that can, i would
> like to know about that.  ;-)
>
> --e
>
>
> On Tue, Oct 10, 2017 at 12:58 PM, Christofer Bogaso
> <bogaso.christo...@gmail.com> wrote:
>> Hi again,
>>
>> I need to execute few line of system codes for iOS from R. Basically
>> that execution involves (as an example) :
>>
>> 1. Change the Working directory first
>> 2. Execute some task (e.g.deleting a file)
>> 3. Then go back to original folder/directory
>>
>> I am aware of system() function which can be used here. However it
>> looks that system() function executes iOS code one-by-one i.e. after I
>> execute system('cd .') for #1 above, that changed directory is not
>> passed for #2 and so on.
>>
>> Is there any way where I can run a chain on iOS code as-a-whole using R.
>>
>> Your help will be highly appreciated.
>>
>> Thanks for your time.
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] Executing iOS system code within R

2017-10-10 Thread Christofer Bogaso
Hi again,

I need to execute few line of system codes for iOS from R. Basically
that execution involves (as an example) :

1. Change the Working directory first
2. Execute some task (e.g.deleting a file)
3. Then go back to original folder/directory

I am aware of system() function which can be used here. However it
looks that system() function executes iOS code one-by-one i.e. after I
execute system('cd .') for #1 above, that changed directory is not
passed for #2 and so on.

Is there any way where I can run a chain on iOS code as-a-whole using R.

Your help will be highly appreciated.

Thanks for your time.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Permanently fix R to open Help page in html

2017-07-11 Thread Christofer Bogaso
Hi Marc,

When I enter 'open -a Textedit ~/.Rprofile' in Terminal .RProfie file
opens. Below is the content of that file :

.First <- function() {
options("repos" = c(CRAN = "http://cran.r-project.org/;))
options(help_type = "html")
}

An the R window looks like below :

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"

Copyright (C) 2017 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin15.6.0 (64-bit)


R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.


  Natural language support but running in an English locale


R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.


Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.


[Previously saved workspace restored]


> ?sum

starting httpd help server ... done

>


Please let me know if you need anything else.

Thanks,

On Tue, Jul 11, 2017 at 8:29 PM, Marc Schwartz <marc_schwa...@me.com> wrote:
> Christofer,
>
> The thing is that you really don't need to do that (use .First), which makes 
> this situation curious and why it would be helpful to see the full content of 
> your .Rprofile file, to be sure that there is not a conflict in content or 
> structure someplace.
>
> An extra set of eyes might be helpful.
>
> Marc
>
>> On Jul 11, 2017, at 9:52 AM, Christofer Bogaso <bogaso.christo...@gmail.com> 
>> wrote:
>>
>> Hi,
>>
>> I just put options(help_type = "html") inside .First <- function() {}
>> and now it works. Help page is now opening in Browser.
>>
>> Thanks all for your time and help. Regards,
>>
>>
>>
>> On Tue, Jul 11, 2017 at 8:21 PM, Marc Schwartz <marc_schwa...@me.com> wrote:
>>> Christofer,
>>>
>>> Can you post your .Rprofile file someplace online (e.g. Dropbox) so that we 
>>> can take a look at it?
>>>
>>> Marc
>>>
>>>
>>>> On Jul 11, 2017, at 9:48 AM, Christofer Bogaso 
>>>> <bogaso.christo...@gmail.com> wrote:
>>>>
>>>> Hi Ben,
>>>>
>>>> I work with R from Terminal only.
>>>>
>>>> If I explicitly set ' options(help_type = 'html')' after opening R in
>>>> terminal, it works perfectly. Means, help page opens in Browser.
>>>>
>>>> However I do not want to have this code ' options(help_type = 'html')'
>>>> every time I open R. So I want R to set this option all time. Thats
>>>> why I chose to create .RProfile file and put that code there. However
>>>> in that case, it is not working.
>>>>
>>>> Below is the snapshot like yours :
>>>>
>>>> R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
>>>>
>>>> Copyright (C) 2017 The R Foundation for Statistical Computing
>>>>
>>>> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>>>>
>>>>
>>>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>>>>
>>>> You are welcome to redistribute it under certain conditions.
>>>>
>>>> Type 'license()' or 'licence()' for distribution details.
>>>>
>>>>
>>>> Natural language support but running in an English locale
>>>>
>>>>
>>>> R is a collaborative project with many contributors.
>>>>
>>>> Type 'contributors()' for more information and
>>>>
>>>> 'citation()' on how to cite R or R packages in publications.
>>>>
>>>>
>>>> Type 'demo()' for some demos, 'help()' for on-line help, or
>>>>
>>>> 'help.start()' for an HTML browser interface to help.
>>>>
>>>> Type 'q()' to quit R.
>>>>
>>>>
>>>> [Previously saved workspace restored]
>>>>
>>>>
>>>>> ?sum
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>

Re: [R-SIG-Mac] Permanently fix R to open Help page in html

2017-07-11 Thread Christofer Bogaso
Hi,

I just put options(help_type = "html") inside .First <- function() {}
and now it works. Help page is now opening in Browser.

Thanks all for your time and help. Regards,



On Tue, Jul 11, 2017 at 8:21 PM, Marc Schwartz <marc_schwa...@me.com> wrote:
> Christofer,
>
> Can you post your .Rprofile file someplace online (e.g. Dropbox) so that we 
> can take a look at it?
>
> Marc
>
>
>> On Jul 11, 2017, at 9:48 AM, Christofer Bogaso <bogaso.christo...@gmail.com> 
>> wrote:
>>
>> Hi Ben,
>>
>> I work with R from Terminal only.
>>
>> If I explicitly set ' options(help_type = 'html')' after opening R in
>> terminal, it works perfectly. Means, help page opens in Browser.
>>
>> However I do not want to have this code ' options(help_type = 'html')'
>> every time I open R. So I want R to set this option all time. Thats
>> why I chose to create .RProfile file and put that code there. However
>> in that case, it is not working.
>>
>> Below is the snapshot like yours :
>>
>> R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
>>
>> Copyright (C) 2017 The R Foundation for Statistical Computing
>>
>> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>>
>>
>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>>
>> You are welcome to redistribute it under certain conditions.
>>
>> Type 'license()' or 'licence()' for distribution details.
>>
>>
>>  Natural language support but running in an English locale
>>
>>
>> R is a collaborative project with many contributors.
>>
>> Type 'contributors()' for more information and
>>
>> 'citation()' on how to cite R or R packages in publications.
>>
>>
>> Type 'demo()' for some demos, 'help()' for on-line help, or
>>
>> 'help.start()' for an HTML browser interface to help.
>>
>> Type 'q()' to quit R.
>>
>>
>> [Previously saved workspace restored]
>>
>>
>>> ?sum
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> sumpackage:baseR Documentation
>>
>>
>> Sum of Vector Elements
>>
>>
>> Description:
>>
>>
>> ‘sum’ returns the sum of all the values present in its arguments.
>>
>>
>> Usage:
>>
>>
>> sum(..., na.rm = FALSE)
>>
>>
>>
>> On Tue, Jul 11, 2017 at 7:45 PM, Ben Tupper <btup...@bigelow.org> wrote:
>>> Hi,
>>>
>>> I'm curious about what happens if you start a plain R session at the 
>>> command line (not R.app) and set the option within the session.  Something 
>>> like the following that open help in my browser.
>>>
>>> $ R --vanilla
>>>
>>> R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
>>> Copyright (C) 2016 The R Foundation for Statistical Computing
>>> Platform: x86_64-apple-darwin13.4.0 (64-bit)
>>>
>>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>>> You are welcome to redistribute it under certain conditions.
>>> Type 'license()' or 'licence()' for distribution details.
>>>
>>>  Natural language support but running in an English locale
>>>
>>> R is a collaborative project with many contributors.
>>> Type 'contributors()' for more information and
>>> 'citation()' on how to cite R or R packages in publications.
>>>
>>> Type 'demo()' for some demos, 'help()' for on-line help, or
>>> 'help.start()' for an HTML browser interface to help.
>>> Type 'q()' to quit R.
>>>
>>>> options(help_type = 'html')
>>>> ?source
>>> starting httpd help server ... done
>>>
>>> Ben
>>>
>>>
>>>
>>>
>>>
>>>> On Jul 11, 2017, at 10:10 AM, Christofer Bogaso 
>>>> <bogaso.christo...@gmail.com> wrote:
>>>>
>>>> I am not getting error.
>>>>
>>>> However help page is not opening in html.
>>>>
>>>> On Tue, Jul 11, 2017 at 5:16 PM, Marc Schwartz <marc_schwa...@me.com> 
>>>> wrote:
>>>>>
>>>>>> On Jul 10, 2017, at 10:33 PM, Christofer Bogaso 
>>>>>> <bogaso.christo...@gmail.com> wrote:
>>>>>>

Re: [R-SIG-Mac] Permanently fix R to open Help page in html

2017-07-11 Thread Christofer Bogaso
Hi Ben,

I work with R from Terminal only.

If I explicitly set ' options(help_type = 'html')' after opening R in
terminal, it works perfectly. Means, help page opens in Browser.

However I do not want to have this code ' options(help_type = 'html')'
every time I open R. So I want R to set this option all time. Thats
why I chose to create .RProfile file and put that code there. However
in that case, it is not working.

Below is the snapshot like yours :

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"

Copyright (C) 2017 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin15.6.0 (64-bit)


R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.


  Natural language support but running in an English locale


R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.


Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.


[Previously saved workspace restored]


> ?sum































sumpackage:baseR Documentation


Sum of Vector Elements


Description:


 ‘sum’ returns the sum of all the values present in its arguments.


Usage:


 sum(..., na.rm = FALSE)



On Tue, Jul 11, 2017 at 7:45 PM, Ben Tupper <btup...@bigelow.org> wrote:
> Hi,
>
> I'm curious about what happens if you start a plain R session at the command 
> line (not R.app) and set the option within the session.  Something like the 
> following that open help in my browser.
>
> $ R --vanilla
>
> R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
> Copyright (C) 2016 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>   Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> options(help_type = 'html')
>> ?source
> starting httpd help server ... done
>
> Ben
>
>
>
>
>
>> On Jul 11, 2017, at 10:10 AM, Christofer Bogaso 
>> <bogaso.christo...@gmail.com> wrote:
>>
>> I am not getting error.
>>
>> However help page is not opening in html.
>>
>> On Tue, Jul 11, 2017 at 5:16 PM, Marc Schwartz <marc_schwa...@me.com> wrote:
>>>
>>>> On Jul 10, 2017, at 10:33 PM, Christofer Bogaso 
>>>> <bogaso.christo...@gmail.com> wrote:
>>>>
>>>> Performed steps according to Marc's suggestions :
>>>>
>>>> But not help page is not openning in Browser.
>>>
>>>
>>> Are you getting the same error as before?
>>>
>>> Do the single quotes still look like smart quotes or regular ASCII quotes?
>>>
>>> Marc
>>>
>>>
>>>>
>>>> On Tue, Jul 11, 2017 at 7:28 AM, Marc Schwartz <marc_schwa...@me.com> 
>>>> wrote:
>>>>>
>>>>>> On Jul 10, 2017, at 5:19 PM, Duncan Murdoch <murdoch.dun...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>> On 10/07/2017 5:02 PM, Christofer Bogaso wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I wanted R to open any Help page in html permanently.
>>>>>>>
>>>>>>> So 1st I created .Rprofile file with below code in terminal:
>>>>>>>
>>>>>>> touch ~/.Rprofile
>>>>>>>
>>>>>>> open -a Textedit ~/.Rprofile
>>>>>>>
>>>>>>>
>>>>>>> And then in the .Rprofile file, I wrote below code :
>>>>>>>
>>>>>>> options(help_type = ‘html’)
>>>>>>>
>>>>>>> However after that when I start R (from Terminal) I get below error on 
>>>>>>> loading R
>>>>>>>
>>>>>>> Error: 1:20: unexpected input
>>>>>>>
>>>>>>> 1: options(help_type = ?
>>>&

Re: [R-SIG-Mac] Permanently fix R to open Help page in html

2017-07-10 Thread Christofer Bogaso
Performed steps according to Marc's suggestions :

But not help page is not openning in Browser.

On Tue, Jul 11, 2017 at 7:28 AM, Marc Schwartz <marc_schwa...@me.com> wrote:
>
>> On Jul 10, 2017, at 5:19 PM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
>>
>> On 10/07/2017 5:02 PM, Christofer Bogaso wrote:
>>> Hi,
>>>
>>> I wanted R to open any Help page in html permanently.
>>>
>>> So 1st I created .Rprofile file with below code in terminal:
>>>
>>> touch ~/.Rprofile
>>>
>>> open -a Textedit ~/.Rprofile
>>>
>>>
>>> And then in the .Rprofile file, I wrote below code :
>>>
>>> options(help_type = ‘html’)
>>>
>>> However after that when I start R (from Terminal) I get below error on 
>>> loading R
>>>
>>> Error: 1:20: unexpected input
>>>
>>> 1: options(help_type = ?
>>>
>>>   ^
>>
>> Those don't look like ASCII quotes.  Use the R.app editor, not Textedit, and 
>> it won't put in funny "smart quotes".
>
>
> Alternatively, you can set TextEdit to not use "Smart quotes"  by disabling 
> them in:
>
>   Preferences -> New Document
>
> There is a checkbox under Options for Smart quotes. Uncheck it.
>
> Regards,
>
> Marc Schwartz
>
>
>>
>> Duncan Murdoch
>>
>>>
>>> [Previously saved workspace restored]
>>>
>>>
>>>>
>>>
>>> Can someone please point me on where I made mistake.
>>>
>>> Thanks for your time.
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[R-SIG-Mac] Permanently fix R to open Help page in html

2017-07-10 Thread Christofer Bogaso
Hi,

I wanted R to open any Help page in html permanently.

So 1st I created .Rprofile file with below code in terminal:

touch ~/.Rprofile

open -a Textedit ~/.Rprofile


And then in the .Rprofile file, I wrote below code :

options(help_type = ‘html’)

However after that when I start R (from Terminal) I get below error on loading R

Error: 1:20: unexpected input

1: options(help_type = ?

   ^

[Previously saved workspace restored]


>

Can someone please point me on where I made mistake.

Thanks for your time.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0

2017-05-24 Thread Christofer Bogaso
Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation'
because Objective-C garbage collection is not supported

xcrun: error: unable to locate xcodebuild, please make sure the path
to the Xcode folder is set correctly!

xcrun: error: You can set the path to the Xcode folder using
/usr/bin/xcode-select -switch

Java interpreter : /usr/bin/java

Java version : 1.8.0_131

Java home path   :
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre

Java compiler: /usr/bin/javac

Java headers gen.: /usr/bin/javah

Java archive tool: /usr/bin/jar

Non-system Java on macOS


trying to compile and link a JNI program

detected JNI cpp flags: -I$(JAVA_HOME)/../include
-I$(JAVA_HOME)/../include/darwin

detected JNI linker flags : -L/Users/ARRUN/Library/Java/Extensions
-L/Library/Java/Extensions -L/Network/Library/Java/Extensions
-L/System/Library/Java/Extensions -L/usr/lib/java -L. -ljvm

dyld: Library not loaded:
@rpath/DVTFoundation.framework/Versions/A/DVTFoundation

  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

  Reason: no suitable image found.  Did find:

/Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation:
cannot load 
'/Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation'
because Objective-C garbage collection is not supported

xcrun: error: unable to locate xcodebuild, please make sure the path
to the Xcode folder is set correctly!

xcrun: error: You can set the path to the Xcode folder using
/usr/bin/xcode-select -switch

Unable to compile a JNI program



JAVA_HOME:
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre

Java library path:

JNI cpp flags:

JNI linker flags :

Updating Java configuration in /Library/Frameworks/R.framework/Resources

Done.

On Wed, May 24, 2017 at 10:28 AM, Simon Urbanek
<simon.urba...@r-project.org> wrote:
> Christofer,
>
>> On May 23, 2017, at 7:44 PM, Christofer Bogaso <bogaso.christo...@gmail.com> 
>> wrote:
>>
>> Hi David,
>>
>> The file 'rJava.so' exists in my machine :
>>
>>> file.exists('/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so')
>>
>> [1] TRUE
>>
>> Also the Javac version that I have :
>>
>>> system('javac -version')
>>
>> javac 1.6.0_65
>>
>> Looks like mine is older than you. Do I need to download the latest?
>> In that case, do you suggest any link? As far as I know, javac comes
>> with Mac installed.
>>
>
> Apple has dropped Java support many years ago - what you have a is a 
> left-over from a very old OS X version as you likely upgraded your OS X over 
> the years without re-installing.
> Since R 3.4.0 the CRAN binary uses Java 1.8, because too many users have 
> complained about incompatibilities with old Java version, so you have two 
> options
> 1) recompile rJava from sources against your ancient Java
> 2) install Java 1.8 from Oracle[1], then run R CMD javareconf
>
> [1] 
> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
>
> Cheers,
> Simon
>
>
>
>> On Peter's suggestion I also did sudo R CMD javareconf. However still
>> rJava couldnt be loaded.
>>
>> Any other idea? Thanks,
>>
>> On Wed, May 24, 2017 at 4:28 AM, peter dalgaard <pda...@gmail.com> wrote:
>>> [Christofer seemed to have fallen off the cc: list, now included]
>>>
>>>> On 24 May 2017, at 00:18 , David Winsemius <dwinsem...@comcast.net> wrote:
>>>>
>>>> What version of the Java Runtime Environment is available? What do you get 
>>>> for:
>>>>
>>>> system('javac -version')
>>>> #I get:
>>>> #javac 1.8.0_65
>>>>
>>>> I think that version was working with rJava, but I followed the "critical" 
>>>> advice on the Java SDK webpage ...
>>>>
>>>> ... and after updating I now  get
>>>> #javac 1.8.0_131
>>>>
>>>> And rJava still loads without error. I'm not on Sierra, however.
>>>>
>>>
>>> I am, and rJava doesn't load here either. However after
>>>
>>> sudo R CMD javareconf
>>>
>>> it seems happy as a clam.
>>>
>>>
>>>> Good luck;
>>>> David,
>>>
>>> --
>>> Peter Dalgaard, Professor,
>>> Center for Statistics, Copenhagen Business School
>>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>>> Phone: (+45)38153501
>>> Office: A 4.23
>>> Email: pd@cbs.dk  Priv: pda...@gmail.com
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0

2017-05-23 Thread Christofer Bogaso
Hi David,

The file 'rJava.so' exists in my machine :

> file.exists('/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so')

[1] TRUE

Also the Javac version that I have :

> system('javac -version')

javac 1.6.0_65

Looks like mine is older than you. Do I need to download the latest?
In that case, do you suggest any link? As far as I know, javac comes
with Mac installed.

On Peter's suggestion I also did sudo R CMD javareconf. However still
rJava couldnt be loaded.

Any other idea? Thanks,

On Wed, May 24, 2017 at 4:28 AM, peter dalgaard  wrote:
> [Christofer seemed to have fallen off the cc: list, now included]
>
>> On 24 May 2017, at 00:18 , David Winsemius  wrote:
>>
>> What version of the Java Runtime Environment is available? What do you get 
>> for:
>>
>> system('javac -version')
>> #I get:
>> #javac 1.8.0_65
>>
>> I think that version was working with rJava, but I followed the "critical" 
>> advice on the Java SDK webpage ...
>>
>> ... and after updating I now  get
>> #javac 1.8.0_131
>>
>> And rJava still loads without error. I'm not on Sierra, however.
>>
>
> I am, and rJava doesn't load here either. However after
>
> sudo R CMD javareconf
>
> it seems happy as a clam.
>
>
>> Good luck;
>> David,
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0

2017-05-23 Thread Christofer Bogaso
Hi again,

After I upgraded R to 3.4.0, I could not load rJava package. Below is
the error :

> library(rJava)

Error: package or namespace load failed for ‘rJava’:

 .onLoad failed in loadNamespace() for 'rJava', details:

  call: dyn.load(file, DLLpath = DLLpath, ...)

  error: unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':

  
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so,
6): Library not loaded: @rpath/libjvm.dylib

  Referenced from:
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so

  Reason: image not found

I have installed latest version of Java.

R version :

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"

Copyright (C) 2017 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin15.6.0 (64-bit)

iOS : Sierra

With previous version of R, rJava was working fine. Could you please
help how to fix it.

Thanks for your time.

Regards,

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] R is taking too long to load

2017-05-18 Thread Christofer Bogaso
Thanks,

How can I start R with --vanilla in Mac? Sorry if this question is very trivial.

On Fri, May 19, 2017 at 3:11 AM, Hervé Pagès <hpa...@fredhutch.org> wrote:
> Hi,
>
> First thing I would do is make sure you don't have any startup file
> or .Rhistory in the way. If starting R with --vanilla is fast, then
> that's probably the case.
>
> H.
>
>
> On 05/18/2017 12:44 PM, Christofer Bogaso wrote:
>>
>> Hi,
>>
>> It just started happening recently that R is taking too long to load
>> and entire system freezes during its loading.
>>
>> Have anyone experienced something similar? Previously my R was
>> completely okay, however it just started recently.
>>
>> Any solution for this? I have reinstalled R and now it is the latest
>> version 3.4.0. I am using Sierra iOS.
>>
>> Appreciate for any pointer.
>>
>> Thanks,
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dsig-2Dmac=DwICAg=eRAMFD45gAfqt84VtBcfhQ=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA=m7VSPPECqAsFryKwwUO-q8QiizXtbiWc-kj9qtPO2h0=cSQVI4BrFUKhUyo5ZPrQMQOwu-ZSCMWpxh5IJ8y9L6s=
>>
>
> --
> Hervé Pagès
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M1-B514
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpa...@fredhutch.org
> Phone:  (206) 667-5791
> Fax:(206) 667-1319

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[R-SIG-Mac] R is taking too long to load

2017-05-18 Thread Christofer Bogaso
Hi,

It just started happening recently that R is taking too long to load
and entire system freezes during its loading.

Have anyone experienced something similar? Previously my R was
completely okay, however it just started recently.

Any solution for this? I have reinstalled R and now it is the latest
version 3.4.0. I am using Sierra iOS.

Appreciate for any pointer.

Thanks,

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Download data from Internet contained in a Zip file

2016-12-29 Thread Christofer Bogaso
Hi David,

Above problem to my system appears like due to use of older R version.
I have secured a new Mac from my friend, rerun your suggestions with R
version 3.3.2 (2016-10-31)

Your instruction works perfectly fine there. Thanks,

On Tue, Dec 27, 2016 at 8:54 AM, David Winsemius <dwinsem...@comcast.net> wrote:
>
>> On Dec 26, 2016, at 10:37 AM, Christofer Bogaso 
>> <bogaso.christo...@gmail.com> wrote:
>>
>> Thanks David for your detailing. However still it not working for me :
>>
>>> library(downloader)
>>> download("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip","temp.zip;)
>> 100   996  100   9960 0917  0  0:00:01  0:00:01
>> --:--:--  2028 0  0  0 --:--:-- --:--:-- --:--:-- 0
>>> dat <- unzip("~/temp.zip")
>> Warning message:
>> In unzip("~/temp.zip") : error 1 in extracting from zip file
>>> str(dat)
>> chr(0)
>>
>> Do I need to install something to get it worked?
>
> I don't know. You haven't provided enough information (for me anyway). I knew 
> that my working  directory was set to my user-HOME, Which was where I was 
> asking `unzip` to look. I don't know where you zip file is because you didn't 
> say where you working directory was. "Error 1" Is what I get get for a 
> non-existent file.
>
> --
> David.
>
>>
>> However,
>>
>> as a workaround can you please suggest if below data can be downloaded
>> directly into R? Since my only expectation is to get Data
>> automatically, if below works then I can still happily live with that
>>
>> http://www.utimf.com/UTI-MF-Microsites/retirement/pdf/Scheme_1_NAV_since_inception.pdf
>>
>> Thanks again
>>
>> On Mon, Dec 26, 2016 at 11:10 PM, David Winsemius
>> <dwinsem...@comcast.net> wrote:
>>>
>>>> On Dec 26, 2016, at 3:19 AM, Christofer Bogaso 
>>>> <bogaso.christo...@gmail.com> wrote:
>>>>
>>>> Hi David et al,
>>>>
>>>> Thanks for showing the pointers. With your approach, I see the
>>>> "temp.zip" file in my working folder.
>>>>
>>>> However still I could not extract the data within it. I tried using
>>>> unzip() function, however not really going through :
>>>>
>>>>> unzip("temp.zip")
>>>> Warning message:
>>>> In unzip("temp.zip") : error 1 in extracting from zip file
>>>
>>> I didn't try to use R to unzip it. Just using my system facilities worked 
>>> fine.
>>>
>>> I'm not able to reproduce:
>>>
>>>> ?unzip
>>>> dat <- unzip("~/temp.zip")
>>>> str(dat)
>>> chr "./NAV_File_23122016.out"
>>>> dat_in <- read.table(dat)
>>> Error in scan(file = file, what = what, sep = sep, quote = quote, dec = 
>>> dec,  :
>>>  line 1 did not have 17 elements
>>>> dat_in <- read.csv(dat, header=FALSE)
>>>> str(dat_in)
>>> 'data.frame':   75 obs. of  6 variables:
>>> $ V1: Factor w/ 1 level "12/23/2016": 1 1 1 1 1 1 1 1 1 1 ...
>>> $ V2: Factor w/ 7 levels "PFM001","PFM002",..: 1 1 1 1 1 1 1 1 1 1 ...
>>> $ V3: Factor w/ 7 levels "HDFC PENSION MANAGEMENT COMPANY LIMITED",..: 6 6 
>>> 6 6 6 6 6 6 6 6 ...
>>> $ V4: Factor w/ 75 levels "SM001001","SM001002",..: 5 7 8 11 12 13 1 2 3 4 
>>> ...
>>> $ V5: Factor w/ 75 levels "HDFC PENSION MANAGEMENT COMPANY LIMITED SCHEME A 
>>> - TIER I",..: 62 59 63 37 56 57 54 55 60 58 ...
>>> $ V6: num  21.7 21.1 20.8 11.7 10.1 ...
>>>
>>>
>>> --
>>> David.
>>>>
>>>> When I try to access the link
>>>> "https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip;
>>>> manually, then download the zip file and then unzip it, I get a file
>>>> called "NAV_File_23122016.out". Which next I open in excel and get all
>>>> the data.
>>>>
>>>> I was just trying to perform similar task, however through R, so that
>>>> I can load data automatically directly from Web.
>>>>
>>>> Any Idea please. I am using below version of R (I know this is quite
>>>> old version, however I am not currently in a position to upgrade my
>>>> Macbook)
>>>>
>>>>> R.Version()
>>>> $platform
>>>> [1] &qu

Re: [R-SIG-Mac] Could not install Package:pdftools in Mac lion 10.7.5

2016-12-27 Thread Christofer Bogaso
I fix one problem and another problem pops up. After fixing default
locale, I am getting below error when I try loading pdftools :

> install.packages('/Users/ARR/pdftools_1.0.tgz', repos = NULL)
> library(pdftools)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so':
  
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so,
6): Symbol not found: ___exp10
  Referenced from:
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so
  Expected in: /usr/lib/libSystem.B.dylib
 in 
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so
In addition: Warning message:
package ‘pdftools’ was built under R version 3.2.5
Error: package or namespace load failed for ‘pdftools’

On Wed, Dec 28, 2016 at 12:51 AM, Jeroen Ooms <jeroen.o...@stat.ucla.edu> wrote:
> On Tue, Dec 27, 2016 at 8:09 PM, Christofer Bogaso
> <bogaso.christo...@gmail.com> wrote:
>> It giving below error  :(
>>
>>> install.packages('/Users/ARR/pdftools_1.0.tgz', repos = NULL)
>> tar: Failed to set default locale
>
> I think that is an unrelated problem on your system. See:
>
>  
> http://stackoverflow.com/questions/3907719/how-to-fix-tar-failed-to-set-default-locale-error
>
> But if you didn't get any other error the installation might have
> succeeded? Try loading the package:
>
>   library(pdftools)
>
> If that works you might be OK.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Could not install Package:pdftools in Mac lion 10.7.5

2016-12-27 Thread Christofer Bogaso
It giving below error  :(

> install.packages('/Users/ARR/pdftools_1.0.tgz', repos = NULL)
tar: Failed to set default locale

On Wed, Dec 28, 2016 at 12:35 AM, Jeroen Ooms <jeroen.o...@stat.ucla.edu> wrote:
> On Tue, Dec 27, 2016 at 7:27 PM, Christofer Bogaso
> <bogaso.christo...@gmail.com> wrote:
>>
>> I have installed poppler as instructed in below site. However, not
>> libpoppler. Let me know if I need to install libpoppler as well, in
>> that case appreciate any pointer how should I install.
>
> No that's the same thing. It's difficult for me to debug this since
> you're using such an old version of OSX and R. Chances are poppler
> simply doesn't work on such an old system.
>
> But one thing you could try is manually installing the mavericks
> binary package. Download this file to your system:
>
>
> https://cran.r-project.org/bin/macosx/mavericks/contrib/3.2/pdftools_1.0.tgz
>
> And then install it in R using:
>
>   install.packages('~/Downloads/pdftools_1.0.tgz', repos = NULL)
>
> If you're lucky it works :)

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Could not install Package:pdftools in Mac lion 10.7.5

2016-12-27 Thread Christofer Bogaso
Hi,

I have installed poppler as instructed in below site. However, not
libpoppler. Let me know if I need to install libpoppler as well, in
that case appreciate any pointer how should I install.

I know my Mac version is old now, right now I am not in a position to
get the most recent version.

Thanks,

http://macappstore.org/poppler/

On Tue, Dec 27, 2016 at 11:53 PM, Jeroen Ooms <jeroen.o...@stat.ucla.edu> wrote:
> How did you install libpoppler? Such errors typically appear when you
> link to a shared library which was built with another (incompatible)
> compiler than the one you use for compiling R packages.
>
> Note that Mac lion 10.7.5 has been deprecated for 2 over two years;
> upgrading your OS is highly recommended.
>
>
>
> On Tue, Dec 27, 2016 at 7:05 PM, Christofer Bogaso
> <bogaso.christo...@gmail.com> wrote:
>> Hi,
>>
>> I am trying to install "pdftools" package in R from source, however
>> could not succeeded due to following error.
>>
>> Source file is downloaded from
>> https://cran.r-project.org/web/packages/pdftools/index.html
>>
>> Appreciate for any pointer how to install it properly.
>>
>> I am using R version 3.2.1 (2015-06-18)
>>
>> The loading error :
>>
>> tar: Failed to set default locale
>> During startup - Warning messages:
>> 1: Setting LC_CTYPE failed, using "C"
>> 2: Setting LC_TIME failed, using "C"
>> 3: Setting LC_MESSAGES failed, using "C"
>> 4: Setting LC_MONETARY failed, using "C"
>> * installing *source* package 'pdftools' ...
>> ** package 'pdftools' successfully unpacked and MD5 sums checked
>> Found pkg-config cflags and libs!
>> Using PKG_CFLAGS=-I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler
>> Using PKG_LIBS=-L/usr/local/Cellar/poppler/0.50.0/lib -lpoppler-cpp
>> ** libs
>> llvm-g++-4.2 -arch x86_64
>> -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler
>> -I/usr/local/include
>> -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include"
>>   -fPIC  -mtune=core2 -g -O2  -c RcppExports.cpp -o RcppExports.o
>> llvm-g++-4.2 -arch x86_64
>> -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler
>> -I/usr/local/include
>> -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include"
>>   -fPIC  -mtune=core2 -g -O2  -c bindings.cpp -o bindings.o
>> llvm-g++-4.2 -arch x86_64
>> -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
>> -I/usr/local/Cellar/poppler/0.50.0/include/poppler
>> -I/usr/local/include
>> -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include"
>>   -fPIC  -mtune=core2 -g -O2  -c init.cpp -o init.o
>> llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names
>> -undefined dynamic_lookup -single_module -multiply_defined suppress
>> -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib
>> -L/usr/local/lib -o pdftools.so RcppExports.o bindings.o init.o
>> -L/usr/local/Cellar/poppler/0.50.0/lib -lpoppler-cpp
>> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
>> -Wl,CoreFoundation
>> installing to 
>> /Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs
>> ** R
>> ** preparing package for lazy loading
>> ** help
>> *** installing help indices
>> ** building package indices
>> ** testing if installed package can be loaded
>> During startup - Warning messages:
>> 1: Setting LC_CTYPE failed, using "C"
>> 2: Setting LC_TIME failed, using "C"
>> 3: Setting LC_MESSAGES failed, using "C"
>> 4: Setting LC_MONETARY failed, using "C"
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>   unable to load shared object
>> '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so':
>>   
>> dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so,
>> 6): Symbol not found: __ZN7poppler14version_stringEv
>>   Referenced from:
>> /Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so
>>   Expected in: flat namespace
>>  in 
>> /Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so
>> Error: loading failed
>> Execution halted
>> ERROR: loading failed
>> * removing 
>> '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools'
>> * restoring previous
>> '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools'
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] Could not install Package:pdftools in Mac lion 10.7.5

2016-12-27 Thread Christofer Bogaso
Hi,

I am trying to install "pdftools" package in R from source, however
could not succeeded due to following error.

Source file is downloaded from
https://cran.r-project.org/web/packages/pdftools/index.html

Appreciate for any pointer how to install it properly.

I am using R version 3.2.1 (2015-06-18)

The loading error :

tar: Failed to set default locale
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
* installing *source* package 'pdftools' ...
** package 'pdftools' successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
-I/usr/local/Cellar/poppler/0.50.0/include/poppler
Using PKG_LIBS=-L/usr/local/Cellar/poppler/0.50.0/lib -lpoppler-cpp
** libs
llvm-g++-4.2 -arch x86_64
-I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
-I/usr/local/Cellar/poppler/0.50.0/include/poppler
-I/usr/local/include
-I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include"
  -fPIC  -mtune=core2 -g -O2  -c RcppExports.cpp -o RcppExports.o
llvm-g++-4.2 -arch x86_64
-I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
-I/usr/local/Cellar/poppler/0.50.0/include/poppler
-I/usr/local/include
-I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include"
  -fPIC  -mtune=core2 -g -O2  -c bindings.cpp -o bindings.o
llvm-g++-4.2 -arch x86_64
-I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I/usr/local/Cellar/poppler/0.50.0/include/poppler/cpp
-I/usr/local/Cellar/poppler/0.50.0/include/poppler
-I/usr/local/include
-I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include"
  -fPIC  -mtune=core2 -g -O2  -c init.cpp -o init.o
llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names
-undefined dynamic_lookup -single_module -multiply_defined suppress
-L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib
-L/usr/local/lib -o pdftools.so RcppExports.o bindings.o init.o
-L/usr/local/Cellar/poppler/0.50.0/lib -lpoppler-cpp
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
installing to 
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so':
  
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so,
6): Symbol not found: __ZN7poppler14version_stringEv
  Referenced from:
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so
  Expected in: flat namespace
 in 
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools/libs/pdftools.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing 
'/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools'
* restoring previous
'/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pdftools'

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Download data from Internet contained in a Zip file

2016-12-26 Thread Christofer Bogaso
Thanks David for your detailing. However still it not working for me :

> library(downloader)
> download("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip","temp.zip;)
100   996  100   9960 0917  0  0:00:01  0:00:01
--:--:--  2028 0  0  0 --:--:-- --:--:-- --:--:-- 0
> dat <- unzip("~/temp.zip")
Warning message:
In unzip("~/temp.zip") : error 1 in extracting from zip file
> str(dat)
 chr(0)

Do I need to install something to get it worked?

However,

as a workaround can you please suggest if below data can be downloaded
directly into R? Since my only expectation is to get Data
automatically, if below works then I can still happily live with that

http://www.utimf.com/UTI-MF-Microsites/retirement/pdf/Scheme_1_NAV_since_inception.pdf

Thanks again

On Mon, Dec 26, 2016 at 11:10 PM, David Winsemius
<dwinsem...@comcast.net> wrote:
>
>> On Dec 26, 2016, at 3:19 AM, Christofer Bogaso <bogaso.christo...@gmail.com> 
>> wrote:
>>
>> Hi David et al,
>>
>> Thanks for showing the pointers. With your approach, I see the
>> "temp.zip" file in my working folder.
>>
>> However still I could not extract the data within it. I tried using
>> unzip() function, however not really going through :
>>
>>> unzip("temp.zip")
>> Warning message:
>> In unzip("temp.zip") : error 1 in extracting from zip file
>
> I didn't try to use R to unzip it. Just using my system facilities worked 
> fine.
>
> I'm not able to reproduce:
>
>> ?unzip
>> dat <- unzip("~/temp.zip")
>> str(dat)
>  chr "./NAV_File_23122016.out"
>> dat_in <- read.table(dat)
> Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  
> :
>   line 1 did not have 17 elements
>> dat_in <- read.csv(dat, header=FALSE)
>> str(dat_in)
> 'data.frame':   75 obs. of  6 variables:
>  $ V1: Factor w/ 1 level "12/23/2016": 1 1 1 1 1 1 1 1 1 1 ...
>  $ V2: Factor w/ 7 levels "PFM001","PFM002",..: 1 1 1 1 1 1 1 1 1 1 ...
>  $ V3: Factor w/ 7 levels "HDFC PENSION MANAGEMENT COMPANY LIMITED",..: 6 6 6 
> 6 6 6 6 6 6 6 ...
>  $ V4: Factor w/ 75 levels "SM001001","SM001002",..: 5 7 8 11 12 13 1 2 3 4 
> ...
>  $ V5: Factor w/ 75 levels "HDFC PENSION MANAGEMENT COMPANY LIMITED SCHEME A 
> - TIER I",..: 62 59 63 37 56 57 54 55 60 58 ...
>  $ V6: num  21.7 21.1 20.8 11.7 10.1 ...
>
>
> --
> David.
>>
>> When I try to access the link
>> "https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip;
>> manually, then download the zip file and then unzip it, I get a file
>> called "NAV_File_23122016.out". Which next I open in excel and get all
>> the data.
>>
>> I was just trying to perform similar task, however through R, so that
>> I can load data automatically directly from Web.
>>
>> Any Idea please. I am using below version of R (I know this is quite
>> old version, however I am not currently in a position to upgrade my
>> Macbook)
>>
>>> R.Version()
>> $platform
>> [1] "x86_64-apple-darwin10.8.0"
>>
>> $arch
>> [1] "x86_64"
>>
>> $os
>> [1] "darwin10.8.0"
>>
>> $system
>> [1] "x86_64, darwin10.8.0"
>>
>> $status
>> [1] ""
>>
>> $major
>> [1] "3"
>>
>> $minor
>> [1] "2.1"
>>
>> $year
>> [1] "2015"
>>
>> $month
>> [1] "06"
>>
>> $day
>> [1] "18"
>>
>> $`svn rev`
>> [1] "68531"
>>
>> $language
>> [1] "R"
>>
>> $version.string
>> [1] "R version 3.2.1 (2015-06-18)"
>>
>> $nickname
>> [1] "World-Famous Astronaut"
>>
>> On Mon, Dec 26, 2016 at 7:18 AM, David Winsemius <dwinsem...@comcast.net> 
>> wrote:
>>>
>>>> On Dec 25, 2016, at 3:46 PM, Gábor Csárdi <csardi.ga...@gmail.com> wrote:
>>>>
>>>> Your R build does not support HTTPS.
>>>>
>>>> I suggest that you use the curl package if you can. HTTP support in
>>>> base R is very limited currently.
>>>
>>> I generally use the downloader package. It sets up the call to 
>>> download.file so that it succeeds with https URLs.
>>>
>>>
>>> install.packages("downloader", dependencies=TRUE)
>>> trying URL 
>>> '

Re: [R-SIG-Mac] Download data from Internet contained in a Zip file

2016-12-26 Thread Christofer Bogaso
Hi David et al,

Thanks for showing the pointers. With your approach, I see the
"temp.zip" file in my working folder.

However still I could not extract the data within it. I tried using
unzip() function, however not really going through :

> unzip("temp.zip")
Warning message:
In unzip("temp.zip") : error 1 in extracting from zip file

When I try to access the link
"https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip;
manually, then download the zip file and then unzip it, I get a file
called "NAV_File_23122016.out". Which next I open in excel and get all
the data.

I was just trying to perform similar task, however through R, so that
I can load data automatically directly from Web.

Any Idea please. I am using below version of R (I know this is quite
old version, however I am not currently in a position to upgrade my
Macbook)

> R.Version()
$platform
[1] "x86_64-apple-darwin10.8.0"

$arch
[1] "x86_64"

$os
[1] "darwin10.8.0"

$system
[1] "x86_64, darwin10.8.0"

$status
[1] ""

$major
[1] "3"

$minor
[1] "2.1"

$year
[1] "2015"

$month
[1] "06"

$day
[1] "18"

$`svn rev`
[1] "68531"

$language
[1] "R"

$version.string
[1] "R version 3.2.1 (2015-06-18)"

$nickname
[1] "World-Famous Astronaut"

On Mon, Dec 26, 2016 at 7:18 AM, David Winsemius <dwinsem...@comcast.net> wrote:
>
>> On Dec 25, 2016, at 3:46 PM, Gábor Csárdi <csardi.ga...@gmail.com> wrote:
>>
>> Your R build does not support HTTPS.
>>
>> I suggest that you use the curl package if you can. HTTP support in
>> base R is very limited currently.
>
> I generally use the downloader package. It sets up the call to download.file 
> so that it succeeds with https URLs.
>
>
>  install.packages("downloader", dependencies=TRUE)
> trying URL 
> 'http://cran.cnr.Berkeley.edu/bin/macosx/mavericks/contrib/3.3/downloader_0.4.tgz'
> Content type 'application/x-gzip' length 19459 bytes (19 KB)
> ==
> downloaded 19 KB
>
>
> The downloaded binary packages are in
> 
> /var/folders/68/vh2f8kzn09j8954r6q9100yhgn/T//Rtmpq8DVG4/downloaded_packages
>> library(downloader)
>> help(pac=downloader)
> starting httpd help server ... done
>> download("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip","temp.zip;)
>
> # Requires both a source and destination file name.
>
> trying URL 
> 'https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip'
> Content type 'application/octet-stream' length 1228 bytes
> ==
> downloaded 1228 bytes
>
> --
> David.
>>
>> Gabor
>>
>>
>>
>> On Sun, Dec 25, 2016 at 10:37 PM, Christofer Bogaso
>> <bogaso.christo...@gmail.com> wrote:
>>> Hi again,
>>>
>>> I posted this in general R thread, however it is suggested this group
>>> since I am using MAC OS 10.7.5.
>>>
>>> I was following the instruction available in
>>> "http://stackoverflow.com/questions/3053833/using-r-to-download-zipped-data-file-extract-and-import-data;
>>> to download data from Internet contained in a zip file from the
>>> address :
>>>
>>> https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip
>>>
>>> However when I tried to follow the instruction I am facing below error :
>>>
>>>> temp <- tempfile()
>>>> download.file("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip",temp)
>>> Error in 
>>> download.file("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip;,
>>> :
>>>  unsupported URL scheme
>>>
>>> Can someone here please tell me what went wrong in above?
>>>
>>> Highly appreciate your feedback.
>>>
>>> Thanks for your time.
>>>
>>> ___
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[R-SIG-Mac] Download data from Internet contained in a Zip file

2016-12-25 Thread Christofer Bogaso
Hi again,

I posted this in general R thread, however it is suggested this group
since I am using MAC OS 10.7.5.

I was following the instruction available in
"http://stackoverflow.com/questions/3053833/using-r-to-download-zipped-data-file-extract-and-import-data;
to download data from Internet contained in a zip file from the
address :

https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip

However when I tried to follow the instruction I am facing below error :

> temp <- tempfile()
> download.file("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip",temp)
Error in 
download.file("https://npscra.nsdl.co.in/download.php?path=download/=NAV_File_23122016.zip;,
 :
  unsupported URL scheme

Can someone here please tell me what went wrong in above?

Highly appreciate your feedback.

Thanks for your time.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] R code to open and close a file in Mac

2016-11-02 Thread Christofer Bogaso
Thanks, working perfectly. Any idea on forcibly closing that same file
through R.

Thanks again.

On Wed, Nov 2, 2016 at 7:45 PM, Simon Urbanek
<simon.urba...@r-project.org> wrote:
>
>> On Nov 2, 2016, at 10:02 AM, Christofer Bogaso <bogaso.christo...@gmail.com> 
>> wrote:
>>
>> Hi,
>>
>> I was wondering if there is any R way to open/close (forcibly) any
>> file (preferably Excel) within Mac. I have tried with system()
>> function, however it generates error saying ".. No such file or
>> directory" since I have <> in the underlying folder name.
>>
>
> system(paste("open", shQuote(filename)),wait=FALSE)
>
>
>
>> Can anyone here please help me with some workaround particularly on
>> how to handle Space in file/folder name.
>>
>> Thanks for your time.
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] R code to open and close a file in Mac

2016-11-02 Thread Christofer Bogaso
Hi,

I was wondering if there is any R way to open/close (forcibly) any
file (preferably Excel) within Mac. I have tried with system()
function, however it generates error saying ".. No such file or
directory" since I have <> in the underlying folder name.

Can anyone here please help me with some workaround particularly on
how to handle Space in file/folder name.

Thanks for your time.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] How to put below code in Automator in iOS

2016-10-27 Thread Christofer Bogaso
Hi,

I have gone through it, however looks like too technical from IT point
of view. I am struggling there since I am pure Math background not
much hands on on IT technicalities. Could you please provide any
pointer if any simpler solution is available for my problem.

On Fri, Oct 28, 2016 at 12:14 AM, David Winsemius
<dwinsem...@comcast.net> wrote:
>
>> On Oct 27, 2016, at 11:25 AM, Christofer Bogaso 
>> <bogaso.christo...@gmail.com> wrote:
>>
>> Hi,
>>
>> I just have used that to provide an example what I am onto. My actual
>> code is something else and kind of personal nature since some
>> proprietary data are there. However essentially they are same.
>>
>> What I am intending to do is, there will be some .app file which maps
>> that R code. Once user run that .app file by double clicking it, some
>> pop up will open and user shall provide further customized inputs. And
>> resultingly the final calculated data in csv file will be saved in
>> hard disk. In this way, user wont need to open R window, copy paste
>> the R code to do same calculation. So to me, this .app approach looks
>> more neat and simple from user's perspective.
>
> The Markmail link offered some suggestions. They all used the R console 
> engine and not Rscript.
>
>>
>> Thanks,
>>
>> On Thu, Oct 27, 2016 at 11:38 PM, David Winsemius
>> <dwinsem...@comcast.net> wrote:
>>>
>>>> On Oct 27, 2016, at 11:05 AM, Christofer Bogaso 
>>>> <bogaso.christo...@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> The code is same as in that page. i.e.
>>>>
>>>> require(tcltk)
>>>>
>>>> tt <- tktoplevel()
>>>> rb1 <- tkradiobutton(tt)
>>>> rb2 <- tkradiobutton(tt)
>>>> rbValue <- tclVar("oranges")
>>>> tkconfigure(rb1,variable=rbValue,value="apples")
>>>> tkconfigure(rb2,variable=rbValue,value="oranges")
>>>> tkgrid(tklabel(tt,text="Which do you prefer?"))
>>>> tkgrid(tklabel(tt,text="Apples "),rb1)
>>>> tkgrid(tklabel(tt,text="Oranges "),rb2)
>>>>
>>>> OnOK <- function()
>>>> {
>>>>   rbVal <- as.character(tclvalue(rbValue))
>>>>   tkdestroy(tt)
>>>>   if (rbVal=="apples")
>>>>   tkmessageBox(message="Good choice!  An apple a day keeps the doctor 
>>>> away!")
>>>>   if (rbVal=="oranges")
>>>>   tkmessageBox(message="Good choice!  Oranges are full of Vitamin C!")
>>>> }
>>>> OK.but <- tkbutton(tt,text="OK",command=OnOK)
>>>> tkgrid(OK.but)
>>>> tkfocus(tt)
>>>
>>> I'm predicting that you cannot get that file to do anything interesting 
>>> with Rscript, so I don't understand why you think that you can use an 
>>> Rscript-ing strategy within Automator.
>>>
>>> --
>>> David.
>>>>
>>>> On Thu, Oct 27, 2016 at 11:10 PM, David Winsemius
>>>> <dwinsem...@comcast.net> wrote:
>>>>>
>>>>>> On Oct 27, 2016, at 10:32 AM, David Winsemius <dwinsem...@comcast.net> 
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>> On Oct 27, 2016, at 10:16 AM, David Winsemius <dwinsem...@comcast.net> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>> On Oct 27, 2016, at 10:07 AM, Christofer Bogaso 
>>>>>>>> <bogaso.christo...@gmail.com> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Previously I posted this same thread in general R help, however folks
>>>>>>>> there suggested to post in this specialized group for better answer.
>>>>>>>>
>>>>>>>> I have a piece of code available here
>>>>>>>>
>>>>>>>> http://mcu.edu.tw/~chenmh/teaching/project/r/reference/RTclTkExamples/radiobuttons.html
>>>>>>>>
>>>>>>>> Now I put that code in a .R file and then created an .app file in Mac
>>>>>>>> using Automator as explained below
>>>>>>>>
>>>>>>>> https://www.r-bloggers.com/how-to-source-an-r-script-automatically-on-a-mac-using-automator-and-ical/

Re: [R-SIG-Mac] How to put below code in Automator in iOS

2016-10-27 Thread Christofer Bogaso
Hi,

The code is same as in that page. i.e.

require(tcltk)

tt <- tktoplevel()
rb1 <- tkradiobutton(tt)
rb2 <- tkradiobutton(tt)
rbValue <- tclVar("oranges")
tkconfigure(rb1,variable=rbValue,value="apples")
tkconfigure(rb2,variable=rbValue,value="oranges")
tkgrid(tklabel(tt,text="Which do you prefer?"))
tkgrid(tklabel(tt,text="Apples "),rb1)
tkgrid(tklabel(tt,text="Oranges "),rb2)

OnOK <- function()
{
rbVal <- as.character(tclvalue(rbValue))
tkdestroy(tt)
if (rbVal=="apples")
tkmessageBox(message="Good choice!  An apple a day keeps the doctor away!")
if (rbVal=="oranges")
tkmessageBox(message="Good choice!  Oranges are full of Vitamin C!")
}
OK.but <- tkbutton(tt,text="OK",command=OnOK)
tkgrid(OK.but)
tkfocus(tt)

On Thu, Oct 27, 2016 at 11:10 PM, David Winsemius
<dwinsem...@comcast.net> wrote:
>
>> On Oct 27, 2016, at 10:32 AM, David Winsemius <dwinsem...@comcast.net> wrote:
>>
>>
>>> On Oct 27, 2016, at 10:16 AM, David Winsemius <dwinsem...@comcast.net> 
>>> wrote:
>>>
>>>
>>>> On Oct 27, 2016, at 10:07 AM, Christofer Bogaso 
>>>> <bogaso.christo...@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Previously I posted this same thread in general R help, however folks
>>>> there suggested to post in this specialized group for better answer.
>>>>
>>>> I have a piece of code available here
>>>>
>>>> http://mcu.edu.tw/~chenmh/teaching/project/r/reference/RTclTkExamples/radiobuttons.html
>>>>
>>>> Now I put that code in a .R file and then created an .app file in Mac
>>>> using Automator as explained below
>>>>
>>>> https://www.r-bloggers.com/how-to-source-an-r-script-automatically-on-a-mac-using-automator-and-ical/
>>>>
>>>> Surprisingly what I see is that, when I put that R code in a .app
>>>> file, R fails to pop up the input window, which otherwise is fine when
>>>> I just copy paste that code in R window.
>>>>
>>>> Could you please help if I need to have anything extra so that my .app
>>>> will be able to take the input.
>>>
>>> You should post the code that is in your .R file.
>>
>> I have further concerns that I should have mentioned because I suspect 
>> you're trying to use functions that are not designed to be used inside 
>> Rscript process. The Tcl/Tk functions are designed to use in interactive 
>> sessions.
>
> And some searching on this matter shows that there have been prior suggested 
> approaches to starting interactive R processes from a system console session:
>
> http://markmail.org/search/?q=list%3Aorg.r-project.r-help+rscript+interactive+tcl#query:list%3Aorg.r-project.r-help%20rscript%20interactive%20tcl+page:1+mid:uyykuacq77cuxoas+state:results
>
>
>>>
>>>
>>>>
>>>> Thanks for your time.
>>>>
>>>> ___
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac@r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>
>>> David Winsemius
>>> Alameda, CA, USA
>>>
>>> ___
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>> David Winsemius
>> Alameda, CA, USA
>>
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
> David Winsemius
> Alameda, CA, USA
>

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] How to put below code in Automator in iOS

2016-10-27 Thread Christofer Bogaso
Hi,

Previously I posted this same thread in general R help, however folks
there suggested to post in this specialized group for better answer.

I have a piece of code available here

http://mcu.edu.tw/~chenmh/teaching/project/r/reference/RTclTkExamples/radiobuttons.html

Now I put that code in a .R file and then created an .app file in Mac
using Automator as explained below

https://www.r-bloggers.com/how-to-source-an-r-script-automatically-on-a-mac-using-automator-and-ical/

Surprisingly what I see is that, when I put that R code in a .app
file, R fails to pop up the input window, which otherwise is fine when
I just copy paste that code in R window.

Could you please help if I need to have anything extra so that my .app
will be able to take the input.

Thanks for your time.

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac