Displaying 20 results from an estimated 2000 matches similar to: "censtats from the NADA package"
2017 Sep 25
1
Subset
Always via logical expressions. In this case you can use the logical expression
myDF$b != "0"
to give you a vector of TRUE/FALSE
B.
> On Sep 25, 2017, at 8:00 AM, Shane Carey <careyshan at gmail.com> wrote:
>
> This is super, really helpfull. Sorry, one final question, lets say I wanted to remove 0's rather than NAs , what would it be?
>
> Thanks
>
2017 Sep 25
0
Subset
This is super, really helpfull. Sorry, one final question, lets say I
wanted to remove 0's rather than NAs , what would it be?
Thanks
On Mon, Sep 25, 2017 at 12:41 PM, Boris Steipe <boris.steipe at utoronto.ca>
wrote:
> myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"),
> b = c("<0.1", 1, 0.3, 5, "Nil"),
>
2017 Sep 25
2
Subset
myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"),
b = c("<0.1", 1, 0.3, 5, "Nil"),
stringsAsFactors = FALSE)
# you can subset the b-column in several ways
myDF[ , 2]
myDF[ , "b"]
myDF$b
# using the column, you make a logical vector
! is.na(as.numeric(myDF$b))
# This can be used to select the
2017 Sep 25
0
Subset
Hi,
Lets say this was a dataframe where I had two columns
a <- c("<0.1", NA, 0.3, 5, "Nil")
b <- c("<0.1", 1, 0.3, 5, "Nil")
And I just want to remove the rows from the dataframe where there were NAs
in the b column, what is the syntax for doing that?
Thanks in advance
On Fri, Sep 22, 2017 at 5:04 PM, Shane Carey <careyshan at
2017 Sep 22
3
Subset
Super,
Thanks
On Fri, Sep 22, 2017 at 4:57 PM, Boris Steipe <boris.steipe at utoronto.ca>
wrote:
> > a <- c("<0.1", NA, 0.3, 5, "Nil")
> > a
> [1] "<0.1" NA "0.3" "5" "Nil"
>
> > b <- as.numeric(a)
> Warning message:
> NAs introduced by coercion
> > b
> [1] NA NA 0.3
2017 Sep 22
0
Subset
> a <- c("<0.1", NA, 0.3, 5, "Nil")
> a
[1] "<0.1" NA "0.3" "5" "Nil"
> b <- as.numeric(a)
Warning message:
NAs introduced by coercion
> b
[1] NA NA 0.3 5.0 NA
> b[! is.na(b)]
[1] 0.3 5.0
B.
> On Sep 22, 2017, at 11:48 AM, Shane Carey <careyshan at gmail.com> wrote:
>
> Hi,
2017 Sep 22
2
Subset
Hi,
How do I extract just numbers from the following list:
a=c("<0.1",NA,0.3,5,Nil)
so I want to obtain: 0.3 and 5 from the above list
Thanks
--
Le gach dea ghui,
*Shane Carey*
*GIS and Data Solutions Consultant*
[[alternative HTML version deleted]]
2013 Mar 14
2
NADA and cenmle
Hi,
I am using the cenmle function from the NADA package and some of my data
are negative values. As a result the cenmle function will not work and
NaN's are produced. I try to change the distribution to Gaussian, but it
still will not run.
Could somebody please help me with this?
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Mar 26
6
How do I show real values on a log10 histogram
Hi,
I have a histogram with values logged to the base 10
hist(log10(x),breaks=60)
How do I show the log values on the x-axis and a second x-axis showing the
real values?
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Apr 11
4
%*%
What does these operators do: %*%
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Sep 26
1
R not ploting lines in the correct order
Hi,
I have a set of x, y points where x represents dates and y actual values. I
am trying to plot a line graph of the data with points on top, but R is
connecting the wrong points with lines. Does anyone know how I can rectify
this. Please see sample below:
x=
24/09/2009 09:13 16/10/2009 11:17 24/10/2009 21:43 11/09/2009
18:34 22/08/2009
15:45 10/08/2009 00:30 14/08/2009 14:52 24/09/2009
2013 Mar 29
4
How do you graph data when you have lots of small values but few extremely large values?
I was thinking of splitting the y-axis into two? Is this possible?
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Apr 03
3
Superscript
Hi,
How do I write a superscript within gsub?
I have the following: gsub("_mgkg",expression(paste("mg kg"^{-1})),names[1])
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Mar 29
2
0e+00
Hi,
Rather than a graph label to display labels as 0e+00, how do I get it to
display the real value?
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Mar 27
2
find and replace characters in a string
Hi,
I have a string of text as follows "LOI ."
How do I replace the dot with "(%)"
gsub(".","(%)",LOI .)
gives
"(%)(%)(%)(%)(%)"
Thanks
--
Shane
[[alternative HTML version deleted]]
2013 Jun 26
3
XYZ data
I have x, y, z data. The x, y fields dont change but Z does. How do I add a
very small number onto the end of each x, y data point.
For example:
Original (X) Original (Y) Original (Z)
15 20 30
15 20 40
New (X) New (Y)
2013 Apr 02
1
read.delim
Hi,
Im reading in a .txt file into R that consists of 5 columns, however, when
imported into R, it reads all the data into just one column. Is there a way
of telling R to create a dataframe with 5 columns rather than putting all
the data into one column?
Thanks
--
Shane
[[alternative HTML version deleted]]
2008 Sep 11
3
ZFS Crypto [Prelim] Codereview
Here''s my comments for the preliminary ZFS Crypto review.
- Dan
Webrev: http://cr.opensolaris.org/~darrenm/zfs-crypto-gate/webrev/
General comments:
DEA-1 - SCCS keywords need to be removed
DEA-2 - Copyright updated
------------------------------------------------------------------
usr/src/lib/libcryptoutil/common/keyfile.c pkcs11_read_data()
This code in pkcs11_read_data() scares
2010 Mar 30
1
Error when checking a package.
Dear useRs,
I am trying to build my package (nonpareff) which deals with some models of
data envelopment analysis.
The building worked well, but checking complains when it tests examples.
Zipped nonparaeff.Rcheck is attached.
Following is the log.
---------------------------------------------
arecibo:tmp arecibo$ R CMD build nonparaeff/
* checking for file 'nonparaeff/DESCRIPTION' ...
2010 Mar 30
1
R package checking error.
Dear useRs,
I am trying to build my package (nonpareff) which deals with some models of
data envelopment analysis.
The building worked well, but checking complains when it tests examples.
Zipped nonparaeff.Rcheck is attached.
Following is the log.
---------------------------------------------
arecibo:tmp arecibo$ R CMD build nonparaeff/
* checking for file 'nonparaeff/DESCRIPTION' ...