Displaying 20 results from an estimated 5000 matches similar to: "Viewing certain numbers without NA's"
2002 Jan 22
3
assigning NA's
I've had a question a few moments ago about how to create multiple
objects from multiple files within a loop. Thanks for the quick answers,
it worked with "assign", like this:
for(i in seq(1,nfn,1)){
fin<-paste("/home/klimet/patrick/LAEGEREN/NEBEL/FOGEVENT2000/",fn[i],sep="")
assign(paste("f", i, sep = ""),
2002 Mar 05
3
location of maximum
Dear R-users,
I'm trying to extract the exact location of the maximum value in a
vector or a matrix, meaning I want not only the maximum itself but also
at which position (e.g row 6, column 12) it is located.
I appreciate any suggestions.
Thanks,
Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patrick.vcf
Type: text/x-vcard
Size: 339 bytes
Desc:
2002 May 25
3
expressions as axis labels
Dear colleagues,
I often use chemical formulas to label my x-axis, e.g. in barplots. I
used to do this like the following example and it worked just fine:
a <- seq(2,24,2)
b <- seq(3,36,3)
c <- rbind(a,b)
barplot(c, width=c(0.9, 1.1),space=c(0.2, 0.75), col=c("indianred4",
"yellow2"), beside = TRUE,
xlab="Ions", yaxt="n", xaxt="n", ylab
2002 May 25
3
expressions as axis labels
Dear colleagues,
I often use chemical formulas to label my x-axis, e.g. in barplots. I
used to do this like the following example and it worked just fine:
a <- seq(2,24,2)
b <- seq(3,36,3)
c <- rbind(a,b)
barplot(c, width=c(0.9, 1.1),space=c(0.2, 0.75), col=c("indianred4",
"yellow2"), beside = TRUE,
xlab="Ions", yaxt="n", xaxt="n", ylab
2002 Feb 28
3
Use of results in summary
Dear R Community,
When making a summary with a vector, the result is "numeric" and I can
recall its components (like median, mean, etc.) for further use.
However, if I use summary with a matrix, the result is of mode
"character" (like "Median : 1.2127") and I cannot extract the results
for direct further use.
Thanks for any hints,
Patrick
-------------- next part
2002 Jan 22
1
creation of objects
Hi there,
I'm a new R user and I've got a little problem:
I would like to read several files at once (which works) and create R
objects for each individual file (which doesen't work) within a loop:
this is the way I've tried to program this:
fn<-list.files(path =
"/home/klimet/patrick/LAEGEREN/NEBEL/FOGEVENT2000/", pattern=NULL,
all.files=FALSE, full.names=FALSE)
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
Dear Martin Pool.
We regularly use rsync for making backups of our file systems but we have
noticed that the atimes are not transferred with the files and are also
always updated on the sender's side. Therefore, we have created a modified
version of rsync based on rsync-2.6.6 protocol version 29 which transfers
the access times with the transferred files and also allows to preserve
the access
2003 Feb 20
2
subset with NA
Easy question that I can't find an answer for. I'm trying to subset a
data frame and want to exclude the positive values, i.e. I want the NA
values.
My data:
> summary(temp$tuna)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
1 2 3 3 4 5 1211
Querying for
subset(temp, tuna %in% "NA", select....
subset(temp, tuna == NA,
2002 Apr 30
2
display of character NA's in a dataframe in 1.5.0
I understand that NA's in character vectors are displayed differently than NA's
in factor vectors.
> c("x", NA, "y")
[1] "x" NA "y"
> as.factor(c("x", NA, "y"))
[1] x <NA> y
Levels: x y
That seems sensible enough. But shouldn't I see the same behavior in a dataframe?
> test <- data.frame(a =
2009 Aug 04
2
100% CPU when running (cran2deb) JGR on Debian
Dear all,
I installed the amd64 cran2deb [1] JGR binaries on a fresh Debian
testing, and JGR is missbehaving. When JGR starts up, one core of the
CPU goes to 100% and stays there, even though I am keeping it idle and
not performing any operation.
I tried JGR with both sun-java6-jdk and openjdk-6-jdk,
debian-liv:/home/liviu# update-alternatives --config java
There are 4 choices for the alternative
2003 May 14
2
how to include 'NA's in xtabs?
Hello!
I have a dataset with NA's in some variables (factors), for example:
$ P67 : Factor w/ 2 levels "-","+": NA 2 1 NA NA 2 1 1 2 NA ...
I need to use 'xtabs' like
xtabs(~x$P67)
It works well and produces something like this:
x$P67
- +
779 1318
but i want to compute NA's too, like this:
x$P67
- + NA
779 1318 137
I am trying
2010 Dec 21
1
NA's in survey analysis
Hello,
I am trying to analyze sociological survey data using R. It is often
important in survey to calculate both the actual factor sums and
percentages (easily done with describe() ), but also the numbers and
total percentage of NA's. Often it is important to present NA's in
graphs besides the factors.
Is there any easy way to make R treat NA's as if those were factors
besides other
2010 Sep 23
3
Length of vector without NA's
Hi,
this following code:
x<-c(1,2,NA)
length(x)
returns 3, correctly counting numbers as well as NA's. How can I
exclude NA's from this count?
Ralf
2006 Mar 02
4
Skip last NA's?
I wonder if anyone could help me find an expression for skipping the last
missing values in a vector? The kind of material I have is something like
x<-c(23,12,NA,23,24,21,NA,NA,NA)
I would like to skip the last NA's, but not the ones in between other
vallues. Any hints? (Why not do this by simply take x[1:6]? I have several
vectors a couple of thousand observations long with varying
2005 Jun 17
3
Fit values for NA's in linear regression
Hi,
To obtain estimates for some missing values in my data I fitted a
linear regression and then used the command fitted(model) to get the
fitted values from the model, but R doesn't return any values for the
NA's. I can calculate the fitted values from the estimates obtained
from the summary of model, but that's not very handy. Is there a way to
include the missing values in the
2006 Oct 12
1
Should NA's in summary() output always be reported???
Consider
> summary(1:5)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1 2 3 3 4 5
> summary(c(1:5,NA))
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
1 2 3 3 4 5 1
Wouldn't it be more stringent if "NA's" was also reported in the first case??
Regards
S?ren
2005 May 07
3
converting NA/non-NA's to a binary variable
Dear R colleagues,
I am trying to create a new column in a data frame, which converts values
and NA's from another column into binary format. Essentially I need the
NA's to become 1 and the rest to be 0. The code I wrote is returning the
following error message:
Error in if (mort[i, 4] != NA) mort[i, 8] <- 0 else if (mort[i, 4] == :
missing value where TRUE/FALSE needed
2006 Nov 29
2
filled.contour and NA's
Hi,
I'm trying to do a filled.contour plot where some points are labelled as
NA. How do I could plot this kind of graphics, so NA points are coloured
black, keeping the levels of remaining points. NA's values represent
land points (meaningless), and what I want to plot is the levels of a
variable over the sea.
x<-seq(length=21, from=-10, by=.25)
y<-seq(length=8, from=36,
2002 Jul 15
2
Transpose and NA's
I noticed some odd behavior when I transpose a data frame containing
NA's. It seems to cast all the elements as "character" including the
NA's. Bug?
> t(data.frame(x=1:10,y=1:10,z=rep(NA,10)))
1 2 3 4 5 6 7 8 9 10
x " 1" " 2" " 3" " 4" " 5" " 6"
2013 Nov 12
1
How to replace NA's data with some value
Hi all,
I have a data set with missing value. I would like to estimate those
missing value by using normal ratio method.
Below is part of my data:
AS BL Serdang Jhr Phg Target station
0 0.0 12.8 0.0 23.7 0.0
6 0.0 81.7 0.2 0.0 NA
0 1.5 60.9 0.0 0.0 15.5
1 13.0 56.8 17.5 32.8 6.4
4 3.0 66.4