Re: [R] Help: ifelse selection for x,y coordinates

2017-06-22 Thread Anthoni, Peter (IMK)
Hi Celine,

what about removing the unwanted after you made the x and y
x<-x[x>0]  # or x<-x[x>0&>0], ditto for y, x[x!=""] in your ifelse (... ,"") 
case

if x and y will not have the same length afterwards you need to make that list 
thingy.

cheers
Peter



On 23. Jun 2017, at 07:30, Céline Lüscher 
> wrote:

Hi Jim,

Thank you very much for the answer ! The result is really better with this 

Here is the code :
kk<- function(x.Koordinate, y.Koordinate, data=data)
+ {
+   coordx<-data$x.Koordinate[data$G==24]
+   coordy<-data$y.Koordinate[data$G==24]
+   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate," ")
+   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate," ")
+   xy<-as.data.frame(list(x,y))
+   names(xy)<-c("x","y")
+   return(xy)
+ }
kk(x.Koordinate, y.Koordinate, data=data)
   x  y
1
2
3
4
5
6  205550
7  205550 604100
8
9  205600 604150
10 205600 604100

Best regards,
C.


Gesendet von Mail für Windows 10

Von: Jim Lemon
Gesendet: vendredi, 23 juin 2017 05:28
An: Céline Lüscher
Cc: r-help@r-project.org
Betreff: Re: [R] Help: ifelse selection for x,y coordinates

Hi Celine,
Perhaps if you modify your return value like this:

xy<-as.data.frame(list(x,y))
names(xy)<-c("x","y")
return(xy)

Jim

On Thu, Jun 22, 2017 at 6:48 PM, Céline Lüscher 
> wrote:
Hi everyone,
My database has 3 columns : the x coordinates, the y coordinates and the value 
of G for every individual (20 in total). I would like to have the x,y 
coordinates of individuals, Under these conditions : the distance to the 
reference coordinates must be under or equal to 50 meters + the value of G must 
be bigger or equal to 16.

Here’s what I’ve done first :

kk<- function(x, y)
+ {
+   coordx<-data$x.Koordinate[data$G==24]
+   coordy<-data$y.Koordinate[data$G==24]
+   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate,0)
+   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate,0)
+   return(c(x,y))
+ }
kk(data$x.Koordinate, data$y.Koordinate)
[1]  0  0  0  0  0 205550 205550  0 205600 205600  
0  0  0  0  0  0  0
[18] 604100  0 604150 604100  0

The problem here is that we can not clearly see the difference between the 
coordinates for x and the ones for y.

Then I tried this :
kk<- function(x, y)
+ {
+   coordx<-data$x.Koordinate[data$G==24]
+   coordy<-data$y.Koordinate[data$G==24]
+   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate," ")
+   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate," ")
+   return(list(x,y))
+ }
kk(data$x.Koordinate, data$y.Koordinate)
[[1]]
[1] " "  " "  " "  " "  " "  "205550" "205550" " "  
"205600" "205600" " "

[[2]]
[1] " "  " "  " "  " "  " "  " "  "604100" " "  
"604150" "604100" " "



Where we can see better the two levels related to the x and y coordinates.

My question is simple : Is it possible for this function to return the values 
in a form like x,y or x y ? (without any 0, or « », or space) Or should I use 
another R function to obtain this result ?

Thank you for your help, and sorry for the English mistakes,
C.


Gesendet von Mail für Windows 10


   [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To 
UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To 
UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Help: ifelse selection for x,y coordinates

2017-06-22 Thread Céline Lüscher
Hi Jim,

Thank you very much for the answer ! The result is really better with this 

Here is the code :
> kk<- function(x.Koordinate, y.Koordinate, data=data) 
+ { 
+   coordx<-data$x.Koordinate[data$G==24]
+   coordy<-data$y.Koordinate[data$G==24]
+   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate," ")
+   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate," ")
+   xy<-as.data.frame(list(x,y))
+   names(xy)<-c("x","y")
+   return(xy)
+ }
> kk(x.Koordinate, y.Koordinate, data=data)
x  y
1   
2   
3   
4   
5   
6  205550   
7  205550 604100
8   
9  205600 604150
10 205600 604100

Best regards,
C.


Gesendet von Mail für Windows 10

Von: Jim Lemon
Gesendet: vendredi, 23 juin 2017 05:28
An: Céline Lüscher
Cc: r-help@r-project.org
Betreff: Re: [R] Help: ifelse selection for x,y coordinates

Hi Celine,
Perhaps if you modify your return value like this:

xy<-as.data.frame(list(x,y))
names(xy)<-c("x","y")
return(xy)

Jim

On Thu, Jun 22, 2017 at 6:48 PM, Céline Lüscher  wrote:
> Hi everyone,
> My database has 3 columns : the x coordinates, the y coordinates and the 
> value of G for every individual (20 in total). I would like to have the x,y 
> coordinates of individuals, Under these conditions : the distance to the 
> reference coordinates must be under or equal to 50 meters + the value of G 
> must be bigger or equal to 16.
>
> Here’s what I’ve done first :
>
>> kk<- function(x, y)
> + {
> +   coordx<-data$x.Koordinate[data$G==24]
> +   coordy<-data$y.Koordinate[data$G==24]
> +   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate,0)
> +   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate,0)
> +   return(c(x,y))
> + }
>> kk(data$x.Koordinate, data$y.Koordinate)
>  [1]  0  0  0  0  0 205550 205550  0 205600 205600
>   0  0  0  0  0  0  0
> [18] 604100  0 604150 604100  0
>
> The problem here is that we can not clearly see the difference between the 
> coordinates for x and the ones for y.
>
> Then I tried this :
>> kk<- function(x, y)
> + {
> +   coordx<-data$x.Koordinate[data$G==24]
> +   coordy<-data$y.Koordinate[data$G==24]
> +   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate," ")
> +   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate," ")
> +   return(list(x,y))
> + }
>> kk(data$x.Koordinate, data$y.Koordinate)
> [[1]]
>  [1] " "  " "  " "  " "  " "  "205550" "205550" " "  
> "205600" "205600" " "
>
> [[2]]
>  [1] " "  " "  " "  " "  " "  " "  "604100" " "  
> "604150" "604100" " "
>
>>
>
> Where we can see better the two levels related to the x and y coordinates.
>
> My question is simple : Is it possible for this function to return the values 
> in a form like x,y or x y ? (without any 0, or « », or space) Or should I use 
> another R function to obtain this result ?
>
> Thank you for your help, and sorry for the English mistakes,
> C.
>
>
> Gesendet von Mail für Windows 10
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Question

2017-06-22 Thread Jeff Newmiller
This is not a Spark-help mailing list, either. 
-- 
Sent from my phone. Please excuse my brevity.

On June 22, 2017 4:20:36 PM PDT, Amrith Deepak  wrote:
>This function won’t work with objects in spark as you can’t do a dfda$a
>in spark as it’s not stored as a local variable.
>
>Thanks,
>Amrith
>
>> On Jun 22, 2017, at 4:15 PM, David Winsemius 
>wrote:
>> 
>> 
>>> On Jun 22, 2017, at 11:22 AM, Amrith Deepak 
>wrote:
>>> 
>>> Hi,
>>> 
>>> I am using Spark and the Sparklyr library in R. 
>>> 
>>> I have a file with several lines. For example 
>>> 
>>> A   B   C
>>> awer.ttp.netCode554
>>> abcd.ttp.netCode747
>>> asdf.ttp.netPart554
>>> xyz.ttp.net Part747
>>> I want to split just column A of the table and I want a new row
>added to the table D, with values awe, abcd, asdf, and xyz. I am trying
>to use a command in the sparkly library to do that. If that’s not
>possible, can you please show me another way to do it.
>>> 
>> 
>> Something along lines of:
>> 
>> dfrm$D <-  sapply( strsplit( dfrm$A, "\\.") , "[[", 1)
>> 
>> 
>> 
>>> Thanks,
>>> Amrith
>>> [[alternative HTML version deleted]]
>>> 
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>> 
>> David Winsemius
>> Alameda, CA, USA
>> 
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Help: ifelse selection for x,y coordinates

2017-06-22 Thread Jim Lemon
Hi Celine,
Perhaps if you modify your return value like this:

xy<-as.data.frame(list(x,y))
names(xy)<-c("x","y")
return(xy)

Jim

On Thu, Jun 22, 2017 at 6:48 PM, Céline Lüscher  wrote:
> Hi everyone,
> My database has 3 columns : the x coordinates, the y coordinates and the 
> value of G for every individual (20 in total). I would like to have the x,y 
> coordinates of individuals, Under these conditions : the distance to the 
> reference coordinates must be under or equal to 50 meters + the value of G 
> must be bigger or equal to 16.
>
> Here’s what I’ve done first :
>
>> kk<- function(x, y)
> + {
> +   coordx<-data$x.Koordinate[data$G==24]
> +   coordy<-data$y.Koordinate[data$G==24]
> +   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate,0)
> +   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate,0)
> +   return(c(x,y))
> + }
>> kk(data$x.Koordinate, data$y.Koordinate)
>  [1]  0  0  0  0  0 205550 205550  0 205600 205600
>   0  0  0  0  0  0  0
> [18] 604100  0 604150 604100  0
>
> The problem here is that we can not clearly see the difference between the 
> coordinates for x and the ones for y.
>
> Then I tried this :
>> kk<- function(x, y)
> + {
> +   coordx<-data$x.Koordinate[data$G==24]
> +   coordy<-data$y.Koordinate[data$G==24]
> +   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate," ")
> +   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate," ")
> +   return(list(x,y))
> + }
>> kk(data$x.Koordinate, data$y.Koordinate)
> [[1]]
>  [1] " "  " "  " "  " "  " "  "205550" "205550" " "  
> "205600" "205600" " "
>
> [[2]]
>  [1] " "  " "  " "  " "  " "  " "  "604100" " "  
> "604150" "604100" " "
>
>>
>
> Where we can see better the two levels related to the x and y coordinates.
>
> My question is simple : Is it possible for this function to return the values 
> in a form like x,y or x y ? (without any 0, or « », or space) Or should I use 
> another R function to obtain this result ?
>
> Thank you for your help, and sorry for the English mistakes,
> C.
>
>
> Gesendet von Mail für Windows 10
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] MODISTools help - with reproducible examples

2017-06-22 Thread David Winsemius

