Displaying 20 results from an estimated 6000 matches similar to: "margin text warning message NAs coercion"
2010 Jan 29
1
use zoo package with multiple column data sets
Readers,
I am trying to use the zoo package with an array of data:
file1:
hh:mm:ss 1
hh:mm:ss 2
hh:mm:ss 3
hh:mm:ss 4
file2:
hh:mm:ss 11 55
hh:mm:ss 22 66
hh:mm:ss 33 77
hh:mm:ss 44 88
I wanted to merge these data set so I tried the following commands:
library(chron)
library(zoo)
z1<-read.zoo("path/to/file1.csv",header=TRUE,sep=",",FUN=times)
2010 Jan 13
2
selection of multiple subscripts
Readers,
For a data set 'x':
1 a
2 b
3 c
4 d
5 e
6 f
7 g
8 h
9 i
How to select multiple subscripts to plot? For example to plot values
1:3 and 9:10:
plot(x[1:3,1],x[,2])
and
plot(x[9:10,1],x[,2])
into one plot?
Yours,
rhelpatconference.jabber.org
r251
2009 Nov 24
1
write to file append by column
Readers,
Scenario: data x consists of one column;
1
2
3
data y;
4
5
6
Is it possible to write to file such that the file is:
1,4
2,5
3,6
using the write.file function? I have tried the command:
write(x,file="file.csv",ncolumns=1,append=TRUE,sep=",")
write(y,file="file.csv",ncolumns=1,append=TRUE,sep=",")
but the result is:
1
2
3
4
5
6
yours,
2010 May 31
2
accessing a data frame with row names
Readers,
I have entered a file into r:
,column1,column2
row1,0.1,0.2
row2,0.3,0.4
using the command:
dataframe<-read.table("/path/to/file.csv",header=T,row.names=1)
When I try the command:
dataframe[,2]
I receive the response:
NULL
I was expecting:
row1 0.2
row2 0.4
What is my error with the syntax please?
Yours,
r251
mandriva2009
2007 Nov 01
1
Problem with compiling 64bit R(2.5.1) under HP-UX(ia64)
Hi there,
We are trying to compile a 64bit version of R (2.5.1) on HP-UX
(B.11.23 U ia64), but are running into some problems.
This is our configure step:
../configure --prefix=/rnd/homes/lfan/R251 --enable-R-shlib CC="cc"
CFLAGS="+z +DD64" CXX="aCC" CXXFLAGS="-b -lxnet +z +DD64" FC="f90"
FCFLAGS="+DD64" F77="f90"
2010 Aug 24
2
percentage sign in expression
Readers,
According to the documentation for the function 'plotmath' there is no
apparent possibility to add the percent sign (%) to a plot function,
e.g.
plot(a[,1]~b[,2],ylab=expression(x~%),xlab=expression(z))
How to achieve this please?
yours,
rhelp at conference.jabber.org
r251
mandriva2009
2011 Jan 29
1
data extrapolation function
Readers,
Data was imported using the read csv command:
dataimport<-read.csv("/path/to/dataimport.csv")
10,2000
12,2001
13,2002
15,2003
17,2004
Using the help contents for 'predict.lm' (i.e. ?predict.lm) a new data
frame was created
dataimportextra<-data.frame(x=seq(1990,2010,1))
predict(lm(dataimport),dataimportextra[,2],se.fit=TRUE)
2010 Dec 14
2
Use generalised additive model to plot curve
Readers,
I have been reading 'the r book' by Crawley and think that the
generalised additive model is appropriate for this problem. The
package 'gam' was installed using the command (as root)
install.package("gam")
...
library(gam)
> library(gam)
Loading required package: splines
Loading required package: akima
> library(mgcv)
This is mgcv 1.3-25
Attaching
2008 Mar 11
1
NAs introduced by coercion
Hallo,
i get a warning message that NAs are introduced by coercion,
so my idea is to write a function to see which values are turned into
NA
For this i need to write a function to go through (loop) the original
data and the transformed (with the introduced na) to see which data were
transformed to NA.
So the return of this function should be a 2*many matrix like structure,
eg
names:
2009 Nov 23
1
NAs introduced by coercion warning?
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091123/a7856456/attachment-0001.pl>
2007 Oct 17
1
ignorable warnings of as.numeric: NAs introduced by coercion
Warnings are a good thing and can help to find errors in data.
But with newer R versions I get more and more warnings
which I would like to suppress in defined circumstances.
In the manual of as.numeric() is noticed:
as.numeric(c("-.1"," 2.7 ","B")) # (-0.1, 2.7, NA) + warning
If I know that my data contains characters and if I would like
that they will be
2011 Jul 29
2
converting factor to numeric gives "NAs introduced by coercion"
Hi,
I have a dataframe that I imported from a .txt file by:
skogTemp <- read.delim2("Skogaryd_shoot_data.txt", header=TRUE, fill=TRUE)
and the data are factors, how can avoid factors from the beginning? Although
the file contains both characters and numbers.
I tried to convert some of the columns from factor to numeric and as I
understood it you can not use only as.numeric but
2012 Jul 29
1
readRDS, In as.double.xts(fishReport$count) : NAs introduced by coercion
Hello,
I looked in the R-help but could not find an archive addressing the
following. I would like to convert a character to numeric after reading a
file with RDS extension. After using as.numeric, I checked if it is
numeric. It was not converted. Please help.
Here is my code
>Report <- readRDS(file="RDS/Report.RDS")
> Report[1:2,]
dive_id date
2007 May 02
2
NAs introduced by coercion in dist()
I work with Windows and use R version 2.4.1. I am JUST starting to learn this
program...
I get this warning message 'NAs introduced by coercion' while trying to
build a distance matrix (to be analyzed with NMDS later) from a 336 x 100
data matrix. The original matrix has lots of zeros and no missing values,
but I don't think this should matter.
I searched this forum and people have
2013 Jan 07
1
Changing mtext direction, or using text for the margin?
Hi all,
I have read through the archives, but can't find a solution to this problem.
I need the text direction on "dependent B", plotted in margin 4, to go
top to bottom (opposite what it is now). Here's some sample code:
#plot with mtext example
par(mgp = c(2,1,0), mfrow=c(2,2), las=1, mar=c(2,2,2,2), omi=
c(0.5,0.2,0,0.2))
a<-1:10
b<-7:16
c<-21:30
plot(a~b,
2008 Mar 24
1
Running rpy produces the error message undefined symbol: KillAllDevices
Hello All,
I've been using R for a while and decided to test R from the svn trunk. I
know that trunk is not stable, but I wanted to see if I can install and run
the latest rpy on my Ubuntu 7.10 box. It installed ok, but I got the
runtime error message:
$ python
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type
1999 May 07
1
using text() to write into left margin
In version 0.63.0 for Win95, I can use text() to
write into the left margin (to the left of the axis)
as follows:
> plot(0:10,0:10,pch="+")
> text(c(1,0.5,0,-0.5,-1),1,"O")
I see 5 "O" symbols at the expected position, two of
which are left of the left axis.
However, in version 0.64.0 for Solaris 2.5.1 on a
Sparc/Ultra2, I only see three "O"
2006 Jun 15
1
How to change the margin widths in png-plots?
Hello,
I have tried to change the margin widths so that mtext (here "sd of
consecutive pc intervals", look at the picture) and
plot(...,xlab="bar") fits to the picture.
Here is an example:
http://users.utu.fi/attenka/margins.png
This doesn't help:
par(mar=c(5.1, 7.1, 4.1, 2.1))
And here are the commands:
png(filename="/Users/kone/Vaitostutkimus/Pictures/
2012 Apr 10
1
Rotating margin text
R 2.14.1
OS X
Colleagues,
I am making a graphic with two y-axes. I create the label for the right-side axis with:
mtext(side=4, line=1, "Some text")
The label is rotated 90° counterclockwise. I would prefer that it be rotated 90° clockwise. However, srt is not supported for mtext and las does not offer this option. Is there some other means to rotate the text string?
Thanks in
2012 Feb 07
1
Problem with plotting a square 1 x 3 plot and placement of outer margin text
Dear R-helpers,
Please see the attached plot.
The problem is that I have too much space between the x-axis label
(which is mtext in an outer margin) and the plots.
My par settings for this plot are:
>par(mfrow=c(1,3),oma=c(2,2,2,2),mar=c(5.1,4.1,4.1,2.1),pty="s")
>#here is the code that produces the three plots, which I have deleted for simplicity
>mtext("Log Wetland