Re: [R] Manova: Data similarly generated are significantly different.

2015-09-04 Thread Duncan Murdoch
On 04/09/2015 5:18 PM, Roger Xu wrote:
> y0 <- runif(100, 0, 1)
> y1 <- runif(100, 0, 1)
> y2 <- runif(100, 0, 1)
> 
> y0 <- c(y0, runif(100, 0, 10) )
> y1 <- c(y1, runif(100, 0, 10) )
> y2 <- c(y2, runif(100, 0, 10) )
> 
> y0=as.numeric(unlist(y0))
> y1=as.numeric(unlist(y1))
> y2=as.numeric(unlist(y2))
> 
> b=10
> a=length(y0)/b
> g=rep(1:a,rep(b,a))
> 
> m1 <- manova(cbind(y0, y1, y2) ~ g)
> s=summary(m1, test = "Wilks")
> 
> a = s$stats
> a = a[11]
> s
> a

If you plot any of the y columns vs g you see a huge effect.  You aren't
testing whether the y's are equal, you are testing whether the triplets
depend on g, and they do.

Duncan Murdoch

__
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] Composite index reliability questions - cronbach()

2015-09-04 Thread Nick Petschek
Hi All,

I have two questions on using cronbach() from the psy() package.

My simplified situation is the following: I have a survey of 10 questions
(column names are "Q1", "Q2", etc.) that went out to 100+ people. I have
the responses to the questions, plus additional variables (demographics,
location, etc.) in a data frame (named "JDC"). I want to build composite
indices from these 10 questions. I plan to use two steps to create the
indices. First, grouping the questions by what makes intuitive sense given
what they ask, and second, by testing the reliability of these groupings
using cronbach().

QUESTION 1

Let's say I think Q1, Q3, and Q5 will make a good index. With my limited
knowledge of R, I would think there's a way to say "run the reliability on
these three variables in this dataframe". However, I have so far only been
able to test the reliability of *adjacent *variables. For example, I could
do:

*cronbach(jdc[,1:3])*

to test Q1, Q2, and Q3. Is there a way to test non-adjacent variables?

I realize I could do something like:

*trust <- jdc[, c("Q2", "Q7", "Q8")]*
*cronbach(trust)*

but that adds a few extra steps, and I have tons of questions and indices
which would make that very cumbersome, especially since I will go through
several iterations in testing potential indices.


QUESTION 2

Is there a way to refer to the column name when using cronbach(), instead
of just the location of the variable? For example:

This works:   *cronbach(jdc[,1:3])*
This doesn't:* cronbach(jdc[Q1, Q2, Q3])*


Thanks in advance for any insights, answers, words of encouragement, or
alternate ways I could solve this puzzle.

Nick