> On Jun 22, 2017, at 4:44 PM, Caroline  
> wrote:
> 
> I am using the R-package MODISTools (different than MODIS) and am having a 
> lot of difficulty troubleshooting my code. I have spent awhile going through 
> MODISTools tutorials, searching for my error code, looking at the source 
> code. However, I have not been able to find any relevant information related 
> to my error message. 
> 
> The study I am currently working on involves a herd of 200 African buffalo 
> caught every six months for 4 years. I am trying to use EVI and NDVI to 
> assess seasonal variation thus I would like mean EVI and NDVI for each 
> observation (each time each buffalo was captured). I have capture date, lat 
> and long for each observation. 
> 
> However, when using ‘250m_16_days_pixel_reliability’ as my quality control 
> band I keep getting the warning message:
> 
> Warning in MODISSummaries(LoadDat = period, FileSep = ",", Product = 
> "MOD13Q1",  :
>  Only single data point that passed the quality screen: cannot summarise
> 
> When using ‘250m_16_days_VI_Quality’ as my quality control band I keep 
> getting the warning message: 
> 
> Error in QualityCheck(Data = band.time.series, QualityScores = 
> QA.time.series,  : 
>  QualityScores not all in range of MOD13Q1's QC: 0-3
> 
> I seem to get this message with all subsets of my data (I have tried running 
> all of my data at once and then just one data point at a time). I have also 
> tried using wider date ranges as well as wider size ranges (in case the pixel 
> reliability is poor within a certain area or time frame) but still get the 
> same messages. 
> 
> I have attached the data file I have been using as well as my code (subsetted 
> to just one animal so the run time is faster) 
> 
> Has anyone seen this error message before/have any suggestions for why I may 
> be getting these errors?

I don't and you have not provided the accepted means to investigate which would 
be code and data . Have you contacted the package maintainer?

-- 

David Winsemius
Alameda, CA, USA

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Question

2017-06-22 Thread Amrith Deepak
Sorry, I don’t think you understand my problem. dta = 
spark_read_csv(sc,”data_tbl”,”extension/file",delimiter = "|")

dta is just a pointer to spark where the data is stored. I am using sparklyr to 
run this on spark. I’m not running it locally so I can’t use the $. I know how 
to do this locally in R.

Thanks,
Amrith

> On Jun 22, 2017, at 4:52 PM, Jeff Newmiller  wrote:
> 
> Rows are horizontal, columns are vertical. 
> 
> You really need to spend some time with an R tutorial.
> 
> dta <- read.table( "yourfile", header=TRUE, as.is=TRUE )
> dta2 <- dta
> dta2$D <- c( "awe", "abcd", "asdf", "xyz" )
> dta2 <- dta2[ , c( "A", "D" ) ]
> -- 
> Sent from my phone. Please excuse my brevity.
> 
> On June 22, 2017 11:22:57 AM PDT, Amrith Deepak  wrote:
>> Hi,
>> 
>> I am using Spark and the Sparklyr library in R. 
>> 
>> I have a file with several lines. For example 
>> 
>> A   B   C
>> awer.ttp.netCode554
>> abcd.ttp.netCode747
>> asdf.ttp.netPart554
>> xyz.ttp.net Part747
>> I want to split just column A of the table and I want a new row added
>> to the table D, with values awe, abcd, asdf, and xyz. I am trying to
>> use a command in the sparkly library to do that. If that’s not
>> possible, can you please show me another way to do it.
>> 
>> 
>> Thanks,
>> Amrith
>>  [[alternative HTML version deleted]]
>> 
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] MODISTools help - with reproducible examples

2017-06-22 Thread Caroline
I am using the R-package MODISTools (different than MODIS) and am having a lot 
of difficulty troubleshooting my code. I have spent awhile going through 
MODISTools tutorials, searching for my error code, looking at the source code. 
However, I have not been able to find any relevant information related to my 
error message. 

The study I am currently working on involves a herd of 200 African buffalo 
caught every six months for 4 years. I am trying to use EVI and NDVI to assess 
seasonal variation thus I would like mean EVI and NDVI for each observation 
(each time each buffalo was captured). I have capture date, lat and long for 
each observation. 

However, when using ‘250m_16_days_pixel_reliability’ as my quality control band 
I keep getting the warning message:

Warning in MODISSummaries(LoadDat = period, FileSep = ",", Product = "MOD13Q1", 
 :
  Only single data point that passed the quality screen: cannot summarise

When using ‘250m_16_days_VI_Quality’ as my quality control band I keep getting 
the warning message: 

Error in QualityCheck(Data = band.time.series, QualityScores = QA.time.series,  
: 
  QualityScores not all in range of MOD13Q1's QC: 0-3

I seem to get this message with all subsets of my data (I have tried running 
all of my data at once and then just one data point at a time). I have also 
tried using wider date ranges as well as wider size ranges (in case the pixel 
reliability is poor within a certain area or time frame) but still get the same 
messages. 

I have attached the data file I have been using as well as my code (subsetted 
to just one animal so the run time is faster) 

Has anyone seen this error message before/have any suggestions for why I may be 
getting these errors?


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Question

2017-06-22 Thread Amrith Deepak
This function won’t work with objects in spark as you can’t do a dfda$a in 
spark as it’s not stored as a local variable.

Thanks,
Amrith

> On Jun 22, 2017, at 4:15 PM, David Winsemius  wrote:
> 
> 
>> On Jun 22, 2017, at 11:22 AM, Amrith Deepak  wrote:
>> 
>> Hi,
>> 
>> I am using Spark and the Sparklyr library in R. 
>> 
>> I have a file with several lines. For example 
>> 
>> A   B   C
>> awer.ttp.netCode554
>> abcd.ttp.netCode747
>> asdf.ttp.netPart554
>> xyz.ttp.net Part747
>> I want to split just column A of the table and I want a new row added to the 
>> table D, with values awe, abcd, asdf, and xyz. I am trying to use a command 
>> in the sparkly library to do that. If that’s not possible, can you please 
>> show me another way to do it.
>> 
> 
> Something along lines of:
> 
> dfrm$D <-  sapply( strsplit( dfrm$A, "\\.") , "[[", 1)
> 
> 
> 
>> Thanks,
>> Amrith
>>  [[alternative HTML version deleted]]
>> 
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> David Winsemius
> Alameda, CA, USA
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Don Cohen
Duncan Murdoch writes:
 > On 22/06/2017 5:02 PM, Conklin, Mike (GfK) wrote:
 > > I am using debug on the .install_packages function...stepping through. 
 > > Once the temporary folder is created and the tar file expanded I run 
 > > file_test and get a FALSE back indicating that the configure file is not 
 > > executable.
 > 
 > I don't know what is causing this bug.  Perhaps a Linux user can 
 > reproduce it and fix it.
 > 
 > Here's what I see:
 > 
 > file_test("-x") calls file.access(filename, 1L).  That in turn calls the 
 > C library function access(..., X_OK).  The ... is the name of the file, 
 > translated into the local encoding and expanded.  As far as I can see, 
 > that means ... should be exactly the string below.
 > >
 > > [1] "/tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi"
 > 
 > The only thing I can think of is that your system is protecting you from 
 > executing a newly created file until some sort of virus or other check 
 > is done.  (This is common on Windows, but I've never heard of it before 
 > on Linux.)

Just a thought - are you running SELinux ?
Check the log files for refusals to run programs.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] MODISTools Help

2017-06-22 Thread Caroline
##MODISTools example
library(MODISTools)
library(lubridate)
setwd('~/Documents/Modis data')

#MODISTools with buffalo data

###Read in data rename for easier coding
tbdata <- read.csv('~/Desktop/All TB data for EVI, NDVI.csv')
firstobs <- subset(tbdata, capture.ID == 'B1-1108')
firstobs <- firstobs[,c(1,2,2,3,4)]
colnames(firstobs) <- c('id', 'start.date','end.date','lat','long')

###change date format and change start date to previous 14 days
firstobs$start.date <- dmy(firstobs$start.date)
firstobs$end.date <- dmy(firstobs$end.date)
firstobs$start.date <- firstobs[,2] - as.difftime(14, unit='days') ###time 
frame now spands two weeks

###define parameters 
product <- "MOD13Q1"
bands <- c('250m_16_days_EVI', '250m_16_days_NDVI', '250m_16_days_VI_Quality')
pixel <- c(0,0)

###define data
period <- data.frame(lat=firstobs$lat, long=firstobs$long, start.date 
=firstobs$start.date, end.date = firstobs$end.date, id=firstobs$id)


###MODISSubsets
MODISSubsets(LoadDat = period, Products = product, Bands=bands, Size=pixel, 
SaveDir='.', StartDate=T)


###MODISSummaries
MODISSummaries(LoadDat = period, FileSep=',',Product='MOD13Q1', Bands = 
'250m_16_days_EVI', ValidRange=c(-2000,1), NoDataFill=-3000, ScaleFactor = 
0.0001, StartDate = TRUE, Interpolate = T, QualityScreen = TRUE, 
QualityThreshold = 0, QualityBand = '250m_16_days_VI_Quality')


> On Jun 22, 2017, at 4:50 PM, Bert Gunter  wrote:
> 
> 1. You should always cc the list unless there is a clear reason not to.
> 
> 2. You still have failed to follow the posting guide: You say you have
> difficulty troubleshooting your code, but you have shown us no code.
> You got an error message that seems explicit, but with neither code
> nor data, I do not know whether anyone can make sense of it. In any
> case, I certainly cannot.
> 
> 
> Cheers,
> Bert
> 
> 
> Bert Gunter
> 
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> 
> 
> On Thu, Jun 22, 2017 at 4:41 PM, Caroline
>  wrote:
>> Hi Bert,
>> 
>> I have spent a lot of time searching the web for my error message and have 
>> gone through multiple tutorials. I have not found anything relevant to my 
>> error message which is why I posted on R-help.
>> 
>> Caroline
>> 
>>> On Jun 22, 2017, at 4:38 PM, Bert Gunter  wrote:
>>> 
>>> This is a specialized package that fairly few of us are likely to have
>>> familiarity with, especialy when you have not followed the posting
>>> guide (below) and posted code and a reproducible example.
>>> 
>>> That said, a web search on R MODIS appeared to bring up relevant hits,
>>> including a MODIS tutorial. Have you tried that?
>>> 
>>> Cheers,
>>> Bert
>>> 
>>> 
>>> Bert Gunter
>>> 
>>> "The trouble with having an open mind is that people keep coming along
>>> and sticking things into it."
>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>> 
>>> 
>>> On Thu, Jun 22, 2017 at 2:12 PM, Caroline
>>>  wrote:
 I am using MODIS Tools and am having a lot of difficulty troubleshooting 
 my code.
 
 I am a PhD student studying African buffalo in Kruger National Park, South 
 Africa. The study I am currently working on involves a herd of 200 African 
 buffalo caught every six months for 4 years. I am trying to use EVI and 
 NDVI to assess seasonal variation thus I would like mean EVI and NDVI for 
 each observation (each time each buffalo was captured). I have capture 
 date, lat and long for each observation.
 
 However, when using ‘250m_16_days_pixel_reliability’ as my quality control 
 band I keep getting the warning message:
 
 Warning in MODISSummaries(LoadDat = period, FileSep = ",", Product = 
 "MOD13Q1",  :
 Only single data point that passed the quality screen: cannot summarise
 
 When using ‘250m_16_days_VI_Quality’ as my quality control band I keep 
 getting the warning message:
 
 Error in QualityCheck(Data = band.time.series, QualityScores = 
 QA.time.series,  :
 QualityScores not all in range of MOD13Q1's QC: 0-3
 
 I seem to get this message with all subsets of my data (I have tried 
 running all of my data at once and then just one data point at a time). I 
 have also tried using wider date ranges as well as wider size ranges (in 
 case the pixel reliability is poor within a certain area or time frame) 
 but still get the same messages.
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, 

Re: [R] Question

2017-06-22 Thread Jeff Newmiller
Rows are horizontal, columns are vertical. 

You really need to spend some time with an R tutorial.

dta <- read.table( "yourfile", header=TRUE, as.is=TRUE )
dta2 <- dta
dta2$D <- c( "awe", "abcd", "asdf", "xyz" )
dta2 <- dta2[ , c( "A", "D" ) ]
-- 
Sent from my phone. Please excuse my brevity.

On June 22, 2017 11:22:57 AM PDT, Amrith Deepak  wrote:
>Hi,
>
>I am using Spark and the Sparklyr library in R. 
>
>I have a file with several lines. For example 
>
>A   B   C
>awer.ttp.netCode554
>abcd.ttp.netCode747
>asdf.ttp.netPart554
>xyz.ttp.net Part747
>I want to split just column A of the table and I want a new row added
>to the table D, with values awe, abcd, asdf, and xyz. I am trying to
>use a command in the sparkly library to do that. If that’s not
>possible, can you please show me another way to do it.
>
>
>Thanks,
>Amrith
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] MODISTools Help

2017-06-22 Thread Bert Gunter
1. You should always cc the list unless there is a clear reason not to.

2. You still have failed to follow the posting guide: You say you have
difficulty troubleshooting your code, but you have shown us no code.
You got an error message that seems explicit, but with neither code
nor data, I do not know whether anyone can make sense of it. In any
case, I certainly cannot.


Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Jun 22, 2017 at 4:41 PM, Caroline
 wrote:
> Hi Bert,
>
> I have spent a lot of time searching the web for my error message and have 
> gone through multiple tutorials. I have not found anything relevant to my 
> error message which is why I posted on R-help.
>
> Caroline
>
>> On Jun 22, 2017, at 4:38 PM, Bert Gunter  wrote:
>>
>> This is a specialized package that fairly few of us are likely to have
>> familiarity with, especialy when you have not followed the posting
>> guide (below) and posted code and a reproducible example.
>>
>> That said, a web search on R MODIS appeared to bring up relevant hits,
>> including a MODIS tutorial. Have you tried that?
>>
>> Cheers,
>> Bert
>>
>>
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>>
>> On Thu, Jun 22, 2017 at 2:12 PM, Caroline
>>  wrote:
>>> I am using MODIS Tools and am having a lot of difficulty troubleshooting my 
>>> code.
>>>
>>> I am a PhD student studying African buffalo in Kruger National Park, South 
>>> Africa. The study I am currently working on involves a herd of 200 African 
>>> buffalo caught every six months for 4 years. I am trying to use EVI and 
>>> NDVI to assess seasonal variation thus I would like mean EVI and NDVI for 
>>> each observation (each time each buffalo was captured). I have capture 
>>> date, lat and long for each observation.
>>>
>>> However, when using ‘250m_16_days_pixel_reliability’ as my quality control 
>>> band I keep getting the warning message:
>>>
>>> Warning in MODISSummaries(LoadDat = period, FileSep = ",", Product = 
>>> "MOD13Q1",  :
>>>  Only single data point that passed the quality screen: cannot summarise
>>>
>>> When using ‘250m_16_days_VI_Quality’ as my quality control band I keep 
>>> getting the warning message:
>>>
>>> Error in QualityCheck(Data = band.time.series, QualityScores = 
>>> QA.time.series,  :
>>>  QualityScores not all in range of MOD13Q1's QC: 0-3
>>>
>>> I seem to get this message with all subsets of my data (I have tried 
>>> running all of my data at once and then just one data point at a time). I 
>>> have also tried using wider date ranges as well as wider size ranges (in 
>>> case the pixel reliability is poor within a certain area or time frame) but 
>>> still get the same messages.
>>>[[alternative HTML version deleted]]
>>>
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Back to back barplot

2017-06-22 Thread Bert Gunter
Do a web search on "pyramid plot R" . That appeared to bring up
relevant resources.

-- Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Wed, Jun 21, 2017 at 9:15 PM, Franklin Mairura via R-help
 wrote:
> Dear Gentlemen, i want to create a back-to back barplot in R, close to a 
> pyramid chart, but with categories, please help;
> Here is a sample,
> Franklin.
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] MODISTools Help

2017-06-22 Thread Bert Gunter
This is a specialized package that fairly few of us are likely to have
familiarity with, especialy when you have not followed the posting
guide (below) and posted code and a reproducible example.

That said, a web search on R MODIS appeared to bring up relevant hits,
including a MODIS tutorial. Have you tried that?

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Jun 22, 2017 at 2:12 PM, Caroline
 wrote:
> I am using MODIS Tools and am having a lot of difficulty troubleshooting my 
> code.
>
> I am a PhD student studying African buffalo in Kruger National Park, South 
> Africa. The study I am currently working on involves a herd of 200 African 
> buffalo caught every six months for 4 years. I am trying to use EVI and NDVI 
> to assess seasonal variation thus I would like mean EVI and NDVI for each 
> observation (each time each buffalo was captured). I have capture date, lat 
> and long for each observation.
>
> However, when using ‘250m_16_days_pixel_reliability’ as my quality control 
> band I keep getting the warning message:
>
> Warning in MODISSummaries(LoadDat = period, FileSep = ",", Product = 
> "MOD13Q1",  :
>   Only single data point that passed the quality screen: cannot summarise
>
> When using ‘250m_16_days_VI_Quality’ as my quality control band I keep 
> getting the warning message:
>
> Error in QualityCheck(Data = band.time.series, QualityScores = 
> QA.time.series,  :
>   QualityScores not all in range of MOD13Q1's QC: 0-3
>
> I seem to get this message with all subsets of my data (I have tried running 
> all of my data at once and then just one data point at a time). I have also 
> tried using wider date ranges as well as wider size ranges (in case the pixel 
> reliability is poor within a certain area or time frame) but still get the 
> same messages.
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Accessing Pointers

2017-06-22 Thread Roy Mendelssohn - NOAA Federal
Hi Lawrence:
> On Jun 22, 2017, at 4:26 PM, David Winsemius  wrote:
> 
> 
> 
>> is pointing to in the following line of code.  Need some help.
>> 
>> #install.packages('xml2')
>> library('xml2')
>> pg1 <- read_html("www.msn.com")
> 
> Error: 'www.msn.com' does not exist in current working directory 
> ('/Users/davidwinsemius').
> 
> 

I suggest you do:

?read_html

and peruse it carefully.  You are not passing it a URL.

> library('xml2')
> pg1 <- read_html("http://www.msn.com;)
> str(pg1)
List of 2
 $ node: 
 $ doc : 
 - attr(*, "class")= chr [1:2] "xml_document" "xml_node"


**
"The contents of this message do not reflect any position of the U.S. 
Government or NOAA."
**
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Accessing Pointers

2017-06-22 Thread David Winsemius

> On Jun 22, 2017, at 12:52 PM, Lawrence Fomundam  wrote:
> 
> Hello,
> 
> I am relatively new to R and would like to access the document my pointer

"my pointer"?


> is pointing to in the following line of code.  Need some help.
> 
> #install.packages('xml2')
> library('xml2')
> pg1 <- read_html("www.msn.com")

Error: 'www.msn.com' does not exist in current working directory 
('/Users/davidwinsemius').


> str(pg1)
> ptr <- pg1[[2]]
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Question

2017-06-22 Thread David Winsemius

> On Jun 22, 2017, at 11:22 AM, Amrith Deepak  wrote:
> 
> Hi,
> 
> I am using Spark and the Sparklyr library in R. 
> 
> I have a file with several lines. For example 
> 
> A   B   C
> awer.ttp.netCode554
> abcd.ttp.netCode747
> asdf.ttp.netPart554
> xyz.ttp.net Part747
> I want to split just column A of the table and I want a new row added to the 
> table D, with values awe, abcd, asdf, and xyz. I am trying to use a command 
> in the sparkly library to do that. If that’s not possible, can you please 
> show me another way to do it.
> 

Something along lines of:

dfrm$D <-  sapply( strsplit( dfrm$A, "\\.") , "[[", 1)



> Thanks,
> Amrith
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] HPC R configure not recognizing zlib

2017-06-22 Thread Hamidi, Bashir
System: Red Hat Enterprise Linux Server release 6.5 (Santiago)

I’ve installed zlib 1.2.11 on the home folder of a Red Hat HPC as part of the 
process for installing R base 3.4.0.

I get this error even after successful install of zlib
checking for inflateInit2_ in -lz... no
checking whether zlib support suffices... configure: error: zlib library and 
headers are required

 I’ve checked R documentation and configure file for the issue of R requiring 
version newer than 1.2.6 but not lexicographically recognizing 1.2.11 as 
>1.2.6, and that particular bug was patched in 3.4.

Any suggestion and/or input would be much appreciated.

Regards,


Bashir




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] MODISTools Help

2017-06-22 Thread Caroline
I am using MODIS Tools and am having a lot of difficulty troubleshooting my 
code. 

I am a PhD student studying African buffalo in Kruger National Park, South 
Africa. The study I am currently working on involves a herd of 200 African 
buffalo caught every six months for 4 years. I am trying to use EVI and NDVI to 
assess seasonal variation thus I would like mean EVI and NDVI for each 
observation (each time each buffalo was captured). I have capture date, lat and 
long for each observation. 

However, when using ‘250m_16_days_pixel_reliability’ as my quality control band 
I keep getting the warning message:

Warning in MODISSummaries(LoadDat = period, FileSep = ",", Product = "MOD13Q1", 
 :
  Only single data point that passed the quality screen: cannot summarise

When using ‘250m_16_days_VI_Quality’ as my quality control band I keep getting 
the warning message: 

Error in QualityCheck(Data = band.time.series, QualityScores = QA.time.series,  
: 
  QualityScores not all in range of MOD13Q1's QC: 0-3

I seem to get this message with all subsets of my data (I have tried running 
all of my data at once and then just one data point at a time). I have also 
tried using wider date ranges as well as wider size ranges (in case the pixel 
reliability is poor within a certain area or time frame) but still get the same 
messages. 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] Question

2017-06-22 Thread Amrith Deepak
Hi,

I am using Spark and the Sparklyr library in R. 

I have a file with several lines. For example 

A   B   C
awer.ttp.netCode554
abcd.ttp.netCode747
asdf.ttp.netPart554
xyz.ttp.net Part747
I want to split just column A of the table and I want a new row added to the 
table D, with values awe, abcd, asdf, and xyz. I am trying to use a command in 
the sparkly library to do that. If that’s not possible, can you please show me 
another way to do it.


Thanks,
Amrith
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] Accessing Pointers

2017-06-22 Thread Lawrence Fomundam
Hello,

I am relatively new to R and would like to access the document my pointer
is pointing to in the following line of code.  Need some help.

#install.packages('xml2')
library('xml2')
pg1 <- read_html("www.msn.com")
str(pg1)
ptr <- pg1[[2]]

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Differences between SPSS and R on probit analysis

2017-06-22 Thread Edwin Burgess
Hi Bianca,


I hope you’ve solved your problem with SPSS and R probit analysis, but if you 
haven’t, I have your solution:

Based on the output you’ve given, I see that your residual deviance is 
under-dispersed (that the ratio of residual deviance to residual deviance df 
does is less than 1). However, you’ve told R to treat your dispersion parameter 
as 1 (you did this by using the ‘family = binomial’ argument). Instead, if you 
use ‘family=quasibinomial’ you allow the dispersion parameter to be estimated. 
This changes how the variance, SE, etc are calculated. Modeling it this way is 
akin to the SPSS method, and thus produces nearly-identical results. You may 
still see very, very minor differences in chi square goodness of fit, and 95% 
CI of the doses/concentrations, etc. but this is due to differences in rounding 
under the hood of the software.


Hope this helps!

 
Edwin R. Burgess IV, Ph.D.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] Help: ifelse selection for x,y coordinates

2017-06-22 Thread Céline Lüscher
Hi everyone,
My database has 3 columns : the x coordinates, the y coordinates and the value 
of G for every individual (20 in total). I would like to have the x,y 
coordinates of individuals, Under these conditions : the distance to the 
reference coordinates must be under or equal to 50 meters + the value of G must 
be bigger or equal to 16.

Here’s what I’ve done first :

> kk<- function(x, y) 
+ { 
+   coordx<-data$x.Koordinate[data$G==24]
+   coordy<-data$y.Koordinate[data$G==24]
+   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate,0)
+   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate,0)
+   return(c(x,y))
+ }
> kk(data$x.Koordinate, data$y.Koordinate)
 [1]  0  0  0  0  0 205550 205550  0 205600 205600  
0  0  0  0  0  0  0
[18] 604100  0 604150 604100  0

The problem here is that we can not clearly see the difference between the 
coordinates for x and the ones for y.

Then I tried this :
> kk<- function(x, y) 
+ { 
+   coordx<-data$x.Koordinate[data$G==24]
+   coordy<-data$y.Koordinate[data$G==24]
+   x <- ifelse(data$x.Koordinate>coordx-51 & data$G>15,data$x.Koordinate," ")
+   y<-ifelse(data$y.Koordinate>coordy-51 & data$G>15,data$y.Koordinate," ")
+   return(list(x,y))
+ }
> kk(data$x.Koordinate, data$y.Koordinate)
[[1]]
 [1] " "  " "  " "  " "  " "  "205550" "205550" " "  
"205600" "205600" " " 
 
[[2]]
 [1] " "  " "  " "  " "  " "  " "  "604100" " "  
"604150" "604100" " " 
 
>

Where we can see better the two levels related to the x and y coordinates. 

My question is simple : Is it possible for this function to return the values 
in a form like x,y or x y ? (without any 0, or « », or space) Or should I use 
another R function to obtain this result ?

Thank you for your help, and sorry for the English mistakes,
C.


Gesendet von Mail für Windows 10


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] Getting error in dendogram based on gene expression

2017-06-22 Thread Yogesh Gupta
Dear All,

I am trying to make dendogram based on gene expression matrix , but getting
some error:

I
countMatrix = read.table("count.row.txt",header=T,sep='\t',check.names=F)

colnames(countMatrix)

count_matrix <- countMatrix[,-1]   #  remove first column
(gene names)
rownames(count_matrix) <- countMatrix[,1] #added first column gene
names as rownames)

> nonzero_row <- count_matrix[rowSums(count_matrix) > 0, # removed row sum
0 across all sample

> x1= as.matrix(nonzero_row)# converted data into matrix

> x=log2(x1+1)  # converted into
log value
> d <- dist(x, method="euclidean")

> h <- hclust(d, method="complete")


*Error:*

 *** caught segfault ***
address 0x7fa39060af28, cause 'memory not mapped'

Traceback:
 1: hclust(d, method = "complete")

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:

Thanks
Yogesh
-- 
*Yogesh Gupta*
*Postdoctoral Researcher*
*Department of Biological Science*
*Seoul National University*
*Seoul, South Korea*

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Back to back barplot

2017-06-22 Thread Franklin Mairura via R-help
Dear Gentlemen, i want to create a back-to back barplot in R, close to a 
pyramid chart, but with categories, please help;
Here is a sample, 
Franklin.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Duncan Murdoch

On 22/06/2017 5:02 PM, Conklin, Mike (GfK) wrote:

I am using debug on the .install_packages function...stepping through. Once the 
temporary folder is created and the tar file expanded I run file_test and get a 
FALSE back indicating that the configure file is not executable.


I don't know what is causing this bug.  Perhaps a Linux user can 
reproduce it and fix it.


Here's what I see:

file_test("-x") calls file.access(filename, 1L).  That in turn calls the 
C library function access(..., X_OK).  The ... is the name of the file, 
translated into the local encoding and expanded.  As far as I can see, 
that means ... should be exactly the string below.


[1] "/tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi"


The only thing I can think of is that your system is protecting you from 
executing a newly created file until some sort of virus or other check 
is done.  (This is common on Windows, but I've never heard of it before 
on Linux.)


Hopefully someone else can help...

Duncan Murdoch


Browse[2]> dir(new)
 [1] "DESCRIPTION"   "INSTALL"   "LICENSE"   "MD5"
 [5] "NAMESPACE" "NEWS"  "R" "cleanup"
 [9] "configure" "configure.win" "inst"  "man"
[13] "src"
Browse[2]> test_file("-x",paste0(new,"/configure")
+ )
Error in test_file("-x", paste0(new, "/configure")) :
  could not find function "test_file"
Browse[2]> file_test("-x",paste0(new,"/configure"))
/tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi/configure
  FALSE


However, at the same time, in a separate session I have the system look at the 
very same file and clearly the execution bit is set.


[root@dcex1102shinypr ~]# ls -l /tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi
total 312
-rwxr-xr-x 1 root root 66 Apr  2  2015 cleanup
-rwxr-xr-x 1 root root 173757 Apr  7 11:43 configure
-rw-r--r-- 1 root root669 Jun 23  2015 configure.win
-rw-r--r-- 1 root root   1451 Apr  7 15:08 DESCRIPTION
drwxr-xr-x 2 root root 35 Jun 22 22:26 inst
-rw-r--r-- 1 root root   6207 Apr  7 11:21 INSTALL
-rw-r--r-- 1 root root   3580 Mar 21 13:29 LICENSE
drwxr-xr-x 2 root root   4096 Jun 22 22:26 man
-rw-r--r-- 1 root root  63692 Apr  7 15:08 MD5
-rw-r--r-- 1 root root   6204 Oct 24  2016 NAMESPACE
-rw-r--r-- 1 root root  22407 Apr  7 11:44 NEWS
drwxr-xr-x 2 root root   4096 Jun 22 22:26 R
drwxr-xr-x 3 root root   8192 Jun 22 22:26 src
[root@dcex1102shinypr ~]#


If I CTRL-Z out of R in the first session I confirm the same result - the 
system shows the file as executable

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK
T +1 763 417 4545 | M +1 612 567 8287


-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Thursday, June 22, 2017 3:06 PM
To: Conklin, Mike (GfK); Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

On 22/06/2017 3:42 PM, Conklin, Mike (GfK) wrote:

Not much progress. I step through debug and it gets to the do.install() function 
which immediately errors with the same "configuration not executable" error.


I believe that is a locally defined function, which means you can set a 
breakpoint within it but only if R is compiled with source info, or you can 
manually call debug(do_install) after it has been created (typically just 
before it is called is a safe place to do this), and do the usual process.

It's still very mysterious to me why configure is losing its executable bit.  What I would do if I 
could reproduce this would be to run right up to the 
file_test("-x","configure") line, then print my working directory, and ctrl-Z 
out of R to look at the files there.  That should confirm that configure is not executable.

Then the hard part is figuring out why it isn't

Duncan



So, made a tempfunc that was a copy of tools:::.install_packages and
edited the file_test("-x","configure") line to return a TRUE

now I get a Permission Denied error (even if I run as root)


tempfunc("/home/meconk/stringi_1.1.5.tar.gz")

* installing to library '/usr/lib64/R/library'
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
sh: ./configure: Permission denied
ERROR: configuration failed for package 'stringi'
* removing '/usr/lib64/R/library/stringi'
Error in do_exit(status = status) : .install_packages() exit status 1
Error in do_exit(status = status) : .install_packages() exit status 1

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK
T +1 763 417 4545 | M +1 612 567 8287


-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Thursday, June 22, 2017 11:09 AM
To: Conklin, Mike (GfK); Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

On 22/06/2017 11:15 AM, Conklin, Mike (GfK) wrote:

Following Duncan's instructions I find that the system and R find that 
configure IS executable but if trying to install 

Re: [R-es] Ayuda R no puede hubicar un vector de 42gb

2017-06-22 Thread Ursula Jacobo Arteaga via R-help-es
Te agradezco Carlos...
saludos


 
 
  El jue., 22 de jun de 2017 a la(s) 5:02 p.m., Carlos 
Ortega escribió:   En IBM tenéis esto...:
https://datascience.ibm.com/

Al que también recientemente habéis incorporado H2O:
https://www.hpcwire.com/off-the-wire/h2o-ai-partners-ibm-bring-enterprise-ai-ibm-power-systems/

Saludos,Carlos Ortegawww.qualityexcellence.es
El 22 de junio de 2017, 23:11, Carlos Ortega  
escribió:

http://go.cloudera.com/ml-h20- es-webinar?src=email1& elqTrackId= 
af5517eab2f543afbb31a0686d9ca5 66= c68d9a8c25ba4b12944b8065d8a06e 
33=4541=1& elqCampaignId=

El 22 de junio de 2017, 22:59, Carlos Ortega  
escribió:

Hola,
Tendrás RStudioServer en un nodo frontera de tu clúster. Y cuando lees algo te 
lo estás llevando a este nodo frontera que tiene que tener memoria suficiente 
para poder leer el fichero que quieres. El que digas que tienes 256Gb, entiendo 
que es repartidos en todo el clúster y no en ese nodo frontera.
La forma de trabajar no es esta. La idea es que proceses tus datos de forma 
distribuida, desde el nodo frontera diriges/distribuyes el trabajo a todos los 
nodos. Una forma que el propio Cloudera recomienda para este tipo de 
procesamiento analítico es usar H2O. Con H2O al leer el fichero haces una 
lectura distribuida, al igual que si realizas cualquier tipo de análisis 
(modelización) lo haces de forma distribuida (en todos tus nodos).
Otra alternativa que también recomienda Cloudera es utilizar RStudio con 
"sparklyr" y realizar el procesamiento en Spark. Mira el detalles en la página 
que tiene RStudio de este paquete (que están desarrollando ellos mismos).
Si tus datos no son "enormes" puedes perfectamente probar a trabajar sobre una 
máquina con mucha RAM y te ahorras todas estas complicaciones.
Saludos,Carlos Ortegawww.qualityexcellence.es
El 22 de junio de 2017, 21:33, Ursula Jacobo Arteaga via R-help-es 
 escribió:

hola, estoy trabajando en cloudera con RStudio server y constantemente "muere"  
R por el tamaño de los archivos que lee. Supuestamente tengo 256gb de memoria 
pero con archivos de 42gb muere con sólo leerlos,Amguien tiene una idea de cómo 
trabajar con este volumen de info?saludos y gracias



        [[alternative HTML version deleted]]

__ _
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/l istinfo/r-help-es




-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es



-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es



-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es  

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Ayuda R no puede hubicar un vector de 42gb

2017-06-22 Thread javier.ruben.marcuzzi
Estimada Ursula Jacobo Arteaga

Hay una posibilidad con Windows azure, yo había realizado un curso al respecto, 
aunque habría que ver la denominación de ese servicio desde que lo integraron a 
sql server. Pero a esa cantidad de datos casi seguro que hay costos.

Javier Rubén Marcuzzi

De: Ursula Jacobo Arteaga via R-help-es
Enviado: jueves, 22 de junio de 2017 16:33
Para: r-help-es@r-project.org
Asunto: [R-es] Ayuda R no puede hubicar un vector de 42gb

hola, estoy trabajando en cloudera con RStudio server y constantemente "muere"  
R por el tamaño de los archivos que lee. Supuestamente tengo 256gb de memoria 
pero con archivos de 42gb muere con sólo leerlos,Amguien tiene una idea de cómo 
trabajar con este volumen de info?saludos y gracias



[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Ayuda R no puede hubicar un vector de 42gb

2017-06-22 Thread Carlos Ortega
En IBM tenéis esto...:

https://datascience.ibm.com/

Al que también recientemente habéis incorporado H2O:

https://www.hpcwire.com/off-the-wire/h2o-ai-partners-ibm-bring-enterprise-ai-ibm-power-systems/

Saludos,
Carlos Ortega
www.qualityexcellence.es

El 22 de junio de 2017, 23:11, Carlos Ortega 
escribió:

> http://go.cloudera.com/ml-h20-es-webinar?src=email1=
> af5517eab2f543afbb31a0686d9ca566=c68d9a8c25ba4b12944b8065d8a06e
> 33=4541=1=
>
> El 22 de junio de 2017, 22:59, Carlos Ortega 
> escribió:
>
>> Hola,
>>
>> Tendrás RStudioServer en un nodo frontera de tu clúster. Y cuando lees
>> algo te lo estás llevando a este nodo frontera que tiene que tener memoria
>> suficiente para poder leer el fichero que quieres. El que digas que tienes
>> 256Gb, entiendo que es repartidos en todo el clúster y no en ese nodo
>> frontera.
>>
>> La forma de trabajar no es esta. La idea es que proceses tus datos de
>> forma distribuida, desde el nodo frontera diriges/distribuyes el trabajo a
>> todos los nodos. Una forma que el propio Cloudera recomienda para este tipo
>> de procesamiento analítico es usar H2O. Con H2O al leer el fichero haces
>> una lectura distribuida, al igual que si realizas cualquier tipo de
>> análisis (modelización) lo haces de forma distribuida (en todos tus nodos).
>>
>> Otra alternativa que también recomienda Cloudera es utilizar RStudio con
>> "sparklyr" y realizar el procesamiento en Spark. Mira el detalles en la
>> página que tiene RStudio de este paquete (que están desarrollando ellos
>> mismos).
>>
>> Si tus datos no son "enormes" puedes perfectamente probar a trabajar
>> sobre una máquina con mucha RAM y te ahorras todas estas complicaciones.
>>
>> Saludos,
>> Carlos Ortega
>> www.qualityexcellence.es
>>
>> El 22 de junio de 2017, 21:33, Ursula Jacobo Arteaga via R-help-es <
>> r-help-es@r-project.org> escribió:
>>
>>> hola, estoy trabajando en cloudera con RStudio server y constantemente
>>> "muere"  R por el tamaño de los archivos que lee. Supuestamente tengo 256gb
>>> de memoria pero con archivos de 42gb muere con sólo leerlos,Amguien tiene
>>> una idea de cómo trabajar con este volumen de info?saludos y gracias
>>>
>>>
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ___
>>> R-help-es mailing list
>>> R-help-es@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-help-es
>>>
>>
>>
>>
>> --
>> Saludos,
>> Carlos Ortega
>> www.qualityexcellence.es
>>
>
>
>
> --
> Saludos,
> Carlos Ortega
> www.qualityexcellence.es
>



-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Ayuda R no puede hubicar un vector de 42gb

2017-06-22 Thread Carlos Ortega
http://go.cloudera.com/ml-h20-es-webinar?src=email1=af5517eab2f543afbb31a0686d9ca566=c68d9a8c25ba4b12944b8065d8a06e33=4541=1=

El 22 de junio de 2017, 22:59, Carlos Ortega 
escribió:

> Hola,
>
> Tendrás RStudioServer en un nodo frontera de tu clúster. Y cuando lees
> algo te lo estás llevando a este nodo frontera que tiene que tener memoria
> suficiente para poder leer el fichero que quieres. El que digas que tienes
> 256Gb, entiendo que es repartidos en todo el clúster y no en ese nodo
> frontera.
>
> La forma de trabajar no es esta. La idea es que proceses tus datos de
> forma distribuida, desde el nodo frontera diriges/distribuyes el trabajo a
> todos los nodos. Una forma que el propio Cloudera recomienda para este tipo
> de procesamiento analítico es usar H2O. Con H2O al leer el fichero haces
> una lectura distribuida, al igual que si realizas cualquier tipo de
> análisis (modelización) lo haces de forma distribuida (en todos tus nodos).
>
> Otra alternativa que también recomienda Cloudera es utilizar RStudio con
> "sparklyr" y realizar el procesamiento en Spark. Mira el detalles en la
> página que tiene RStudio de este paquete (que están desarrollando ellos
> mismos).
>
> Si tus datos no son "enormes" puedes perfectamente probar a trabajar sobre
> una máquina con mucha RAM y te ahorras todas estas complicaciones.
>
> Saludos,
> Carlos Ortega
> www.qualityexcellence.es
>
> El 22 de junio de 2017, 21:33, Ursula Jacobo Arteaga via R-help-es <
> r-help-es@r-project.org> escribió:
>
>> hola, estoy trabajando en cloudera con RStudio server y constantemente
>> "muere"  R por el tamaño de los archivos que lee. Supuestamente tengo 256gb
>> de memoria pero con archivos de 42gb muere con sólo leerlos,Amguien tiene
>> una idea de cómo trabajar con este volumen de info?saludos y gracias
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> R-help-es mailing list
>> R-help-es@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-help-es
>>
>
>
>
> --
> Saludos,
> Carlos Ortega
> www.qualityexcellence.es
>



-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Conklin, Mike (GfK)
I am using debug on the .install_packages function...stepping through. Once the 
temporary folder is created and the tar file expanded I run file_test and get a 
FALSE back indicating that the configure file is not executable.

[1] "/tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi"
Browse[2]> dir(new)
 [1] "DESCRIPTION"   "INSTALL"   "LICENSE"   "MD5"
 [5] "NAMESPACE" "NEWS"  "R" "cleanup"
 [9] "configure" "configure.win" "inst"  "man"
[13] "src"
Browse[2]> test_file("-x",paste0(new,"/configure")
+ )
Error in test_file("-x", paste0(new, "/configure")) :
  could not find function "test_file"
Browse[2]> file_test("-x",paste0(new,"/configure"))
/tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi/configure
  FALSE


However, at the same time, in a separate session I have the system look at the 
very same file and clearly the execution bit is set.


[root@dcex1102shinypr ~]# ls -l /tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi
total 312
-rwxr-xr-x 1 root root 66 Apr  2  2015 cleanup
-rwxr-xr-x 1 root root 173757 Apr  7 11:43 configure
-rw-r--r-- 1 root root669 Jun 23  2015 configure.win
-rw-r--r-- 1 root root   1451 Apr  7 15:08 DESCRIPTION
drwxr-xr-x 2 root root 35 Jun 22 22:26 inst
-rw-r--r-- 1 root root   6207 Apr  7 11:21 INSTALL
-rw-r--r-- 1 root root   3580 Mar 21 13:29 LICENSE
drwxr-xr-x 2 root root   4096 Jun 22 22:26 man
-rw-r--r-- 1 root root  63692 Apr  7 15:08 MD5
-rw-r--r-- 1 root root   6204 Oct 24  2016 NAMESPACE
-rw-r--r-- 1 root root  22407 Apr  7 11:44 NEWS
drwxr-xr-x 2 root root   4096 Jun 22 22:26 R
drwxr-xr-x 3 root root   8192 Jun 22 22:26 src
[root@dcex1102shinypr ~]#


If I CTRL-Z out of R in the first session I confirm the same result - the 
system shows the file as executable

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK 
T +1 763 417 4545 | M +1 612 567 8287 


-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] 
Sent: Thursday, June 22, 2017 3:06 PM
To: Conklin, Mike (GfK); Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

On 22/06/2017 3:42 PM, Conklin, Mike (GfK) wrote:
> Not much progress. I step through debug and it gets to the do.install() 
> function which immediately errors with the same "configuration not 
> executable" error.

I believe that is a locally defined function, which means you can set a 
breakpoint within it but only if R is compiled with source info, or you can 
manually call debug(do_install) after it has been created (typically just 
before it is called is a safe place to do this), and do the usual process.

It's still very mysterious to me why configure is losing its executable bit.  
What I would do if I could reproduce this would be to run right up to the 
file_test("-x","configure") line, then print my working directory, and ctrl-Z 
out of R to look at the files there.  That should confirm that configure is not 
executable.

Then the hard part is figuring out why it isn't

Duncan

>
> So, made a tempfunc that was a copy of tools:::.install_packages and 
> edited the file_test("-x","configure") line to return a TRUE
>
> now I get a Permission Denied error (even if I run as root)
>
>> tempfunc("/home/meconk/stringi_1.1.5.tar.gz")
> * installing to library '/usr/lib64/R/library'
> * installing *source* package 'stringi' ...
> ** package 'stringi' successfully unpacked and MD5 sums checked
> sh: ./configure: Permission denied
> ERROR: configuration failed for package 'stringi'
> * removing '/usr/lib64/R/library/stringi'
> Error in do_exit(status = status) : .install_packages() exit status 1 
> Error in do_exit(status = status) : .install_packages() exit status 1
>
> --
> W. Michael Conklin
> EVP Marketing & Data Sciences
> GfK
> T +1 763 417 4545 | M +1 612 567 8287
>
>
> -Original Message-
> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
> Sent: Thursday, June 22, 2017 11:09 AM
> To: Conklin, Mike (GfK); Martin Maechler; David Winsemius
> Cc: r-help@r-project.org
> Subject: Re: [R] Missing dependencies in pkg installs
>
> On 22/06/2017 11:15 AM, Conklin, Mike (GfK) wrote:
>> Following Duncan's instructions I find that the system and R find that 
>> configure IS executable but if trying to install via install.packages I get 
>> the same error.
>> I also tried using R CMD INSTALL from the terminal and install.packages with 
>> a local file pointing to the very same tar.gz file that shows the executable 
>> bit set. All result in the same "configure is not executable" result.
>>
>
> That's very mysterious.  This is hard to debug, because R runs a separate 
> process to do the installs.  If you want to track this down you can debug the 
> code as follows.
>
> 1.  Manually download the tarball, using any method (perhaps 
> download.packages("stringi", destdir = ".", type = "source").
>
> 2.  In R, run
>
> debug(tools:::.install_packages)
> 

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Duncan Murdoch

On 22/06/2017 3:42 PM, Conklin, Mike (GfK) wrote:

Not much progress. I step through debug and it gets to the do.install() function 
which immediately errors with the same "configuration not executable" error.


I believe that is a locally defined function, which means you can set a 
breakpoint within it but only if R is compiled with source info, or you 
can manually call debug(do_install) after it has been created (typically 
just before it is called is a safe place to do this), and do the usual 
process.


It's still very mysterious to me why configure is losing its executable 
bit.  What I would do if I could reproduce this would be to run right up 
to the file_test("-x","configure") line, then print my working 
directory, and ctrl-Z out of R to look at the files there.  That should 
confirm that configure is not executable.


Then the hard part is figuring out why it isn't

Duncan



So, made a tempfunc that was a copy of tools:::.install_packages and edited the 
file_test("-x","configure") line to return a TRUE

now I get a Permission Denied error (even if I run as root)


tempfunc("/home/meconk/stringi_1.1.5.tar.gz")

* installing to library '/usr/lib64/R/library'
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
sh: ./configure: Permission denied
ERROR: configuration failed for package 'stringi'
* removing '/usr/lib64/R/library/stringi'
Error in do_exit(status = status) : .install_packages() exit status 1
Error in do_exit(status = status) : .install_packages() exit status 1

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK
T +1 763 417 4545 | M +1 612 567 8287


-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Thursday, June 22, 2017 11:09 AM
To: Conklin, Mike (GfK); Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

On 22/06/2017 11:15 AM, Conklin, Mike (GfK) wrote:

Following Duncan's instructions I find that the system and R find that 
configure IS executable but if trying to install via install.packages I get the 
same error.
I also tried using R CMD INSTALL from the terminal and install.packages with a local file 
pointing to the very same tar.gz file that shows the executable bit set. All result in 
the same "configure is not executable" result.



That's very mysterious.  This is hard to debug, because R runs a separate 
process to do the installs.  If you want to track this down you can debug the 
code as follows.

1.  Manually download the tarball, using any method (perhaps download.packages("stringi", destdir = 
".", type = "source").

2.  In R, run

debug(tools:::.install_packages)
tools:::.install_packages("stringi_1.1.5.tar.gz")

You can single step until you see the message, and try to diagnose why it is 
happening.

Watch out, this function will exit R at the end.

Duncan Murdoch


[meconk@dcex1102shinypr ~]$ ls -l stringi/configure -rwxr-xr-x 1
meconk meconk 173757 Apr  7 11:43 stringi/configure
[meconk@dcex1102shinypr ~]$ sudo R [sudo] password for meconk:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (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]


getwd()

[1] "/home/meconk"

file_test("-x","stringi/configure")

stringi/configure
 TRUE

install.packages("stringi")   
Installing package into '/usr/lib64/R/library'

(as 'lib' is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz'
Content type 'application/x-gzip' length 3645872 bytes (3.5 MB)
==
downloaded 3.5 MB

* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: 'configure' exists but is not executable -- see the 'R Installation and 
Administration Manual'
* removing '/usr/lib64/R/library/stringi'

The downloaded source packages are in
'/tmp/Rtmpxw9twb/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("stringi") :
  installation of package 'stringi' had non-zero exit status

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK
T +1 763 417 4545 | M +1 612 567 8287

-Original Message-
From: R-help 

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Conklin, Mike (GfK)
Not much progress. I step through debug and it gets to the do.install() 
function which immediately errors with the same "configuration not executable" 
error.

So, made a tempfunc that was a copy of tools:::.install_packages and edited the 
file_test("-x","configure") line to return a TRUE

now I get a Permission Denied error (even if I run as root)

> tempfunc("/home/meconk/stringi_1.1.5.tar.gz")
* installing to library '/usr/lib64/R/library'
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
sh: ./configure: Permission denied
ERROR: configuration failed for package 'stringi'
* removing '/usr/lib64/R/library/stringi'
Error in do_exit(status = status) : .install_packages() exit status 1
Error in do_exit(status = status) : .install_packages() exit status 1

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK 
T +1 763 417 4545 | M +1 612 567 8287 


-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] 
Sent: Thursday, June 22, 2017 11:09 AM
To: Conklin, Mike (GfK); Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

On 22/06/2017 11:15 AM, Conklin, Mike (GfK) wrote:
> Following Duncan's instructions I find that the system and R find that 
> configure IS executable but if trying to install via install.packages I get 
> the same error.
> I also tried using R CMD INSTALL from the terminal and install.packages with 
> a local file pointing to the very same tar.gz file that shows the executable 
> bit set. All result in the same "configure is not executable" result.
>

That's very mysterious.  This is hard to debug, because R runs a separate 
process to do the installs.  If you want to track this down you can debug the 
code as follows.

1.  Manually download the tarball, using any method (perhaps 
download.packages("stringi", destdir = ".", type = "source").

2.  In R, run

debug(tools:::.install_packages)
tools:::.install_packages("stringi_1.1.5.tar.gz")

You can single step until you see the message, and try to diagnose why it is 
happening.

Watch out, this function will exit R at the end.

Duncan Murdoch

> [meconk@dcex1102shinypr ~]$ ls -l stringi/configure -rwxr-xr-x 1 
> meconk meconk 173757 Apr  7 11:43 stringi/configure 
> [meconk@dcex1102shinypr ~]$ sudo R [sudo] password for meconk:
>
> R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
> Copyright (C) 2017 The R Foundation for Statistical Computing
> Platform: x86_64-redhat-linux-gnu (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]
>
>> getwd()
> [1] "/home/meconk"
>> file_test("-x","stringi/configure")
> stringi/configure
>  TRUE
>> install.packages("stringi")  
>>  Installing package into '/usr/lib64/R/library'
> (as 'lib' is unspecified)
> trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz'
> Content type 'application/x-gzip' length 3645872 bytes (3.5 MB) 
> ==
> downloaded 3.5 MB
>
> * installing *source* package 'stringi' ...
> ** package 'stringi' successfully unpacked and MD5 sums checked
> ERROR: 'configure' exists but is not executable -- see the 'R Installation 
> and Administration Manual'
> * removing '/usr/lib64/R/library/stringi'
>
> The downloaded source packages are in
> '/tmp/Rtmpxw9twb/downloaded_packages'
> Updating HTML index of packages in '.Library'
> Making 'packages.html' ... done
> Warning message:
> In install.packages("stringi") :
>   installation of package 'stringi' had non-zero exit status
>
> --
> W. Michael Conklin
> EVP Marketing & Data Sciences
> GfK
> T +1 763 417 4545 | M +1 612 567 8287
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan 
> Murdoch
> Sent: Thursday, June 22, 2017 8:23 AM
> To: Martin Maechler; David Winsemius
> Cc: r-help@r-project.org
> Subject: Re: [R] Missing dependencies in pkg installs
>
> The "configure exists but is not executable" problem is somewhat 
> common on Windows, because there's usually no such thing as an 
> executable bit there.  (Cygwin does something to fake one, but Windows 
> generally
> doesn't.)  If you create a tarball there by default you get no executable 
> bits marked in it.
>
> For a long time, R CMD build has dealt with this issue by using the internal 
> tar() 

Re: [R] For loop

2017-06-22 Thread Nordlund, Dan (DSHS/RDA)
For a reproducible example, you need to give us some example data, at least

dput(head(leafbiom97))
dput(head(Litterfall_Ahmed97))
dput(head(GPP_Ahmed13))


Dan

Daniel Nordlund, PhD
Research and Data Analysis Division
Services & Enterprise Support Administration
Washington State Department of Social and Health Services


> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ahmed
> Attia
> Sent: Thursday, June 22, 2017 9:50 AM
> To: r-help
> Subject: [R] For loop
> 
> Hello R users,
> 
> The code below is for loop in R that I want to do to following
> calculation at each time i and i-1 in 2:75 dataset
> (Litterfall_Ahmed97).
> 
> 
> ac = ((LeafBiog at date i
> -LeafBiog at date i-1, dataset = leafbiom97) + (littperiod at date i,
> dataset= Litterfall_Ahmed97))/(sum (GPP from date i-1 to date i,
> dataset=GPP_Ahmed13)/2) .
> 
> #code for loop
> 
> GPP_Ahmed13$Date <- as.Date(GPP_Ahmed13$Date, '%Y/%m/%d')
> Litterfall_Ahmed97$Date <- as.Date(Litterfall_Ahmed97$Date, '%Y/%m/%d')
> leafbiom97$Date <- as.Date( leafbiom97$Date, '%Y/%m/%d')
> for (i in 2:75){
>   (leafbiom97$LeafBiog[leafbiom97$Date == "i"] -
>  leafbiom97$LeafBiog[leafbiom97$Date == "i-1"]+
>  Litterfall_Ahmed97$littperiod[Litterfall_Ahmed97$Date =="i"])/
> (sum(GPP_Ahmed13$GPP[GPP_Ahmed13$Date >= "i-1" &
>GPP_Ahmed13$Date <= "i"])/2)
> }
> 
> 
> #Error in charToDate(x) :
> 
> Thanks for your help
> 
> 
> Ahmed Attia, Ph.D.
> Agronomist & Soil Scientist
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] For loop

2017-06-22 Thread Rui Barradas

Hello,

Without correcting your code, it's obvious that the expressions like 
leafbiom97$Date == "i" and all others with"i" and "i - 1" are wrong.

leafbiom97$Date is of class Date, not character. And, besides,
for(i in ...) makes of i a numeric variable that has nothing to do with 
"i". This "i" will remain the character string "i" for all iterations of 
the loop.


Hope this helps,

Rui Barradas

Em 22-06-2017 17:50, Ahmed Attia escreveu:

leafbiom97$Date == "i"


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] For loop

2017-06-22 Thread Ahmed Attia
Hello R users,

The code below is for loop in R that I want to do to following
calculation at each time i and i-1 in 2:75 dataset
(Litterfall_Ahmed97).


ac = ((LeafBiog at date i
-LeafBiog at date i-1, dataset = leafbiom97) + (littperiod at date i,
dataset= Litterfall_Ahmed97))/(sum (GPP from date i-1 to date i,
dataset=GPP_Ahmed13)/2) .

#code for loop

GPP_Ahmed13$Date <- as.Date(GPP_Ahmed13$Date, '%Y/%m/%d')
Litterfall_Ahmed97$Date <- as.Date(Litterfall_Ahmed97$Date, '%Y/%m/%d')
leafbiom97$Date <- as.Date( leafbiom97$Date, '%Y/%m/%d')
for (i in 2:75){
  (leafbiom97$LeafBiog[leafbiom97$Date == "i"] -
 leafbiom97$LeafBiog[leafbiom97$Date == "i-1"]+
 Litterfall_Ahmed97$littperiod[Litterfall_Ahmed97$Date =="i"])/
(sum(GPP_Ahmed13$GPP[GPP_Ahmed13$Date >= "i-1" &
   GPP_Ahmed13$Date <= "i"])/2)
}


#Error in charToDate(x) :

Thanks for your help


Ahmed Attia, Ph.D.
Agronomist & Soil Scientist

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Duncan Murdoch

On 22/06/2017 11:15 AM, Conklin, Mike (GfK) wrote:

Following Duncan's instructions I find that the system and R find that 
configure IS executable but if trying to install via install.packages I get the 
same error.
I also tried using R CMD INSTALL from the terminal and install.packages with a local file 
pointing to the very same tar.gz file that shows the executable bit set. All result in 
the same "configure is not executable" result.



That's very mysterious.  This is hard to debug, because R runs a 
separate process to do the installs.  If you want to track this down you 
can debug the code as follows.


1.  Manually download the tarball, using any method (perhaps 
download.packages("stringi", destdir = ".", type = "source").


2.  In R, run

debug(tools:::.install_packages)
tools:::.install_packages("stringi_1.1.5.tar.gz")

You can single step until you see the message, and try to diagnose why 
it is happening.


Watch out, this function will exit R at the end.

Duncan Murdoch


[meconk@dcex1102shinypr ~]$ ls -l stringi/configure
-rwxr-xr-x 1 meconk meconk 173757 Apr  7 11:43 stringi/configure
[meconk@dcex1102shinypr ~]$ sudo R
[sudo] password for meconk:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (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]


getwd()

[1] "/home/meconk"

file_test("-x","stringi/configure")

stringi/configure
 TRUE

install.packages("stringi")   
Installing package into '/usr/lib64/R/library'

(as 'lib' is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz'
Content type 'application/x-gzip' length 3645872 bytes (3.5 MB)
==
downloaded 3.5 MB

* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: 'configure' exists but is not executable -- see the 'R Installation and 
Administration Manual'
* removing '/usr/lib64/R/library/stringi'

The downloaded source packages are in
'/tmp/Rtmpxw9twb/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("stringi") :
  installation of package 'stringi' had non-zero exit status

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK
T +1 763 417 4545 | M +1 612 567 8287

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Thursday, June 22, 2017 8:23 AM
To: Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

The "configure exists but is not executable" problem is somewhat common on 
Windows, because there's usually no such thing as an executable bit there.  (Cygwin does 
something to fake one, but Windows generally
doesn't.)  If you create a tarball there by default you get no executable bits 
marked in it.

For a long time, R CMD build has dealt with this issue by using the internal 
tar() function.  It corrects the executable bit with a warning during the build.

So if people are getting that error, something has gone wrong.  A few
guesses:

  - They are on Linux but using a mount of a Windows volume that doesn't 
preserve the bit.

  - They are using a tarball produced in some strange way on Windows, e.g. by 
calling tar directly instead of R CMD build.

  - There's a bug in R in detecting the executable bit.

Martin saw configure marked executable in the tarball from CRAN, which means 
the second is unlikely (unless it was very recently fixed), but the first is 
still possible.  One test is to manually expand the tarball, then use both ls 
and R's test to see if the executable bit is set and is detected by R.  For 
example, after downloading stringi_1.1.5.tar.gz you expand it using

tar zxvf stringi_1.1.5.tar.gz

and use

ls -l stringi/configure

to see if the system thinks it is executable, and in R,

file_test("-x", "stringi/configure")

to see what R sees.

Duncan Murdoch

On 22/06/2017 3:38 AM, Martin Maechler wrote:

David Winsemius 
on Wed, 21 Jun 2017 18:04:13 -0700 writes:


>> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK)  
wrote:
>>
>> I have a Ubuntu server with an R installation that has 384 packages 
installed.  We are 

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Conklin, Mike (GfK)
also it seems to be no issue to execute configure from the command line  
./configure

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK 
T +1 763 417 4545 | M +1 612 567 8287 


-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Conklin, Mike 
(GfK)
Sent: Thursday, June 22, 2017 10:15 AM
To: Duncan Murdoch; Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

Following Duncan's instructions I find that the system and R find that 
configure IS executable but if trying to install via install.packages I get the 
same error.
I also tried using R CMD INSTALL from the terminal and install.packages with a 
local file pointing to the very same tar.gz file that shows the executable bit 
set. All result in the same "configure is not executable" result.

[meconk@dcex1102shinypr ~]$ ls -l stringi/configure -rwxr-xr-x 1 meconk meconk 
173757 Apr  7 11:43 stringi/configure [meconk@dcex1102shinypr ~]$ sudo R [sudo] 
password for meconk:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (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]

> getwd()
[1] "/home/meconk"
> file_test("-x","stringi/configure")
stringi/configure
 TRUE
> install.packages("stringi")   
> Installing package into '/usr/lib64/R/library'
(as 'lib' is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz'
Content type 'application/x-gzip' length 3645872 bytes (3.5 MB) 
==
downloaded 3.5 MB

* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: 'configure' exists but is not executable -- see the 'R Installation and 
Administration Manual'
* removing '/usr/lib64/R/library/stringi'

The downloaded source packages are in
'/tmp/Rtmpxw9twb/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("stringi") :
  installation of package 'stringi' had non-zero exit status

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK
T +1 763 417 4545 | M +1 612 567 8287 

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Thursday, June 22, 2017 8:23 AM
To: Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

The "configure exists but is not executable" problem is somewhat common on 
Windows, because there's usually no such thing as an executable bit there.  
(Cygwin does something to fake one, but Windows generally
doesn't.)  If you create a tarball there by default you get no executable bits 
marked in it.

For a long time, R CMD build has dealt with this issue by using the internal 
tar() function.  It corrects the executable bit with a warning during the build.

So if people are getting that error, something has gone wrong.  A few
guesses:

  - They are on Linux but using a mount of a Windows volume that doesn't 
preserve the bit.

  - They are using a tarball produced in some strange way on Windows, e.g. by 
calling tar directly instead of R CMD build.

  - There's a bug in R in detecting the executable bit.

Martin saw configure marked executable in the tarball from CRAN, which means 
the second is unlikely (unless it was very recently fixed), but the first is 
still possible.  One test is to manually expand the tarball, then use both ls 
and R's test to see if the executable bit is set and is detected by R.  For 
example, after downloading stringi_1.1.5.tar.gz you expand it using

tar zxvf stringi_1.1.5.tar.gz

and use

ls -l stringi/configure

to see if the system thinks it is executable, and in R,

file_test("-x", "stringi/configure")

to see what R sees.

Duncan Murdoch

On 22/06/2017 3:38 AM, Martin Maechler wrote:
>> David Winsemius 
>> on Wed, 21 Jun 2017 18:04:13 -0700 writes:
>
> >> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK) 
>  wrote:
> >>
> >> I have a Ubuntu server with an R installation that has 384 packages 
> installed.  We are trying to replicate the system on a Red Hat Enterprise 
> server. I downloaded the list of packages from the 

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Conklin, Mike (GfK)
Following Duncan's instructions I find that the system and R find that 
configure IS executable but if trying to install via install.packages I get the 
same error.
I also tried using R CMD INSTALL from the terminal and install.packages with a 
local file pointing to the very same tar.gz file that shows the executable bit 
set. All result in the same "configure is not executable" result.

[meconk@dcex1102shinypr ~]$ ls -l stringi/configure
-rwxr-xr-x 1 meconk meconk 173757 Apr  7 11:43 stringi/configure
[meconk@dcex1102shinypr ~]$ sudo R
[sudo] password for meconk:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (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]

> getwd()
[1] "/home/meconk"
> file_test("-x","stringi/configure")
stringi/configure
 TRUE
> install.packages("stringi")   
> Installing package into '/usr/lib64/R/library'
(as 'lib' is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz'
Content type 'application/x-gzip' length 3645872 bytes (3.5 MB)
==
downloaded 3.5 MB

* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: 'configure' exists but is not executable -- see the 'R Installation and 
Administration Manual'
* removing '/usr/lib64/R/library/stringi'

The downloaded source packages are in
'/tmp/Rtmpxw9twb/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("stringi") :
  installation of package 'stringi' had non-zero exit status

--
W. Michael Conklin
EVP Marketing & Data Sciences
GfK 
T +1 763 417 4545 | M +1 612 567 8287 

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Thursday, June 22, 2017 8:23 AM
To: Martin Maechler; David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] Missing dependencies in pkg installs

The "configure exists but is not executable" problem is somewhat common on 
Windows, because there's usually no such thing as an executable bit there.  
(Cygwin does something to fake one, but Windows generally
doesn't.)  If you create a tarball there by default you get no executable bits 
marked in it.

For a long time, R CMD build has dealt with this issue by using the internal 
tar() function.  It corrects the executable bit with a warning during the build.

So if people are getting that error, something has gone wrong.  A few
guesses:

  - They are on Linux but using a mount of a Windows volume that doesn't 
preserve the bit.

  - They are using a tarball produced in some strange way on Windows, e.g. by 
calling tar directly instead of R CMD build.

  - There's a bug in R in detecting the executable bit.

Martin saw configure marked executable in the tarball from CRAN, which means 
the second is unlikely (unless it was very recently fixed), but the first is 
still possible.  One test is to manually expand the tarball, then use both ls 
and R's test to see if the executable bit is set and is detected by R.  For 
example, after downloading stringi_1.1.5.tar.gz you expand it using

tar zxvf stringi_1.1.5.tar.gz

and use

ls -l stringi/configure

to see if the system thinks it is executable, and in R,

file_test("-x", "stringi/configure")

to see what R sees.

Duncan Murdoch

On 22/06/2017 3:38 AM, Martin Maechler wrote:
>> David Winsemius 
>> on Wed, 21 Jun 2017 18:04:13 -0700 writes:
>
> >> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK) 
>  wrote:
> >>
> >> I have a Ubuntu server with an R installation that has 384 packages 
> installed.  We are trying to replicate the system on a Red Hat Enterprise 
> server. I downloaded the list of packages from the Ubuntu machine and read it 
> into an R session on the new machine. Then I ran 
> install.packages(listofpackages).  Now I have 352 packages on the new machine 
> but several very common packages (like much of the tidyverse, ggplot2, Hmisc) 
> failed to install because of missing dependencies (most of which are the 
> other packages that failed to install).
> >>
> >> R version 3.4.0 (2017-04-21)
> >> Platform: x86_64-redhat-linux-gnu (64-bit)
>
> > I'd make 

Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Duncan Murdoch
The "configure exists but is not executable" problem is somewhat common 
on Windows, because there's usually no such thing as an executable bit 
there.  (Cygwin does something to fake one, but Windows generally 
doesn't.)  If you create a tarball there by default you get no 
executable bits marked in it.


For a long time, R CMD build has dealt with this issue by using the 
internal tar() function.  It corrects the executable bit with a warning 
during the build.


So if people are getting that error, something has gone wrong.  A few 
guesses:


 - They are on Linux but using a mount of a Windows volume that doesn't 
preserve the bit.


 - They are using a tarball produced in some strange way on Windows, 
e.g. by calling tar directly instead of R CMD build.


 - There's a bug in R in detecting the executable bit.

Martin saw configure marked executable in the tarball from CRAN, which 
means the second is unlikely (unless it was very recently fixed), but 
the first is still possible.  One test is to manually expand the 
tarball, then use both ls and R's test to see if the executable bit is 
set and is detected by R.  For example, after downloading 
stringi_1.1.5.tar.gz you expand it using


tar zxvf stringi_1.1.5.tar.gz

and use

ls -l stringi/configure

to see if the system thinks it is executable, and in R,

file_test("-x", "stringi/configure")

to see what R sees.

Duncan Murdoch

On 22/06/2017 3:38 AM, Martin Maechler wrote:

David Winsemius 
on Wed, 21 Jun 2017 18:04:13 -0700 writes:


>> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK)  
wrote:
>>
>> I have a Ubuntu server with an R installation that has 384 packages 
installed.  We are trying to replicate the system on a Red Hat Enterprise server. I 
downloaded the list of packages from the Ubuntu machine and read it into an R session 
on the new machine. Then I ran install.packages(listofpackages).  Now I have 352 
packages on the new machine but several very common packages (like much of the 
tidyverse, ggplot2, Hmisc) failed to install because of missing dependencies (most of 
which are the other packages that failed to install).
>>
>> R version 3.4.0 (2017-04-21)
>> Platform: x86_64-redhat-linux-gnu (64-bit)

> I'd make sure you have reviewed this:

> 
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Essential-programs-and-libraries

yes,  but see also below ..

> Best;
> David.

>> Running under: Red Hat Enterprise Linux Server 7.2 (Maipo)
>>
>> Matrix products: default
>> BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
>>
>> locale:
>> [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
>> [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>> [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
>> [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
>> [9] LC_ADDRESS=C   LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats graphics  grDevices utils datasets  methods   base
>>
>> other attached packages:
>> [1] dplyr_0.7.0 shiny_1.0.3
>>
>> loaded via a namespace (and not attached):
>> [1] compiler_3.4.0   magrittr_1.5 assertthat_0.2.0 R6_2.2.2
>> [5] htmltools_0.3.6  tools_3.4.0  glue_1.1.1   tibble_1.3.3
>> [9] Rcpp_0.12.11 digest_0.6.12xtable_1.8-2 httpuv_1.3.3
>> [13] mime_0.5 rlang_0.1.1
>>>
>>
>>
>> If I try and install Hmisc for example I get the following errors:
>> for the first error ERROR: 'configure' exists but is not executable --
>> see the 'R Installation and dministration Manual'  I did
>> not find the R Installation and Administration Manual
>> helpful.

why?  It does assume you spend some time understanding what it
is talking about.
OTOH, it is  *THE*  official document on the topic, written and
constantly updated by the  R core team.

Anyway:   " ERROR: 'configure' exists but is not executable "

is I think a crucial piece of information .. it's from stringi's
installation failure, and the top level directory of stringi (1.1-5)
in a Unix like (ls -l with user group names removed) looks like:

  -rw-r--r--. 1451 Apr  7 15:08 DESCRIPTION
  -rw-r--r--. 6207 Apr  7 11:21 INSTALL
  -rw-r--r--. 3580 Mar 21 13:29 LICENSE
  -rw-r--r--.63692 Apr  7 15:08 MD5
  -rw-r--r--. 6204 Oct 24  2016 NAMESPACE
  -rw-r--r--.22407 Apr  7 11:44 NEWS
  drwxr-xr-x. 8192 Mar 28 10:26 R
  -rwxr-xr-x.   66 Apr  2  2015 cleanup
  -rw-rw-r--.32193 Apr  8 05:46 config.log
  -rwxrwxr-x.40648 Apr  8 05:46 config.status
  -rwxr-xr-x.   173757 Apr  7 11:43 configure
  -rw-r--r--.  669 Jun 23  2015 configure.win
  drwxr-xr-x.  512 Apr  7 11:50 inst
  drwxr-xr-x. 8192 Mar 28 10:26 man
  drwxr-xr-x.16384 Apr  8 05:47 src

Note the 

Re: [R] selecting dataframe columns based on substring of col name(s)

2017-06-22 Thread Evan Cooch
Thanks to all the good suggestions/solutions to the original problem.

On 6/21/2017 3:28 PM, David Winsemius wrote:
>> On Jun 21, 2017, at 9:11 AM, Evan Cooch  wrote:
>>
>> Suppose I have the following sort of dataframe, where each column name has a 
>> common structure: prefix, followed by a number (for this example, col1, 
>> col2, col3 and col4):
>>
>> d = data.frame( col1=runif(10), col2=runif(10), 
>> col3=runif(10),col4=runif(10))
>>
>> What I haven't been able to suss out is how to efficiently 
>> 'extract/manipulate/play with' columns from the data frame, making use of 
>> this common structure.
>>
>> Suppose, for example, I want to 'work with' col2, col3, and col4. Now, I 
>> could subset the dataframe d in any number of ways -- for example
>>
>> piece <- d[,c("col2","col3","col4")]
>>
>> Works as expected, but for *big* problems (where I might have dozens -> 
>> hundreds of columns -- often the case with big design matrices output by 
>> some linear models program or another), having to write them all out using 
>> c("col2","col3","colX") takes a lot of time. What I'm wondering 
>> about is if there is a way to simply select over the "changing part" of the 
>> column name (you can do this relatively easily in a data step in SAS, for 
>> example). Heuristically, something like:
>>
>> piece <- df[,col2:col4]
>>
>> where the heuristic col2:col4 is interpreted as col2 -> col4 (parse the 
>> prefix 'col', and then simply select over the changing suffic -- i.e., 
>> column number).
>>
>> Now, if I use the "to" function in the lessR package, I can get there from 
>> here fairly easily:
>>
>> piece <- d[,to("col",4,from=2,same.size=FALSE)]
>>
>> But, is there a better way? Beyond 'efficiency' (ease of implementation), 
>> part of what constitutes 'better' might be something in base R, rather than 
>> relying on a package?
> After staring at the code for the base function subset with a thought to 
> hacking it to do this I realized that should be already part of the 
> evaluation result from its current form:
>
>   names(airquality)
> #[1] "Ozone"   "Solar.R" "Wind""Temp""Month"   "Day"
>
> subset(airquality,
>Temp > 90, # this is the row selection
>select = Ozone:Solar.R) # and this selects columns
> #
>  Ozone Solar.R
> 42 NA 259
> 43 NA 250
> 69 97 267
> 70 97 272
> 75 NA 291
> 102NA 222
> 12076 203
> 121   118 225
> 12284 237
> 12385 188
> 12496 167
> 12578 197
> 12673 183
> 12791 189
>
> Bert's advice to work with the numbers is good, but conversion to numeric 
> designations of columns inside the `select`-expression is actually what is 
> occurring inside `subset`.
>


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Hunting a histogram variant

2017-06-22 Thread peter dalgaard
Hmmno... The labels on a stem-and-leaf plots are the values. This is just the 
measurement number: Observations #2,5,6,9 from level 1 had a temperature 
between 89 and 90, making up the penultimate column of that histogram.

I would conjecture that, like stem-and-leaf, this has fallen out of favour 
because it doesn't scale well to larger samples. It is fine with 64 
observations like this, but with (say) four times as many boxes, you'd lose all 
legibility.

-pd 

> On 22 Jun 2017, at 06:16 , Bert Gunter  wrote:
> 
> ?stem
> 
> for something close and built in.
> 
> Cheers,
> Bert
> 
> 
> Bert Gunter
> 
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> 
> 
> On Wed, Jun 21, 2017 at 9:01 PM, S Ellison  wrote:
>> 
>> I'm looking for a histogram variant in which data points are plotted as 
>> labelled rectangles 'piled up' to form a histogram. I've posted an example 
>> at https://www.dropbox.com/s/ozi8bhdn5kqaufm/labelled_histogram.png?dl=0
>> 
>> It seems to have a long pedigree, as I see it (as in this example) in 
>> documents going back beyond the '80s. But I've not seen it in recent 
>> textbooks. So it may be one of those older graphical displays that's just 
>> fallen out of use.
>> 
>> General questions:
>> i) Does this thing have a name?
>> ii) Can anyone point me to a literature source for it?
>> 
>> ... and the R question:
>> ii) Is it already hiding somewhere in an R package?*
>> 
>> S Ellison
>> 
>> *If it's not, I'll be adding it to one, hence the hunt for due credit/sources
>> 
>> 
>> 
>> ***
>> This email and any attachments are confidential. Any u...{{dropped:8}}
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
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-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] 3D plot with coordinates

2017-06-22 Thread Duncan Murdoch

On 22/06/2017 3:15 AM, Alaios wrote:

Thanks. So after searching 4 hours last night it looks like that there
is no R package that can do this right now. Any other ideas or
suggestions might be helpful.


I don't know what you want the display to look like, but if you want it 
to be rotatable, rgl is probably the right package to use.


It doesn't directly support the coordinate system you're using, so you 
need to figure out where you want your points (or line segments) plotted 
in Euclidean coordinates, and write your own function to plot those. 
For example, to plot (r, theta) in polar coordinates in the XY plane, 
use (x = r*cos(theta), y = r*sin(theta), z = 0).


Duncan Murdoch


Regards
Alex


On Wednesday, June 21, 2017 3:21 PM, Alaios via R-help
 wrote:


Thanks Duncan for the replyI can not suppress anything these are
radiation pattern measurements that are typically are taken at X,Y and Z
planes. See an example here, where I want to plot the measurements for
the red, green and blue planes (so the image below withouth the 3d green
structure
inside)https://www.researchgate.net/publication/258391165/figure/fig7/AS:322947316240401@1454008048835/Radiation-pattern-of-Archimedean-spiral-antenna-a-3D-and-b-elevation-cuts-at-phi.png


I am quite confident that there is a tool in R to help me do this 3D
plot, and even better rotatable.
Thanks for the reply to allAlex

On Wednesday, June 21, 2017 1:07 PM, Duncan Murdoch
> wrote:


On 21/06/2017 5:23 AM, Alaios via R-help wrote:

Thanks a lot for the reply.After  looking at different parts of the

code today I was able to start with simple 2D polar plots as the
attached pdf file.  In case the attachment is not visible I used the
plot.polar function to create something like
that.https://vijaybarve.files.wordpress.com/2013/04/polarplot-05.png

Now the idea now will be to put three of those (for X,Y,Z) in a 3d

rotatable plane. I tried the rgl function but is not clear how I can use
directly polar coordinates to draw the points at the three different planes.

Any ideas on that?


You can't easily do what you're trying to do.  You have 6 coordinates to
display:  the 3 angles and values corresponding to each of them.  You
need to suppress something.

If the values for matching angles correspond to each other (e.g. x=23
degrees and y=23 degrees and z=23 degrees all correspond to the same
observation), then I'd suggest suppressing the angles.  Just do a
scatterplot of the 3 corresponding values.  It might make sense to join
them (to make a path as the angles change), and perhaps to colour the
path to indicate the angle (or plot text along the path to show it).

Duncan Murdoch


Thanks a lot.RegardsAlex

   On Tuesday, June 20, 2017 9:49 PM, Uwe Ligges

> wrote:



 package rgl.

Best,
Uwe Ligges


On 20.06.2017 21:29, Alaios via R-help wrote:

HelloI have three x,y,z vectors (lets say each is set as

rnorm(360)). So each one is having 360 elements each one correpsonding
to angular coordinates (1 degree, 2 degrees, 3 degrees, 360 degrees)
and I want to plot those on the xyz axes that have degress.

Is there a function or library to look at R cran? The ideal will be

that after plotting I will be able to rotate the shape.

I would like to thank you in advance for your helpRegardsAlex
   [[alternative HTML version deleted]]

__
R-help@r-project.org  mailing list -- To

UNSUBSCRIBE and more, see

https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide

http://www.R-project.org/posting-guide.html


and provide commented, minimal, self-contained, reproducible code.








__
R-help@r-project.org  mailing list -- To

UNSUBSCRIBE and more, see

https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide

http://www.R-project.org/posting-guide.html


and provide commented, minimal, self-contained, reproducible code.









[[alternative HTML version deleted]]

__
R-help@r-project.org  mailing list -- To
UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Help/ Mathematics

2017-06-22 Thread Ahmed Attia
Hi Jim,

Thank you very much, this was so helpful.

GPP_Ahmed13$Date <- as.Date(GPP_Ahmed13$Date, '%Y/%m/%d')
Litterfall_Ahmed97$Date <- as.Date(Litterfall_Ahmed97$Date, '%Y/%m/%d')
leafbiom97$Date <- as.Date( leafbiom97$Date, '%Y/%m/%d')

(leafbiom97$LeafBiog[leafbiom97$Date == "2012-02-12"] -
  leafbiom97$LeafBiog[leafbiom97$Date == "2010-03-15"]+
  Litterfall_Ahmed97$littperiod[Litterfall_Ahmed97$Date =="2011-04-08"])/
  (sum(GPP_Ahmed13$GPP[GPP_Ahmed13$Date >= "2010-03-12" &
  GPP_Ahmed13$Date <= "2012-04-12"])/2)


Best regards

Ahmed
Ahmed Attia, Ph.D.
Agronomist & Soil Scientist






On Thu, Jun 22, 2017 at 12:24 AM, Jim Lemon  wrote:
> Hi Ahmed,
> Your problem appears trivial as you have already specified the form of
> the calculation.
>
> Learn how to "extract" specified elements from a data structure:
>
> # first value
> sum(dataset1$NPP[dataset1$date >= date1 &
>  dataset1$date <= date2])
> # second value
> dataset2$biomass[dataset2$date == date2] -
>  dataset2$biomass[dataset2$date == date1]
> # third value
> dataset3$littfall[dataset3$date == date2]
>
> Note that you may have to convert character strings to dates to do the
> above - see a function like "as.Date". Obviously I do not know the
> actual names of your datasets and I am assuming that the variable
> names you have given are the actual ones.
>
> Jim
>
>
> On Thu, Jun 22, 2017 at 4:19 AM, Ahmed Attia  wrote:
>> Hi R users,
>>
>> I need your help to write a code in r that does the following
>> calculation from three different datasets;
>>
>> ac = 1/sum (NPP from date 1 to date 2, dataset=1) * (biomass at date 2
>> -biomass at date 1, dataset = 2) + (littfall at date 2, dataset=3).
>>
>> all the dates are in yr-month-day format. Which library or function
>> Should I use to tell R do these calculations of these variables at
>> different dates.
>>
>> I appreciate your help.
>>
>> Ahmed Attia, Ph.D.
>> Agronomist & Soil Scientist
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Missing dependencies in pkg installs

2017-06-22 Thread Martin Maechler
> David Winsemius 
> on Wed, 21 Jun 2017 18:04:13 -0700 writes:

>> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK)  
wrote:
>> 
>> I have a Ubuntu server with an R installation that has 384 packages 
installed.  We are trying to replicate the system on a Red Hat Enterprise 
server. I downloaded the list of packages from the Ubuntu machine and read it 
into an R session on the new machine. Then I ran 
install.packages(listofpackages).  Now I have 352 packages on the new machine 
but several very common packages (like much of the tidyverse, ggplot2, Hmisc) 
failed to install because of missing dependencies (most of which are the other 
packages that failed to install).
>> 
>> R version 3.4.0 (2017-04-21)
>> Platform: x86_64-redhat-linux-gnu (64-bit)

> I'd make sure you have reviewed this:

> 
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Essential-programs-and-libraries

yes,  but see also below ..

> Best;
> David.

>> Running under: Red Hat Enterprise Linux Server 7.2 (Maipo)
>> 
>> Matrix products: default
>> BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
>> 
>> locale:
>> [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
>> [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>> [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
>> [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
>> [9] LC_ADDRESS=C   LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>> 
>> attached base packages:
>> [1] stats graphics  grDevices utils datasets  methods   base
>> 
>> other attached packages:
>> [1] dplyr_0.7.0 shiny_1.0.3
>> 
>> loaded via a namespace (and not attached):
>> [1] compiler_3.4.0   magrittr_1.5 assertthat_0.2.0 R6_2.2.2
>> [5] htmltools_0.3.6  tools_3.4.0  glue_1.1.1   tibble_1.3.3
>> [9] Rcpp_0.12.11 digest_0.6.12xtable_1.8-2 httpuv_1.3.3
>> [13] mime_0.5 rlang_0.1.1
>>> 
>> 
>> 
>> If I try and install Hmisc for example I get the following errors:
>> for the first error ERROR: 'configure' exists but is not executable -- 
>> see the 'R Installation and dministration Manual'  I did
>> not find the R Installation and Administration Manual
>> helpful.

why?  It does assume you spend some time understanding what it
is talking about.
OTOH, it is  *THE*  official document on the topic, written and
constantly updated by the  R core team.

Anyway:   " ERROR: 'configure' exists but is not executable "

is I think a crucial piece of information .. it's from stringi's
installation failure, and the top level directory of stringi (1.1-5)
in a Unix like (ls -l with user group names removed) looks like:

  -rw-r--r--. 1451 Apr  7 15:08 DESCRIPTION
  -rw-r--r--. 6207 Apr  7 11:21 INSTALL
  -rw-r--r--. 3580 Mar 21 13:29 LICENSE
  -rw-r--r--.63692 Apr  7 15:08 MD5
  -rw-r--r--. 6204 Oct 24  2016 NAMESPACE
  -rw-r--r--.22407 Apr  7 11:44 NEWS
  drwxr-xr-x. 8192 Mar 28 10:26 R
  -rwxr-xr-x.   66 Apr  2  2015 cleanup
  -rw-rw-r--.32193 Apr  8 05:46 config.log
  -rwxrwxr-x.40648 Apr  8 05:46 config.status
  -rwxr-xr-x.   173757 Apr  7 11:43 configure
  -rw-r--r--.  669 Jun 23  2015 configure.win
  drwxr-xr-x.  512 Apr  7 11:50 inst
  drwxr-xr-x. 8192 Mar 28 10:26 man
  drwxr-xr-x.16384 Apr  8 05:47 src

Note the "x"s  in the 'configure' line's " -rwxr-xr-x. ": 
This means the file is executable and a reasonable shell can
just "call the file" and it will be executed, but that's the
part which failed for you.

.. this *is* peculiar as it looks like some of the standard Unix
tools may be misbehaving for you .. I assume it could be some OS
security "feature" playing against you..

>> 
>> 
>>> install.packages("Hmisc")
>> Installing package into '/usr/lib64/R/library'
>> (as 'lib' is unspecified)
>> also installing the dependencies 'stringi', 'evaluate', 'reshape2', 
'stringr', knitr', 'ggplot2', 'htmlTable', 'viridis'
>> 
>> trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz'
>> Content type 'application/x-gzip' length 3645872 bytes (3.5 MB)
>> ==
>> downloaded 3.5 MB
>> 
>> trying URL 'https://cloud.r-project.org/src/contrib/evaluate_0.10.tar.gz'
>> Content type 'application/x-gzip' length 21914 bytes (21 KB)
>> ==
>> downloaded 21 KB
>> 
>> trying URL 
'https://cloud.r-project.org/src/contrib/reshape2_1.4.2.tar.gz'
>> Content type 'application/x-gzip' length 34688 bytes (33 KB)
>> ==
>> downloaded 33 KB
>> 
>> trying URL 

Re: [R] 3D plot with coordinates

2017-06-22 Thread Alaios via R-help
Thanks. So after searching 4 hours last night it looks like that there is no R 
package that can do this right now. Any other ideas or suggestions might be 
helpful.RegardsAlex 

On Wednesday, June 21, 2017 3:21 PM, Alaios via R-help 
 wrote:
 

 Thanks Duncan for the replyI can not suppress anything these are radiation 
pattern measurements that are typically are taken at X,Y and Z planes. See an 
example here, where I want to plot the measurements for the red, green and blue 
planes (so the image below withouth the 3d green structure 
inside)https://www.researchgate.net/publication/258391165/figure/fig7/AS:322947316240401@1454008048835/Radiation-pattern-of-Archimedean-spiral-antenna-a-3D-and-b-elevation-cuts-at-phi.png
 

I am quite confident that there is a tool in R to help me do this 3D plot, and 
even better rotatable.
Thanks for the reply to allAlex 

    On Wednesday, June 21, 2017 1:07 PM, Duncan Murdoch 
 wrote:
 

 On 21/06/2017 5:23 AM, Alaios via R-help wrote:
> Thanks a lot for the reply.After  looking at different parts of the code 
> today I was able to start with simple 2D polar plots as the attached pdf 
> file.  In case the attachment is not visible I used the plot.polar function 
> to create something like 
> that.https://vijaybarve.files.wordpress.com/2013/04/polarplot-05.png
> Now the idea now will be to put three of those (for X,Y,Z) in a 3d rotatable 
> plane. I tried the rgl function but is not clear how I can use directly polar 
> coordinates to draw the points at the three different planes.
> Any ideas on that?

You can't easily do what you're trying to do.  You have 6 coordinates to 
display:  the 3 angles and values corresponding to each of them.  You 
need to suppress something.

If the values for matching angles correspond to each other (e.g. x=23 
degrees and y=23 degrees and z=23 degrees all correspond to the same 
observation), then I'd suggest suppressing the angles.  Just do a 
scatterplot of the 3 corresponding values.  It might make sense to join 
them (to make a path as the angles change), and perhaps to colour the 
path to indicate the angle (or plot text along the path to show it).

Duncan Murdoch

> Thanks a lot.RegardsAlex
>
>    On Tuesday, June 20, 2017 9:49 PM, Uwe Ligges 
> wrote:
>
>
>  package rgl.
>
> Best,
> Uwe Ligges
>
>
> On 20.06.2017 21:29, Alaios via R-help wrote:
>> HelloI have three x,y,z vectors (lets say each is set as  rnorm(360)). So 
>> each one is having 360 elements each one correpsonding to angular 
>> coordinates (1 degree, 2 degrees, 3 degrees, 360 degrees) and I want to 
>> plot those on the xyz axes that have degress.
>> Is there a function or library to look at R cran? The ideal will be that 
>> after plotting I will be able to rotate the shape.
>> I would like to thank you in advance for your helpRegardsAlex
>>    [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
>
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



  
    [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

   
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.