Displaying 20 results from an estimated 4000 matches similar to: "Problems with numeric variable containing ? values"
2005 Aug 13
1
Problem with numeric variable
Hello all,
I posted a question some days ago without getting any answers,
perhaps, as one of you kindly pointed out, because the
question was not clearly stated. Let me reformulate it:
In a frame, a column named C2 represents a numeric variable
(checked with is.numeric(C2)). Some rows in the frame have an
undefined value for C2, represented in the table by a ? sign.
The remaining rows have
2005 Jul 15
2
pdf() black&white; panel titles in lattice
Hello,
I have two questions:
1. How can I get black and white graphics using the pdf()
device? I have tried pdf(Name.pdf, bg="white", fg"black"), but
I still get full-color graphics.
2. When using lattice, how do I change the title for each
panel? By default it uses the categories of the grouping
factor. I would like to modify the labels in the graphic
without changing
2011 Dec 12
1
Detecting typo in function argument
With some chagrin after spending a couple of hours trying to debug a script, I realized I
had typed in something like
ans<-optimx(start, myfn, mygr, lower<-lo, upper=up)
that is, the "<-" rather than "=". The outcome on my machine was a non-obvious error
several layers deep in the call stack. For info, optim() seems to stop much more quickly.
The error is
2010 Apr 29
1
merged files
Hi,
i have two files (file1.txt and file2.txt) which i would like to merge,
based on certain criteria, i.e.
it combines data based on matching geneID and exons.
i have used the merge option, but it does not give me the desired outcome.
merged.txt shows the result i would like.
*File1. txt*
**
AffyProbe ProbeType Flag GeneSymbol GeneID Exons Chrom Strand Affytart
AffyEnd 1
2013 Mar 21
2
Check if a character vector can be coerced to numeric?
Given an arbitrary set of character vectors:
myvect1 <- c("abc","3","4")
myvect2 <- c("2","3","4")
I would like to develop a function that will convert any vectors that can
be PROPERLY converted to a numeric (myvect2) into a numeric, but leaves
character vectors which cannot be converted (myvect1) alone. Is there any
simple way
2006 Oct 18
3
creating bins for a plot
Hi. I'm trying to plot the ratio of used versus unused bird houses
(coded 1 or 0) versus a continuous environmental gradient (proportion of
urban cover [purban2]) that I would like to convert into bins (0 -
0.25, 0.26 - 0.5, 0.51 - 0.75, 0.76 - 1.0) and I'm not having much luck
figuring this out. I ran a logistic regression and purban2 ends up
driving the probability of a box being
2012 Dec 06
2
Best way to coerce numerical data to a predetermined histogram bin?
Folks:
Say I have a set of histogram breaks:
breaks=c(1:10,15)
# With bin ids:
bin_ids=1:(length(breaks)-1)
# and some data (note that some of it falls outside the breaks:
data=runif(min=1,max=20,n=100)
***
What is the MOST EFFICIENT way to "classify" data into the histogram bins
(return the bin_ids) and, say, return NA if the value falls outside of the
bins.
By classify, I mean
2012 Jan 31
2
question on simple graph
I am having trouble generating a graph.
I want to know the % of respondents who answered that they "strongly
agree" or "agree" the "America owes R's ethnic group a better chance"
(BTTRCHNC) and I want to organize it by racial group (RACESHRT).
"BTTRCHNC" is organized ordinally from 1 through 5 with 1=Strongly
Agree, 5=Strongly Disagree
2013 Apr 16
4
Singular design matrix in rq
Quantreggers:
I'm trying to run rq() on a dataset I posted at:
https://docs.google.com/file/d/0B8Kij67bij_ASUpfcmJ4LTFEUUk/edit?usp=sharing
(it's a 1500kb csv file named "singular.csv") and am getting the following
error:
mydata <- read.csv("singular.csv")
fit_spl <- rq(raw_data[,1] ~ bs(raw_data[,i],df=15),tau=1)
> Error in rq.fit.br(x, y, tau = tau, ...) :
2009 Jul 10
2
error: optim(rho, n2ll.rho, method = method, control = control, beta = parm$beta, : initial value in 'vmmin' is not finite
I am trying to use the lnam autocorrelation model from the SNA package. I have it running for smaller adjacency matrices (<1,500) it works just fine but when my matrices are bigger 4000+. I get the error:
> lnam1_01.adj<- lnam(data01$adopt,x01,ec2001.csr)
Error in optim(rho, n2ll.rho, method = method, control = control, beta = parm$beta, :
initial value in 'vmmin' is not
2013 Jul 12
2
"Proper" way to use a "hidden" function in an R-package?
R-developers:
I'm working on updating my R package "spatial.tools", and one thing I
was wondering was the proper way to have hidden functions -- should I
simply not export them to the namespace and use the ::: operator to
call them (which is what I currently do)?
--j
--
Jonathan A. Greenberg, PhD
Assistant Professor
Global Environmental Analysis and Remote Sensing (GEARS)
2012 May 02
6
Quickest way to make a large "empty" file on disk?
R-helpers:
What would be the absolute fastest way to make a large "empty" file (e.g.
filled with all zeroes) on disk, given a byte size and a given number
number of empty values. I know I can use writeBin, but the "object" in
this case may be far too large to store in main memory. I'm asking because
I'm going to use this file in conjunction with mmap to do parallel
2000 Mar 23
0
Man pages ...
Hi all.
I can't read the openssh man pages on Solaris. I tried all the nroff
macro packages I could find, with more or less garbled success.
Could someone point me to versions suitable for Solaris, or a man2sgml
converter? Or to a good online tutorial covering this issue
(SysV vs. BSD?) that would allow me to translate the nroff dialects
involved? In the latter case, I would of course
2004 Dec 08
2
what about a mascot ?
My friend Veslot proposed me the Raven !
http://www.teteamodeler.com/allopass/images/corbeau.jpg
As a matter of fact the intelligence of this bird is
comparable to one of a monkey, although its brain is close to
a reptile brain. R is quite the same : small, compact, but so
clever.
This is a canadian website explaining (in french) the R-aven
intelligence
2009 Apr 29
0
what happens if a function removes an external (global) variable ?
My program consists of a number of functions and a main script.
It loops through many time series analyzing one at a time.
I have declared a number of arrays and scalar variables in the main script namespace (using C++ terminology)
because those data structures ar shared by many functions.
let say "XX" is he name of a global array. I wonder what happens in the following cases:
1. a
2010 Apr 29
0
merge on criteria
Hi,
i have two files (file1.txt and file2.txt) which i would like to merge,
based on certain criteria, i.e.
it combines data based on matching geneID and exons.
i have used the merge option, but it does not give me the desired outcome.
merged.txt shows the result i would like.
*File1. txt*
**
AffyProbe ProbeType Flag GeneSymbol GeneID Exons Chrom Strand Affytart
AffyEnd 1
2015 Nov 01
0
Luxury watches for best. Rolex, etc
Buy your watch?here- http://goo.gl/V0XKLA
fhc wnv umt qviyz v tvh
i tg rexvc w enfk scxpf
hlrg kq ae jok wnz jar
t bfktm ppt xyqa oh gam
aq qzjgr zcn ci rx c
jshv nq whl e tnu flb
y tsgdu f ocot uczs x
xw r gsij x ozw q
esz hzk bcbwm gi c pp
lhv efrh hsr yjw tun hs
jcair nxbui k wb gbgqr mvfqj
y c t rvxpe t x
vmeqd a d mw ae bpp
jumbj o iqech mqy l e
gc lucr zdp xcnyy syfs nzti
xr
2007 Mar 12
4
R for copying and pasting selected image files?
Hello,
I would like to use R to process a list of text strings. The text
strings are filenames, encoding experimental settings. Based on the
information in there I'd like to select certain files and copy only
the selected files to another directory.
The files are images and there is no need, actually no desire, to
open them. Is there a way to use R for copying and pasting files with
any
2007 Sep 17
2
removing a specific number of digist from a character string
Hello,
I would like to remove the last 8 digists of character strings in a
vector. Below I added a couple of elements from that vector.
I have a problem defining a pattern to replace the digits using for
example "sub". Removing the ".tif" part works fine using
sub('.tif',"",x), but how do I get rid of the four preceding digits?
Thanks for your help,
Kim
2013 Jan 22
2
Adding a line to barchart
R-helpers:
I need a quick help with the following graph (I'm a lattice newbie):
require("lattice")
npp=1:5
names(npp)=c("A","B","C","D","E")
barchart(npp,origin=0,box.width=1)
# What I want to do, is add a single vertical line positioned at x = 2 that
lays over the bars (say, using a dotted line). How do I go about doing
this?