[[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] Manova: Data similarly generated are significantly different.

2015-09-04 Thread Roger Xu
Dear R users,

Hi. I don't know if my understanding of Manova test is correct. So I test
with the following code and got strange results.

Any help would be appreciated.

y0, y1, and y2 are independently generated by the same method.

They are each split into 20 groups by the same method.
The summary of the Manova test (stored in variable s) says:

The Pr (>F) value is less than 2.2e-16.

y0 <- runif(100, 0, 1)
y1 <- runif(100, 0, 1)
y2 <- runif(100, 0, 1)

y0 <- c(y0, runif(100, 0, 10) )
y1 <- c(y1, runif(100, 0, 10) )
y2 <- c(y2, runif(100, 0, 10) )

y0=as.numeric(unlist(y0))
y1=as.numeric(unlist(y1))
y2=as.numeric(unlist(y2))

b=10
a=length(y0)/b
g=rep(1:a,rep(b,a))

m1 <- manova(cbind(y0, y1, y2) ~ g)
s=summary(m1, test = "Wilks")

a = s$stats
a = a[11]
s
a

The summary is here:

   Df   Wilks approx F num Df den DfPr(>F)
   g   1 0.37069   110.91  3196 < 2.2e-16 ***
   Residuals 198
   ---
   Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

[[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] Urgent query

2015-09-04 Thread Bert Gunter
Yup. Me too. Much better.

-- Bert
Bert Gunter

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
   -- Clifford Stoll


On Fri, Sep 4, 2015 at 2:57 PM, peter dalgaard  wrote:
>
>> On 03 Sep 2015, at 19:34 , Bert Gunter  wrote:
>>
>> You still failed to post to the list! Please learn how to use your
>> mail client properly and **always** cc the list.
>>
>> Anyway, here is an answer (there may be other ways):
>>
>>> curve(dweibull(x,shape=0.8,scale=1),mgp=c(2,0.3,0),cex.lab=1.2,xlab="t",ylab="f(t)")
>>> mtext(expression(italic(paste(alpha==1,","," 
>>> ",0>
>
> I think I prefer:
>
> mtext(expression({alpha==1}*","~0<{beta<1}),side=1,line=4,cex=1)
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> 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] Urgent query

2015-09-04 Thread peter dalgaard

> On 03 Sep 2015, at 19:34 , Bert Gunter  wrote:
> 
> You still failed to post to the list! Please learn how to use your
> mail client properly and **always** cc the list.
> 
> Anyway, here is an answer (there may be other ways):
> 
>> curve(dweibull(x,shape=0.8,scale=1),mgp=c(2,0.3,0),cex.lab=1.2,xlab="t",ylab="f(t)")
>> mtext(expression(italic(paste(alpha==1,","," 
>> ",0 

I think I prefer:

mtext(expression({alpha==1}*","~0<{beta<1}),side=1,line=4,cex=1)
-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
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] getting a vector of unown size

2015-09-04 Thread Jeff Newmiller
If you had read the Posting Guide as every posting admonishes you in the 
footer, you would know that this question about C belongs on R-devel, not 
R-help. I think a lot of C questions are addressed in the Writing R Extensions 
document also, so be sure to convey how the documentation failed to communicate 
an answer to you when you do post again.

If this question were about how to handle returning vectors of unknown size in 
an R function, I would point out that one end of the spectrum is your over 
allocation strategy, and the other end is building an intermediate list of 
atomic data values (rows of data on a file?) and in between those would be a 
list of small blocks of memory that you allocate as each "current" chunk is 
filled up. Such a list can be measured after all data are in memory so a block 
of exactly the right size can be allocated and the data transferred and the 
list can then be discarded/freed. Which direction to go depends strongly on the 
variability/size of your particular data and how much time you have to optimize 
it.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On September 4, 2015 4:51:02 AM PDT, Marcelo Kittlein  
wrote:
>Hi all!
>
>I have written some code in C for simulating the fate of population 
>using a dll loaded in R. During this simulation the population may go 
>extinct such that the length of its trajectory is unknown beforehand. I
>
>wonder there is a way to define the size of the result in C and make it
>
>known to R to get the vector appropriately.
>
>I have defined the output size very much larger than necessary to hold 
>the result and then shrink the vector to the size where meaningful 
>values occur, but this waste much resources and time unnecessarily.
>
>The C code
>
>
>#include 
>#include 
>
>
>double min(double a, double b)
>{
>if(a>b)
>return b;
>else
>return a;
>}
>
>double unirand()
>{
>return (rand()+1.0)/(RAND_MAX+1.0);
>}
>
>void RndSBDdemography(double *b, double *d, double *a, double *c,
>double 
>*No, double *tmax, double *tiempo, double *Nind)
>{
>double tb, td, n;
>int bc=0;
>tiempo[0]=1.0;
>Nind[0] = *No;
>
>// This loop generates output of variable and a priori unknown size
>
>while (Nind[bc] >= 2 && tiempo[bc] <= *tmax)
>{
>bc = bc + 1;
>tb = -(1 / (*b - *a * Nind[bc-1])) * log(unirand());
>td = -(1 / (*d + *c * Nind[bc-1])) * log(unirand());
>
>tiempo[bc]= tiempo[bc-1] + min(tb, td)/ Nind[bc-1];
>
>if (tb < td) n=1.0 ; else n= -1.0;
>
>Nind[bc] = Nind[bc-1] + n;
>
>}
>
>}
>
>
>The definition of the function call in R
>
>
>RndSBDdemography = function(b=b,d=d,a=a,c=c, No=No, tmax=tmax){
>tiempo=numeric(10);
>Nind=numeric(10);
>out=.C("RndSBDdemography",
>b=as.double(b),
>d=as.double(d),
>a=as.double(a),
>c=as.double(c),
>No=as.double(No),
>tmax=as.double(tmax),
>tiempo=as.double(tiempo),
>Nind=as.double(Nind)
>)
>
># trim the output to a size where meaningful values occur
>indi=which(out$tiempo!=0)
>return(data.frame(tiempo=out$tiempo[indi], Nind=out$Nind[indi]))
>}
>
>Hope someone can give ahint on this.
>
>Best Regards
>
>Marcelo Kittlein
>
>__
>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] simulation in vector autoregressive model (VAR)

2015-09-04 Thread David Winsemius
Before you post on Rhelp you should first read the Posting Guide. It tells you 
that requests for statistical advice might be answered but are not really 
on-topic. Furthermore requests for tutorials or extended worked examples should 
probably be accompanied by evidence of searching using Google or equivalent:

https://www.google.com/search?q=r+vector+auto-regressive+model&ie=utf-8&oe=utf-8

-- 
David
On Sep 3, 2015, at 11:53 PM, Aziz Mensah via R-help wrote:

> I have a data from 4 variables ( STOCK, CPI, EXC, and CCI) from 1980 to 2012. 
> I want to do a forecast using VAR(12) model with a simulation of 100,000 for 
> 5 years. And also estimate the RMSE, MAPE, and Theil Inequality. Can anyone 
> help me with this problem in R? Thanks so much. 
> 
>   [[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] getting a vector of unown size

2015-09-04 Thread Marcelo Kittlein

Hi all!

I have written some code in C for simulating the fate of population 
using a dll loaded in R. During this simulation the population may go 
extinct such that the length of its trajectory is unknown beforehand. I 
wonder there is a way to define the size of the result in C and make it 
known to R to get the vector appropriately.


I have defined the output size very much larger than necessary to hold 
the result and then shrink the vector to the size where meaningful 
values occur, but this waste much resources and time unnecessarily.


The C code


#include 
#include 


double min(double a, double b)
{
if(a>b)
return b;
else
return a;
}

double unirand()
{
return (rand()+1.0)/(RAND_MAX+1.0);
}

void RndSBDdemography(double *b, double *d, double *a, double *c, double 
*No, double *tmax, double *tiempo, double *Nind)

{
double tb, td, n;
int bc=0;
tiempo[0]=1.0;
Nind[0] = *No;

// This loop generates output of variable and a priori unknown size

while (Nind[bc] >= 2 && tiempo[bc] <= *tmax)
{
bc = bc + 1;
tb = -(1 / (*b - *a * Nind[bc-1])) * log(unirand());
td = -(1 / (*d + *c * Nind[bc-1])) * log(unirand());

tiempo[bc]= tiempo[bc-1] + min(tb, td)/ Nind[bc-1];

if (tb < td) n=1.0 ; else n= -1.0;

Nind[bc] = Nind[bc-1] + n;

}

}


The definition of the function call in R


RndSBDdemography = function(b=b,d=d,a=a,c=c, No=No, tmax=tmax){
tiempo=numeric(10);
Nind=numeric(10);
out=.C("RndSBDdemography",
b=as.double(b),
d=as.double(d),
a=as.double(a),
c=as.double(c),
No=as.double(No),
tmax=as.double(tmax),
tiempo=as.double(tiempo),
Nind=as.double(Nind)
)

# trim the output to a size where meaningful values occur
indi=which(out$tiempo!=0)
return(data.frame(tiempo=out$tiempo[indi], Nind=out$Nind[indi]))
}

Hope someone can give ahint on this.

Best Regards

Marcelo Kittlein

__
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] Visualization of people's interactions by participation to parties

2015-09-04 Thread Clint Bowman

Hendrik,

As a start, I'd make a matrix of zeros with the parties in rows 
and all of the participants as columns and put a one for each participant 
at each party.  The matrix will consist of a vector for each 
participant showing the parties attended. The pattern may suggest the next 
step.  Similarity of vectors could be an indication of interaction.


Clint

Clint BowmanINTERNET:   cl...@ecy.wa.gov
Air Quality Modeler INTERNET:   cl...@math.utah.edu
Department of Ecology   VOICE:  (360) 407-6815
PO Box 47600FAX:(360) 407-7534
Olympia, WA 98504-7600

USPS:   PO Box 47600, Olympia, WA 98504-7600
Parcels:300 Desmond Drive, Lacey, WA 98503-1274

On Fri, 4 Sep 2015, Adams, Jean wrote:


Hendrik,

It's not clear to me what kind of R help you are looking for.  I suggest
you provide more information on the data that you have and the questions
that you want answered.  Is it in an external file?  Is it an R object?
What code have you written or tried?  Including example data, for example
the output from dput(), is very helpful.

Jean

On Wed, Sep 2, 2015 at 1:46 AM, Voxcoelestis via R-help <
r-help@r-project.org> wrote:


Dear all,

I have a long list of parties and participants over many years and want to
extract network relations between people to identify groups of friends. My
list looks like this:

Party 1; date party 1; first name 1 last name 1; first name 2 last name 2;
first name 3 last name 3;
Party 2; date party 2; first name 1 last name 1; first name 3 last name 3;
first name 4 last name 4;
Party 3; date party 3; first name 3 last name 3; first name 5 last name 5;
Party 4; date party 4; first name 2 last name 2; first name 6 last name 6;
first name 3 last name 3; first name 1 last name 1;
Party 5; date party 5; first name 5 last name 5; first name 4 last name 4;


Obviously the amount and the order of names is not regular. The list is
far too long to count co-appearances for each person-person combination by
hand.

What I would like to do is first of all create a network with individual
persons as nodes and the co-appearances as edges and the number of
co-appearances as strenght of interactions clustering closesly related
people.

In a second step it would be beneficial to extract information on the
durability of these interactions by including the time difference between
first and last interaction.

Do you have any ideas or hints how to approach this problem?

Thank you so much,

Hendrik

__
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
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] Visualization of people's interactions by participation to parties

2015-09-04 Thread Adams, Jean
Hendrik,

It's not clear to me what kind of R help you are looking for.  I suggest
you provide more information on the data that you have and the questions
that you want answered.  Is it in an external file?  Is it an R object?
What code have you written or tried?  Including example data, for example
the output from dput(), is very helpful.

Jean

On Wed, Sep 2, 2015 at 1:46 AM, Voxcoelestis via R-help <
r-help@r-project.org> wrote:

> Dear all,
>
> I have a long list of parties and participants over many years and want to
> extract network relations between people to identify groups of friends. My
> list looks like this:
>
> Party 1; date party 1; first name 1 last name 1; first name 2 last name 2;
> first name 3 last name 3;
> Party 2; date party 2; first name 1 last name 1; first name 3 last name 3;
> first name 4 last name 4;
> Party 3; date party 3; first name 3 last name 3; first name 5 last name 5;
> Party 4; date party 4; first name 2 last name 2; first name 6 last name 6;
> first name 3 last name 3; first name 1 last name 1;
> Party 5; date party 5; first name 5 last name 5; first name 4 last name 4;
> 
>
> Obviously the amount and the order of names is not regular. The list is
> far too long to count co-appearances for each person-person combination by
> hand.
>
> What I would like to do is first of all create a network with individual
> persons as nodes and the co-appearances as edges and the number of
> co-appearances as strenght of interactions clustering closesly related
> people.
>
> In a second step it would be beneficial to extract information on the
> durability of these interactions by including the time difference between
> first and last interaction.
>
> Do you have any ideas or hints how to approach this problem?
>
> Thank you so much,
>
> Hendrik
>
> __
> 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] Gamma count

2015-09-04 Thread Dan D
Pick the mean (mu) and variance (sig2) you want. Then, shape = mu^2/sig2 and
scale = sig2/mu. This should work fine if your mean is large enough so that
p(x = 0 or 1) is small.



--
View this message in context: 
http://r.789695.n4.nabble.com/Gamma-count-tp4711845p4711853.html
Sent from the R help mailing list archive at Nabble.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] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-04 Thread Fox, John
Dear Joyaa,

> -Original Message-
> From: Joyaa Antares [mailto:jo...@goldcoastosteopathy.com.au]
> Sent: Friday, September 4, 2015 7:07 AM
> To: Fox, John
> Cc: r-help@r-project.org
> Subject: Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with
> Windows 10
> 
> Dear John,
> 
> Very many thanks.  Your hypothesis was completely correct - I did save
> the
> workspace, and this is what created the problem.   As a newbie, being
> part
> way through an "exercise", saving my workspace intuitively seemed the
> right
> thing to do.   Clearly not!

It wouldn't have seemed the correct thing to do had you read the Rcmdr manual 
(accessible via "Help > Introduction to the R Commander"). See Section 6.5.

I understand why saving the workspace was made the default on exiting the R 
Console -- after all, it can help users to avoid inadvertently losing work -- 
but it my experience it is a frequent source of confusion among new users of R, 
whether or not they're using the R Commander.

> So now, before I closed R and Rcmdr, I
> copied
> and pasted from Rcmdr's script file into a MS Word document, added a few
> comments (with preceding #), and then closed without otherwise saving
> R's
> script, output, workspace or markdown.  I hope this is reasonable
> practice.
> If not, I would be grateful for guidance on this.

You've already received good advice from others about *not* using Word as a 
programming editor. I think that it's safe to say that the most popular 
programming editor for R (and for good reason) is RStudio. The Rcmdr script tab 
has basic editing capabilities, including saving and opening R scripts, and it 
offers to save the script when you exit.

You can, however, paste input and output, including graphs, from the Rcmdr into 
Word to create a report. It would be better, however, to use the Rcmdr Markdown 
tab to create reports in the form of HTML, PDF, or Word files. The Rcmdr 
includes an editor for R Markdown documents.  See Sections 6.1 and 6.2 of the 
manual.

Best,
 John

> 
> Once again, very many thanks.  Joyaa
> 
> -Original Message-
> From: Fox, John
> Sent: Friday, September 4, 2015 1:24 PM
> To: Joyaa Antares
> Cc: r-help@r-project.org
> Subject: RE: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with
> Windows
> 10
> 
> Dear Joyaa,
> 
> > -Original Message-
> > From: Joyaa Antares [mailto:jo...@goldcoastosteopathy.com.au]
> > Sent: September 3, 2015 9:37 PM
> > To: Fox, John 
> > Cc: r-help@r-project.org
> > Subject: Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with
> > Windows 10
> >
> > Dear John, Dear List,
> >
> > Thank you for responding.  Like you, I have tried uninstalling R and
> > reinstalling
> > again.  Question 1: having uninstalled R, how do you delete the
> package
> > library?
> 
> You say below that you installed R packages when R was run as
> administrator
> and that you took all defaults. In that case,  the installed packages
> will
> be in C:\Program Files\R\R-3.2.2\library . Just delete the library
> directory, which will still be there after R 3.2.2 is uninstalled. I do
> recommend, by the way, that, for using the Rcmdr, you install R with the
> SDI
> rather than the default MDI, but that doesn't explain your difficulties.
> 
> >
> > I have used defaults throughout the process, except for running the
> whole
> > things
> > as Administrator rather than a User.  For the mirror, my first two
> install
> > attempts
> > were via a mirror in Germany.  My 3rd and 4th attempts via Cambridge,
> UK.
> >
> > Perhaps importantly: the first time I ran the RcmdrPlugin.survival
> plug-in
> > it
> > worked fine.
> 
> If you said that before, I missed it.
> 
> > I got half way through the exercise I was attempting, then closed
> > the programs for the night.  The next day, when I tried to reload the
> > plugin from
> > R Commander, the plugin asked me to restart R Commander, but on opting
> for
> > "Yes", this is when R Commander does not open properly.
> 
> Here's my hypothesis: When you "closed" R, you saved the R workspace. My
> guess is that this is the source of your problem. If so, the saved
> workspace
> is in the file .RData in your home directory; delete it and try again.
> 
> If this works, in future, exit from the Rcmdr and R via the Rcmdr menus
> (or
> if closing R directly, don't save the workspace).
> 
> I hope this helps,
> John
> 
> -
> John Fox, Professor
> McMaster University
> Hamilton, Ontario
> Canada L8S 4M4
> Web: socserv.mcmaster.ca/jfox
> 
> 
> >
> > My thanks to you and the list for your time.  Joyaa (Gold Coast,
> > Queensland,
> > Australia)
> >
> > -Original Message-
> > From: Fox, John
> > Sent: Friday, September 4, 2015 1:29 AM
> > To: Joyaa Antares
> > Cc: r-help@r-project.org
> > Subject: RE: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with
> > Windows
> > 10
> >
> > Dear Joyaa,
> >
> > I too run R 3.2.2 on a Windows 10 system. I uninstalled R, deleted my
> > packag

Re: [R] groups Rank

2015-09-04 Thread Sarah Goslee
Hi Ragia,

I can't make out your data or desired result, but it sounds like
aggregate() might get you started. If you need more help, please
repost your data using dput() and do NOT post in HTML so that we can
see what your desired result looks like.

Sarah

On Fri, Sep 4, 2015 at 10:12 AM, Ragia Ibrahim  wrote:
> Dear Group,kinldy, I have the following data frame df
>  id value1   1  4   2   1  4   3   1  6   4   
> 1  6   5   2  1.5   6   2  2.5  7   2  2.5   
> 8   2  2.5
>
> add rank column regarding id coulmn where rank for the highest value would be 
> 1, others rank would be the (value/ value of heighest)/ number of rows that 
> took the same value
> thus the data frame should be
> id valueRank1   1  4
> 0.332   1  40.333   1  6  
>   0.54   1  60.55   2  1.5
>   0.6   6   2  2.5  0.337   2  2.5
>   0.338   2  2.5  0.33
>
> how to reach this resultthanks in advanceRagia
> [[alternative HTML version deleted]]
>

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
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] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-04 Thread Jeff Newmiller
This is a major point... do not make the mistake that you can "get by" using 
MSWord as a text editor because it actively changes your code in ways that make 
sense in a word processor but change code in ways that corrupt it.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On September 4, 2015 7:09:29 AM PDT, jwd  wrote:
>On Fri, 4 Sep 2015 21:07:19 +1000
>"Joyaa Antares"  wrote:
>
>> Dear John,
>> 
>> Very many thanks.  Your hypothesis was completely correct - I did
>> save the workspace, and this is what created the problem.   As a
>> newbie, being part way through an "exercise", saving my workspace
>> intuitively seemed the right thing to do.   Clearly not!So now,
>> before I closed R and Rcmdr, I copied and pasted from Rcmdr's script
>> file into a MS Word document, added a few comments (with preceding
>> #), and then closed without otherwise saving R's script, output,
>> workspace or markdown.  I hope this is reasonable practice. If not, I
>> would be grateful for guidance on this.
>> 
>> Once again, very many thanks.  Joyaa
>> 
>A potentially useful piece of advise is to avoid using MSWord as a text
>editor.  I don't use Rcmdr, but text files, particularly CSVs are
>extremely useful in R as data files.  Scripts should be pure text as
>well.  Word demands that you keep this in mind at all times.  It won't
>default to a simple text mode.  You can use notepad, which MS provides
>as a stopgap, though I would recommend a more capable programmer's text
>editor such as Notepad++, a very useful GPL-licensed text editor for
>Windows, which can be downloaded for free.
>
>JWDougherty
>
>__
>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] groups Rank

2015-09-04 Thread Ragia Ibrahim
Dear Group,kinldy, I have the following data frame df
 id value1   1  4   2   1  4   3   1  6   4 
  1  6   5   2  1.5   6   2  2.5  7   2  2.5   8
   2  2.5  

add rank column regarding id coulmn where rank for the highest value would be 
1, others rank would be the (value/ value of heighest)/ number of rows that 
took the same value
thus the data frame should be
id valueRank1   1  4
0.332   1  40.333   1  6
0.54   1  60.55   2  1.5  
0.6   6   2  2.5  0.337   2  2.5
  0.338   2  2.5  0.33

how to reach this resultthanks in advanceRagia  

  
[[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] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-04 Thread jwd
On Fri, 4 Sep 2015 21:07:19 +1000
"Joyaa Antares"  wrote:

> Dear John,
> 
> Very many thanks.  Your hypothesis was completely correct - I did
> save the workspace, and this is what created the problem.   As a
> newbie, being part way through an "exercise", saving my workspace
> intuitively seemed the right thing to do.   Clearly not!So now,
> before I closed R and Rcmdr, I copied and pasted from Rcmdr's script
> file into a MS Word document, added a few comments (with preceding
> #), and then closed without otherwise saving R's script, output,
> workspace or markdown.  I hope this is reasonable practice. If not, I
> would be grateful for guidance on this.
> 
> Once again, very many thanks.  Joyaa
> 
A potentially useful piece of advise is to avoid using MSWord as a text
editor.  I don't use Rcmdr, but text files, particularly CSVs are
extremely useful in R as data files.  Scripts should be pure text as
well.  Word demands that you keep this in mind at all times.  It won't
default to a simple text mode.  You can use notepad, which MS provides
as a stopgap, though I would recommend a more capable programmer's text
editor such as Notepad++, a very useful GPL-licensed text editor for
Windows, which can be downloaded for free.

JWDougherty

__
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] Gamma count

2015-09-04 Thread callyak4real via R-help

I intend to simulate data from gamma distribution. I plan rounding the 
observations into counts. What I want to know is how I will manipulate the 
parameters of gamma to have both over and under dispersed count scenarios.
[[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] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-04 Thread Joyaa Antares

Dear John,

Very many thanks.  Your hypothesis was completely correct - I did save the 
workspace, and this is what created the problem.   As a newbie, being part 
way through an "exercise", saving my workspace intuitively seemed the right 
thing to do.   Clearly not!So now, before I closed R and Rcmdr, I copied 
and pasted from Rcmdr's script file into a MS Word document, added a few 
comments (with preceding #), and then closed without otherwise saving R's 
script, output, workspace or markdown.  I hope this is reasonable practice. 
If not, I would be grateful for guidance on this.


Once again, very many thanks.  Joyaa

-Original Message- 
From: Fox, John

Sent: Friday, September 4, 2015 1:24 PM
To: Joyaa Antares
Cc: r-help@r-project.org
Subject: RE: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 
10


Dear Joyaa,


-Original Message-
From: Joyaa Antares [mailto:jo...@goldcoastosteopathy.com.au]
Sent: September 3, 2015 9:37 PM
To: Fox, John 
Cc: r-help@r-project.org
Subject: Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with 
Windows 10


Dear John, Dear List,

Thank you for responding.  Like you, I have tried uninstalling R and 
reinstalling
again.  Question 1: having uninstalled R, how do you delete the package 
library?


You say below that you installed R packages when R was run as administrator 
and that you took all defaults. In that case,  the installed packages will 
be in C:\Program Files\R\R-3.2.2\library . Just delete the library 
directory, which will still be there after R 3.2.2 is uninstalled. I do 
recommend, by the way, that, for using the Rcmdr, you install R with the SDI 
rather than the default MDI, but that doesn't explain your difficulties.




I have used defaults throughout the process, except for running the whole 
things
as Administrator rather than a User.  For the mirror, my first two install 
attempts

were via a mirror in Germany.  My 3rd and 4th attempts via Cambridge, UK.

Perhaps importantly: the first time I ran the RcmdrPlugin.survival plug-in 
it

worked fine.


If you said that before, I missed it.


I got half way through the exercise I was attempting, then closed
the programs for the night.  The next day, when I tried to reload the 
plugin from

R Commander, the plugin asked me to restart R Commander, but on opting for
"Yes", this is when R Commander does not open properly.


Here's my hypothesis: When you "closed" R, you saved the R workspace. My 
guess is that this is the source of your problem. If so, the saved workspace 
is in the file .RData in your home directory; delete it and try again.


If this works, in future, exit from the Rcmdr and R via the Rcmdr menus (or 
if closing R directly, don't save the workspace).


I hope this helps,
John

-
John Fox, Professor
McMaster University
Hamilton, Ontario
Canada L8S 4M4
Web: socserv.mcmaster.ca/jfox




My thanks to you and the list for your time.  Joyaa (Gold Coast, 
Queensland,

Australia)

-Original Message-
From: Fox, John
Sent: Friday, September 4, 2015 1:29 AM
To: Joyaa Antares
Cc: r-help@r-project.org
Subject: RE: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with 
Windows

10

Dear Joyaa,

I too run R 3.2.2 on a Windows 10 system. I uninstalled R, deleted my 
package
library, and then reinstalled R and the Rcmdr and RcmdrPlugin.survival 
packages.
I took all defaults, except that I selected the SDI rather than the 
default MDI for
Rgui, but I seriously doubt that this is the source of your problem. I 
used the 0-

Cloud mirror, both for R
3.2.2 and for packages.

I'm afraid that I can't duplicate your problem -- everything works 
perfectly fine

for me.

You provided a reasonable amount of detail, but is there anything else you 
can

add?

Best,
John

-
John Fox, Professor
McMaster University
Hamilton, Ontario
Canada L8S 4M4
web: socserv.mcmaster.ca/jfox



From: R-help [r-help-boun...@r-project.org] on behalf of Joyaa Antares
[jo...@goldcoastosteopathy.com.au]
Sent: September 3, 2015 8:31 AM
To: r-help@r-project.org
Subject: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 
10


Hello r-help,

I am quite new to R.  I downloaded R 3.2.2 for Windows to use with Windows
10.

On attempting to load the RcmdrPlugin.survival plug-in I got this error
message:

Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
  [tcl] invalid command name "configure".

The lead-up to this was:

* I uninstalled R 3.2.2 and deleted all R files I could find.
* Downloaded R 3.2.2 to do a fresh install
* Opened the .exe file as Administrator
* Ran 64-bit R as Administrator
* Updated all packages
* Installed Rcmdr and RcmdrPlugin.survival
* Ran Rcmdr using library(Rcmdr) from the console
* This required an install of a host of packages, which I installed
* Loaded RcmdrPlugin.survival from the Tools menu
* I was asked to restart R commander, and when

[R] simulation in vector autoregressive model (VAR)

2015-09-04 Thread Aziz Mensah via R-help
I have a data from 4 variables ( STOCK, CPI, EXC, and CCI) from 1980 to 2012. I 
want to do a forecast using VAR(12) model with a simulation of 100,000 for 5 
years. And also estimate the RMSE, MAPE, and Theil Inequality. Can anyone help 
me with this problem in R? Thanks so much. 

[[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] Plotting a fourth variable on a persp plot

2015-09-04 Thread Chelsea Edwards
Hi all,

I'm trying to plot colour as a fourth variable onto a persp plot to
highlight the multiple modes in my dataset.

A plot with 3 variables (frequency, time and depth) has been created using
the code below:

require(MASS)
require(graphics)
require(plot3D)
require(pdfCluster)

## density estimate and persp plot with 3 variables
f1 <- kde2d(Max_d, Bottom_t, n=124, lims=c(0, 90, 0, 140))
persp(f1, phi = 40, theta = 50, d = 5, col="lightblue", xlab="Maximum
diving depth, m", ylab="Bottom time, m", zlab="Number of dives")

# f1$x represents depth - vector - length 124
# f1$y represents bottom time (duration) - vector - length 124
# f1$z is the frequency matrix - length 15375 (124 by 124 Matrix)


The colour variable has been produced as a vector (length 124) using a
cluster analysis
## Colour variable -  representing 3 modes within the data (1,2&3 in
g_class1)
test1 <- Penguins[,c(16, 11)]
test1a <- pdfCluster(test1, graphtype="delaunay", h=h.norm(test1),
hmult=1.2, options="Qt", kernel="gaussian", bwtype="fixed")
g_class1 <-groups(test1a, stage=5)
g1 <- data.frame(g_class1)
Penguins3 <- data.frame(c(Penguins, g1, f1))

## using persp3D and colvar to get colour plotted
persp3D(z=f1$z, x=f1$x, y=f1$y, bty="bl2", axes=T,  facets=NA,
colvar=Penguins3$g_class1, lighting=T, colkey=TRUE, xlab="Maximum depth",
ylab="Bottom_time", zlab="Number of dives",xlim=c(0,90), ylim=c(0,140),
ticktype="detailed", border=NA)

# error - as colvar is not equal in dimensions to matrix Z.

ggg1 <- matrix(Penguins3$g_class1, nrow=124, ncol=124)
persp3D(z=f1$z, x=f1$x, y=f1$y, bty="b2", axes=T, colvar=ggg1, colkey=TRUE,
xlab="Maximum depth", ylab="Bottom_time", zlab="Number of
dives",xlim=c(0,90), ylim=c(0,140), ticktype="detailed", border=NA)

# produces the chart but values are (obviously) wrong

I understand that my current colour variable is a vector when I actually
need a matrix, but I'm unsure how to get around this issue as the vector
length is 124 and the matrix I need would be 124X124.

Is there anyway to plot the colour as a variable over the perspective plot?

Thanks in advance,

Chelsea

[[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] lsqlin in R package pracma

2015-09-04 Thread Hans W Borchers
On Tue, Sep 1, 2015 at 11:24 PM, Wang, Xue, Ph.D.  wrote:
>
> slsqp in R seems quite slow. Does anyone have some suggestion as how to speed 
> up this?
>

It is no surprise that a general solver like slsqp() takes longer than
specialized quadratic solvers such as solve.QP, ipop(), or
lowRankQP(). You got good advice in this thread, even with code; so
why don't you use what has been suggested in this thread?

If in your timings you include calling lsqlin() in pracma, then this
will increase the time by at least 0.4 ms.

NLopt is an external, compiled program that cannot be accelerated from within R.

I wrote a small wrapper for all the different approaches proposed.
Here is a rough timing estimate (with microbenchmark, in
milliseconds), all derived from the MATLAB example:

with constraintsw/o constraints
---
qr.solve--  0.06 ms
slsqp   5.5   ms5.25 ms [*]
solve.QP0.045 ms--
ipop5.0   ms--
lowRankQP   0.16  ms--
---
[*] plus 0.4 ms when using lsqlin for start values.

Because solve.QP is fastest, I append a function mimicking the MATLAB
API of lsqlin (without error handling for now) that can be used with
and without equality constraints, utilizing Berend's contribution. If
this is too slow, I guess you will have to look outside R, for example
Julia provides convex solvers that may be fast.

--- cut --
require(quadprog)
constrLsqlin <- function(C, d, A, b, # linear inequalities required
 Aeq = NULL, beq = NULL, lb = NULL, ub = NULL) {
m <- nrow(C); n <- ncol(C)
meq <- nrow(Aeq); neq <- ncol(Aeq)
if (is.null(meq)) meq = 0

Dmat <- t(C) %*% C
dvec <- t(C) %*% d

if (is.null(Aeq)) {
Amat <- -A
bvec <- -b
} else {
Amat <- rbind(Aeq, -A)
bvec <- c(beq, -b)
}
if (!is.null(lb)) {
Amat <- rbind(Amat, diag(n))
bvec <- c(bvec, lb)
}
if (!is.null(ub)) {
Amat <- rbind(Amat, -diag(n))
bvec <- c(bvec, -ub)
}
rslt <- solve.QP(Dmat, dvec, t(Amat), bvec, meq=meq)
rslt$solution
}

__
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] Converting CSV file to numeric and calculate ttest

2015-09-04 Thread PIKAL Petr
Hi

Well, you want us to help you but you do not provide any relevant information

This is a result of first line of your code on my computer

> FCPval <- read.csv("C:/Users/shawin/Desktop/RProgramms/RAdipose/FCPval.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'C:/Users/shawin/Desktop/RProgramms/RAdipose/FCPval.csv': No 
such file or directory

So nobody knows what is FCPval. If you read it correctly it shall be data 
frame, from your previous post I presume it is numeric.


> Fc2<-(FCPVal$Fc>=2 | FCPval<=-2);  this will just come out , true false
not extracting the Fc  ,

you does not **extract** anything, you did not ask for extraction.

> FCP<-as.matrix(sapply(FCPval,as.numeric))
> A=as.data.frame(FCP)

Above lines are difficult to grasp. If csv file was numeric why do you want to 
transfer it to numeric. You shall ***read*** it as numeric at first instance. 
If the file is not numeric what do you expect as.numeric will do to it. It just 
put numeric values where they are not appropriate.

Here is an example

> lev
  animals animalYears ind
1bird   1   2
2 cat   1   2
3 dog   1   2
> as.matrix(sapply(lev,as.numeric))
 animals animalYears ind
[1,]   1   1   2
[2,]   2   1   2
[3,]   3   1   2
>

I will not go deep into source of your this error, it is probably due to 
properties of your object A

> Fc2<-(A$Fc>=1.3| A$Fc<=-1.3) & A$p=0.05;  // has error when i combine
> condition
>
> Error in (Fc2 <- (A$Fc >= 1.3 | A$Fc <= -1.3) & A$p) = 0.05 :
>   could not find function "<-<-"
>

Here is how you shall do a selection, based on inbuilt iris data set

data(iris)
> dim(iris)
[1] 150   5 # so iris has 150 rows

sel <- (iris$Sepal.Width>4 | iris$Sepal.Width<3) & iris$Petal.Width==1.3
iris[sel,]
Sepal.Length Sepal.Width Petal.Length Petal.WidthSpecies
54   5.5 2.3  4.0 1.3 versicolor
56   5.7 2.8  4.5 1.3 versicolor
59   6.6 2.9  4.6 1.3 versicolor
65   5.6 2.9  3.6 1.3 versicolor
72   6.1 2.8  4.0 1.3 versicolor
75   6.4 2.9  4.3 1.3 versicolor
88   6.3 2.3  4.4 1.3 versicolor
90   5.5 2.5  4.0 1.3 versicolor
95   5.6 2.7  4.2 1.3 versicolor
97   5.7 2.9  4.2 1.3 versicolor
98   6.2 2.9  4.3 1.3 versicolor
100  5.7 2.8  4.1 1.3 versicolor

Only 12 are extracted so with proper data everything works. If you want better 
answer please provide at least result of

str(yourdata)

but preferably the data itself e.g. by

dput(head(FCPval, 20))

Petr

PS. And read R intro as it seems you do not understand R basics.


> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of shawin
> Sent: Thursday, September 03, 2015 1:55 PM
> To: r-help@r-project.org
> Subject: Re: [R] Converting CSV file to numeric and calculate ttest
>
> Dear Petr,
>
> This code does not work ?
> For selection values you can use e.g. [
> data(iris)
> sel<-iris$Sepal.Width>4
> iris[sel,] or iris[sel, c(1,3,5)]
>
>
> the data is csv file which is :
> FCPval <-
> read.csv("C:/Users/shawin/Desktop/RProgramms/RAdipose/FCPval.csv")
>
> ;
>
> Fc2<-(FCPVal$Fc>=2 | FCPval<=-2);  this will just come out , true false
> not extracting the Fc  ,
> ###
> ##
> FCP<-as.matrix(sapply(FCPval,as.numeric))
> A=as.data.frame(FCP)
> Fc2<-(A$Fc>=1.3| A$Fc<=-1.3) & A$p=0.05;  // has error when i combine
> condition
>
> Error in (Fc2 <- (A$Fc >= 1.3 | A$Fc <= -1.3) & A$p) = 0.05 :
>   could not find function "<-<-"
>
> write.csv(Fc2,"Fc2.csv",row.names =FALSE )
>
> please need help
>
>
> On Thu, Sep 3, 2015 at 8:56 AM, Shawin Karim 
> wrote:
>
> > Oh sorry F<2 & F<-2 ,  i need to extract the row value according to
> > the last two column F,P and using condition ,
> >
> > I attached  an test file to see the data
> >
> > On Thu, Sep 3, 2015 at 8:43 AM, PIKAL Petr [via R] <
> > ml-node+s789695n4711787...@n4.nabble.com> wrote:
> >
> >> Hi
> >>
> >> what is F?
> >>
> >> F>2 & F<2
> >> this is FALSE for all values of F
> >>
> >> What value you want to extract? All rows corresponding to condition
> >> or just values from specific column.
> >>
> >> For selection values you can use e.g. [
> >> data(iris)
> >> sel<-iris$Sepal.Width>4
> >> iris[sel,] or iris[sel, c(1,3,5)]
> >>
> >> Cheers
> >> Petr
> >>
> >> From: Shawin Karim [mailto:[hidden email]
> >> ]
> >> Sent: Thursday, September 03, 2015 9:17 AM
> >> To: PIKAL Petr
> >> Subject: Re: [R] Convertin