Displaying 20 results from an estimated 2000 matches similar to: "paste and NAs"
2003 Oct 31
4
Array Dimension Names
I would like to reference array dimensions by name in an apply and a summary
function. For example:
apply(x, "workers", sum)
Is there a better way to do this than creating a new attribute for the array
and then creating new methods for apply and summary? I don't want to name
the individual elements of each dimension (such as with dimnames) but rather
name the dimensions. Thanks
2003 Jun 09
2
ESRI shapefiles and EMME/2 packages
I just uploaded two packages to CRAN.
shapefiles_0.1.tar.gz - functions to read and write ESRI shapefiles
(including dbfs)
emme2_0.1.tar.gz - functions to read binary data from an EMME/2 databank
data (EMME/2 is a transportation modeling program)
Please let me know if you find any bugs or have some suggestions. Thanks.
Regards,
Benjamin Stabler
Transportation Planning Analysis Unit
Oregon
2004 Mar 10
2
Rcmd BATCH command line arguments
I want to run Rcmd BATCH with R_DEFAULT_PACKAGE=base so it doesn't load any
packages, but it seems to reject this argument because it does not start
with a '-' or '--'. Is there a different argument that will work? Thanks.
Benjamin Stabler
Transportation Planning Analysis Unit
Oregon Department of Transportation
555 13th Street NE, Suite 2
Salem, OR 97301 Ph: 503-986-4104
2003 Apr 25
2
Open an r+b file connection on Windows
I am trying to open an existing binary file, seek to a position in the
middle, and then write one byte, while keeping the already existing data
after that byte. It seems to me that I am unable to open a connection to a
binary file in both read and write mode. I can open the "r+b" binary file
connection and seek around, but I can't write to the file. And looking at
the function
2004 Aug 05
1
R interface to Python (in Windows)
I put a copy of R 1.8.1 for Windows on our FTP site at:
ftp://ftp.odot.state.or.us/outgoing/Test/. It should be there for a few
days before it gets deleted.
Benjamin Stabler
Transportation Planning Analysis Unit
Oregon Department of Transportation
555 13th Street NE, Suite 2
Salem, OR 97301 Ph: 503-986-4104
-----Original Message-----
From: Peter Wilkinson [mailto:pwilkinson at videotron.ca]
2003 Jun 02
6
Building an R package under Windows NT
I am trying to build a R 1.7 package under Windows NT. I created the
DESCRIPTION file, the RD file and added the code to the R folder. I also
downloaded and installed the Rtools package and have Perl 5.0. I know that
Perl, Miktex, and gcc are working. I also have my PATH variable set
correctly. I can fake install my package by removing the *.R from the code
file, using Rcmd Rdconv to create
2002 Dec 19
2
list to data.frame
R Help-
I have a list of 102 vectors all of the same type and length called
time.by.orig. I can't data.frame(time.by.orig) but I can
data.frame(time.by.orig[1:length(time.by.orig)]). Why is this? Thanks for
your help.
str(time.by.orig)
List of 102
$ 1 : num [1:102] 1.34 17.39 14.36 14.22 7.56 ...
$ 2 : num [1:102] 17.5 0.7 17.7 12.4 10.4 ...
$ 3 : num [1:102] 14.063 17.568
2004 Mar 08
3
Decision Trees
I am familiar with the rpart and tree packages for classification and
regression trees. However, quite a bit of the research in the
transportation community relating to decision trees uses the C4.5 family of
algorithms by Quinlan. Are there any plans to make a C4.5 (or a derivative
of it) available to R? If not, then I might use the WEKA Java package (
http://www.cs.waikato.ac.nz/ml/weka) that
2003 Sep 17
3
Building and loading a DLL on Windows NT
I am trying to build a simple dll with Rcmd SHLIB to link into R. The
results of the build are below. From my limited knowledge of building DLLs,
it looks like it worked (I didn't get any errors).
F:\R\dlls> Rcmd SHLIB add.C
making add.d from add.C
g++ -IC:/PROGRA~1/R/src/include -Wall -O2 -c add.C -o add.o
ar cr add.a *.o
ranlib add.a
g++ --shared -s -o add.dll add.def add.a
2004 Jan 14
2
R internal data types
I am trying to figure out R data types and/or storage mode. For example:
> #From a clean workspace
> gc()
used (Mb) gc trigger (Mb)
Ncells 415227 11.1 597831 16
Vcells 103533 0.8 786432 6
> x <- seq(0,100000,1)
> is.integer(x)
[1] FALSE
> is.double(x)
[1] TRUE
> object.size(x)
[1] 800036
> gc()
used (Mb) gc trigger (Mb)
Ncells 415247
2004 Feb 26
1
writing polygons/segments to shapefiles (.shp) or other A rcGIS compatible file
The main limitation of the shapefiles package that I put together is that it
does not create shapefiles from R objects - rather it only writes shapefiles
that have been read into R and manipulated within the constraints of the
existing file structure. By this I mean that for example you can change the
coordinates of points and write them back out. Or you can add a bunch of
blank columns in the
2003 Feb 13
5
ESRI shape file import and time-space models
Dear R user,
I am running R under Windows 2000.
I am looking for a routine for importing
- shape files (ESRI) into R
- dbase files (FOXPRO) into R
and I am looking for time-space models for description and prediction of
Bernoulli-, Binomial- and Poissonvaraibles.
Thank's a lot for a reply.
Sincerely yours,
Ekkehardt Altpeter
Swiss Federal Office of Public
2002 Oct 04
3
R 1.6 Gui for Windows
I upgraded to R Gui 1.6 this morning and I can't seem to get it to accept my
new startup directory. R 1.51 will accept
"F:\_ben\bls\gen1\results\bls\analysis" as the start in directory for the R
Gui shortcut, but R 1.6 will not. R 1.6 will accept
"F:\_ben\bls\gen1\results\bls". It seems to have trouble when I add
"\analysis." R still loads fine but I get the
2008 Mar 05
3
ipf function in R
Hi
I have a 3 x 2 contingency table:
10 20
30 40
50 60
I want to update the frequencies to new marginal totals:
100 130
40 80 110
I want to use the ipf (iterative proportional fitting) function which
is apparently in the cat package.
Can somebody please advice me how to input this data and invoke ipf in R
to obtain an updated contingency table?
Thanks.
By the way I am quite new to R.
--
Dr
2004 Apr 06
4
how to learn R quickly?
i am new to R,so i post here to ask you how to learn R quickly?
is there some usefull materials about using R.
ps:though the manual is a good materials,but it is not the best for a newbie,i think.
thank you !
2003 Dec 06
7
Windows Memory Issues
Hi all,
I am currently building an application based on R 1.7.1 (+ compiled
C/C++ code + MySql + VB). I am building this application to work on 2
different platforms (Windows XP Professional (500mb memory) and Windows
NT 4.0 with service pack 6 (1gb memory)). This is a very memory
intensive application performing sophisticated operations on "large"
matrices (typically 5000x1500
2003 Sep 25
1
apply on a 4D array
I am trying to multiply a 3D array of 4x4x4 by the 4 3D arrays of a 4D array
with dimensions 4x4x4x4 (the last dimension being the one that I want to
split by).
(4x4x4 array)
> hiaAry
, , a1
i1 i2 i3 i4
h1 9.5936098 6.001040 0.08772 0.3138600
h2 1.2003500 1.454570 2.79248 0.0000000
h3 0.1346500 0.201220 0.39256 0.5464000
h4 0.0109000 0.012270 0.16417 0.2766900
,
2004 Apr 16
7
Turning windows screen buffering on and off
All,
Does anyone know if there is an option I can set to turn screen-buffered
output on and off with the win32 rgui? (Apart from the point and click
method).
I am running some simulations where it is useful to watch output but it
gets mildly tiresome having to manually switch things on and off via the
gui.
Thanks
Toby.
> version
_
platform i386-pc-mingw32
arch
2003 Feb 11
4
How "else" works
I have what is likely to be a simple question about the else keyword.
The usage in the help pages is as follows:
if(cond) cons.expr else alt.expr
I would expect to be able to use it in the following way as well:
if(cond){
cons.expr
}
else alt.expr
This results a syntax error.
Am I doing something wrong, or doesn't R support the spanning of the
combination of if and else
2005 Feb 15
1
Tcl/tk
I am new to R so I apologize if this is a simple question
I have created a tkgrid with a button that, once pushed, will extract the
information from the grid, but I can not figure out the command to save the
entries from my grid.
Any thoughts?
Thanks
Alex Bettinardi
Transportation Analyst
TDD - Planning Section - TPAU
555 13th Street NE, Suite 2
Salem, OR 97301-4178
503.986.4398