similar to: checking whether a file is empty

Displaying 20 results from an estimated 10000 matches similar to: "checking whether a file is empty"

2001 Feb 24
5
testing for integer
Dear People, Consider the following fragment of R code choose <- function(n,r) { if( is.integer(n) && is.integer(r) && n > 0 && r >= 0 ) { .C("choose",as.double(n),as.double(r),comb = double(1))$comb } else stop("n must be a positive integer and r a non-negative integer.") } This is a practice function (n choose r), which I
2003 Apr 29
4
thick plot lines
Dear People, In a qqplot I am doing, I get lines/points that are very thick. I've tried setting the lwd variable to 0.1, but it doesn't seem to have any effect. Also, I have set the value of lty to dashed, but I still get dots. The command looks like qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,theta,pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta),
2008 Aug 06
3
subsetting with column name as string
Hi, Consider the following > x = c(1,2) > y = c(3,4) > d = data.frame(cbind(x,y)) > d$x [1] 1 2 > d$"x" [1] 1 2 > > foo = function(val) + { + return(d$val) + } > > bar = function() + { + return(d$"x") + } > > foo("x") NULL > bar() [1] 1 2 I'm a little surprised that R accepts both the form d$x and d$"x", but
2001 Sep 23
1
plot with no tick marks
Dear R people, I have the following simple bit of code to make a plot. I want to suppress tick marks on the axes of the plot. I've been trying everything I can think of to do so, but have been unsuccessful. Can you help me? If you reply, please cc me, I'm not currently subscribed to the list. Thanks in advance. Sincerely, Faheem Mitha. num <- 1:i inc
2001 Mar 14
2
concatenating lists
Dear People, I have been trying to perform concatenation operations on lists without success. Consider the following example. > x <- runif(2) > y <- runif(2) > z <- runif(2) > xy <- list(x,y) > xyz <- list(x,y,z) I want to have a function foo such that foo(xy,z) is the same as xyz. This appears not to be as easy as I thought, though there must be a way. For example
2003 Mar 16
1
R CMD SHLIB uses foo.c instead of foo.cc if both are present (PR#2644)
Full_Name: Faheem Mitha Version: 1.6.2 OS: Debian GNU/Linux Submission from: (NULL) (209.42.199.193) Suppose you are making a shared library using R CMD SHLIB foo.cc If there is a file called foo.c in the same directory, then it will be used instead. faheem ~/scratch/r-base>R CMD SHLIB foo.cc gcc-3.0 -I/usr/lib/R/include -D__NO_MATH_INLINES -mieee-fp -fPIC -g -O2 -c foo.c -o foo.o
2001 Nov 17
2
choosing g/g++ compiler executable in R CMD SHLIB
Dear People, After considerable effort, I managed to install gcc-3.0 on my Debian system. However, Debian keeps gcc-2.95 around as the default compiler, and gcc, g++ point to the 2.95 version. The 3.0 versions need to be explicitly invoked as gcc-3.0, g++-3.0 etc. How can I get R CMD SHLIB to invoke gcc-3.0 instead of gcc and g++-3.0 instead of g++? I would like this to be done by default but
2001 Feb 06
2
barplots with pictex
Dear R People, I want to include a barplot corresponding to a simple discrete probability distribution in a LaTeX document. I decided to use the pictex driver. After a certain amount of messing about, I came up the stuff below. It does not look too bad, however, there is one very obvious piece of weirdness, ie. the y axis terminates at 0.1 and does not extend down further. I tried to adjust this
2001 Oct 18
1
rsync logging and permission problems
Dear rsync people, I have just started using rsync for backups. I have had a couple of issues. Note I'm trying to use rsync as user using ssh between two machines both running Debian GNU/Linux potato (2.2r3). The local machine is currently running 2.4.6-1 and the remote 2.3.2-1.2. 1) When I run rsync with the vv option, stuff scrolls of my screen faster than I can read it. I was wondering if
2000 Mar 31
2
linear models
Dear R users, I have a couple of linear model related questions. 1) How do I produce a fixed effect linear model using lme? I saw somewhere (this may be Splus documentation since I use Splus and R interchangeably) that using lme(...,random= ~ -1 | groups,...) works, but it gives the same as lme(...,random= ~ 1 | groups,...), ie. fits a random effect intercept term. The reason why I want to do
2001 Feb 07
1
Re: failed rpm installation of R 1.2-1 (fwd)
On Wed, 7 Feb 2001, Faheem Mitha wrote: > Dear Albrecht, > > Just sent the following message out to r-help. Have you any idea what this > problem could be? > > Sincerely, Faheem Mitha. > > ---------- Forwarded message ---------- > Date: Wed, 7 Feb 2001 00:04:35 -0500 (EST) > From: Faheem Mitha <faheem at email.unc.edu> > To:
2002 Jul 24
1
loading compiled C++ code as shared library
Dear People, Over the last few days I've been writing C++ to compile as a shared library (previously I have always used C). Not entirely to my surprise, I am getting errors. Specifically, when I try to load the shared library, I get Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "/home/faheem/research/thesis/sim/ms/ms.so":
2011 Jun 26
2
does rsync not preserve directory mtimes?
Hi, I'm running the following command as a local copy command. faheem at bulldog:/mnt/data$ sudo rsync -abvz --super /data/ . Origin directory faheem at bulldog:/data$ ls -la total 28 drwxr-xr-x 7 root root 4096 Jun 26 08:34 . drwxr-xr-x 25 root root 4096 Apr 13 17:09 .. drwxr-xr-x 2 owzar001 root 4096 Nov 6 2010 CTS drwxr-xr-x 2 owzar001 owzar001 4096 Aug 27 2010
2001 Feb 08
4
eps file not positioned properly in latex document
Dear People, I am trying to include a barplot (see code below), in a latex document. However, the plot appears in totally the wrong position. I know this is not an R question as such, but the eps file is produced by R and I thought that perhaps other people had had similar problems and could give me pointers. Am I doing anything obviously wrong? Sincerely, Faheem Mitha. PS.
2000 Apr 20
2
removing NA values from data frame & identification function
Dear people, 1) I have a data frame with named columns.For concreteness, let us say that I created a data frame from the vectors fee, fi fo, fum by giant.df <- cbind(fee, fi, fo, fum) Now, some of the entries in fee, fi fo fum are NAs. I want to remove any row which contains a NA, thus creating a new, smaller data frame, with the same column names. This seems like something people would need
2002 Jan 14
1
trouble using R Mathlib as standalone
Dear People, I am trying to use R's Math library as standalone, as documented in /src/nmath/standalone. I am using C++ in Debian testing, and the versions are as follows: ii g++-3.0 3.0.3-1 The GNU C++ compiler. ii r-mathlib 1.4.0-1 `GNU S' - Standalone R math library I have a file (rand.cc) as follows. I don't think that lattice.hh or mh.hh are very
2002 Jun 13
1
using MAKEFLAGS in compiling C code as a shared library using R CMD SHLIB
Dear R People, in the R FAQ (in the R Programming section) it says ********************************************************************** How can I change compilation flags? =================================== Suppose you have C code file for dynloading into R, but you want to use `R CMD SHLIB' with compilation flags other than the default ones (which were determined when R was built).
2000 May 04
2
alas, no vecnorm
I wanted a function that would give the euclidean distance of a vector. Then I was happy, because I found vecnorm listed on pg 55 of V&R (3rd edn) which I had just bought today. Then I was sad, because R did not have vecnorm. Then I was happy again, because I bethought myself that I could copy the function vecnorm from splus to my code. Then I was sad again because R complained >
2008 Nov 17
1
R ORM?
Hi, Does anyone know of an R ORM (Object Relational Mapper)? I'm thinking of something similar to sqlalchemy (http://www.sqlalchemy.org/). Alternatively or additionally, can people offer suggestions about managing relational databases from R. I'm currently using postgresql, but would like a flexible solution that works across different databases, hence the enquiry about ORMs. Please
2000 Sep 13
1
Kerberos/AFS options in ssh/sshd while disabling them in configure
Dear OpenSSH developers, Hello, I strongly support this suggestion ie. adding the sentence "This option has been disabled at compile time" as appropriate. It would be even more helpful if you said how to enable it (krb) at compile time. Remember, this is the only documentation available. I spent some time wondering about this before searching the archives. Ok, while we are on the