Displaying 20 results from an estimated 5000 matches similar to: "read.table: fill=T for header?"
2011 Apr 08
3
xyplot, groups and colors
Dear ExpeRts,
I am trying to plot a bunch of growth curves and would like to get
some more control over groups and line colors than I seem to have.
Example:
# make some data
dat <- Orange
dat$group <- ifelse(dat$Tree%in%c('1','4','5'), 'A', 'B')
# plot
xyplot(circumference~age, dat, groups=group)
# now use lines to make the growth curve more
2010 Aug 27
3
predict.loess and NA/NaN values
Hi!
In a current project, I am fitting loess models to subsets of data in
order to use the loess predicitons for normalization (similar to what
is done in many microarray analyses). While working on this I ran into
a problem when I tried to predict from the loess models and the data
contained NAs or NaNs. I tracked down the problem to the fact that
predict.loess will not return a value at all
2003 May 28
1
Zero is not zero
Hello, There:
I read data from tab-delimted text file(1888.txt) in C:/temp, which has
thousands rows and 80 colulms, using read.delim("C:/temp/1888.txt"). when I
retrieved the numeric coulum which has real zero values and applies R buid-in
function such as mean( ), sum() and got a result of NA. It seems that R (R
1.6.2 in windows) considers zero as missing value (NA). Thus my
2000 Mar 17
4
lag (PR#491)
Full_Name: Hannu Kahra
Version: 1.0.0
OS: Windows
Submission from: (NULL) (153.1.50.127)
x1 <- lag(x, k=1) returns the original series x. The time series is not
shiftet at all. Only the time is shiftet: for x1 new start = old start -1
and new end = old end -1. When I run, e.g. lm(x~x1) the result is not what
I expect. Both x and x1 are time series. Is this a bug or am I forgetting
something?
2008 Jun 13
2
Importing data with different delimters
All,
I have a data file with 56 entries that looks like this:
City State JanTemp Lat Long
Mobile, AL 44 31.2 88.5
Montgomery, AL 38 32.9 86.8
Phoenix, AZ 35 33.6 112.5
Little Rock, AR 31 35.4 92.8
Los Angeles, CA 47 34.3 118.7
San Francisco, CA 42 38.4 123.0
I would like to "read" this data into a dataframe. Is it possible to
do without editing the datafile?
D.
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
2005 Feb 03
1
filling a string buffer in a C routine
I am trying to write a C function that reads lines from a file and
passes them back to R.
Here is a simplified version:
--- C code ---
#include <R.h>
void read_file(char **filename, char **buf, char **buflen) {
FILE *infile;
infile = fopen(*filename, "r");
fgets(*buf, *buflen, infile);
fclose(infile);
}
--- R code ---
buffer = "xxxxxxxxxx" #
2006 Sep 13
2
recursive methods for concatenating sets of files
Hello,
I would like to read sets of files within a folder, perhaps using recursive
methods.
Right now, I rename the files before import.
It would be even better to do this without renaming files, without providing
explicit filenames, perhaps by importing files based on chronology,
and translating each filename into a header?
Please excuse my ignorance, and help cure my clunky programming
2003 Aug 25
6
Syncronize Monitored Calls
I thought I would post this in case it might be of any use to anyone.
Not anything special but it does work. Keep in mind you need sox and
wmix.
Here is some relevant exerpts of my extensions.conf using John Todds
macro.
[globals]
CALLFILENAME=foo
FOO=foo
CALLERIDNUM=foo
[default]
exten => 287,1,Macro(dial,SIP/agent20002|20)
exten => 287,2,Voicemail(u287)
exten =>
2011 Aug 24
1
[PATCH] febootstrap-supermin-helper: Replace objcopy call for embedding init binary
objcopy needs "output-target" and "binary-architecture" parameters
which makes it necessary to keep a list of known architectures.
The bin2s.pl script generates input for the GNU assembler which should
produce an object file that is equivalent to that produced by objcopy.
I have successfully tested the change on an amd64 Debian/unstable system.
---
helper/Makefile.am |
2009 Feb 05
3
subset problem (reducing from six to two levels)
Hi all,
I have got a seemingly simple problem (I am an R starter) with subsetting my
data set, but cannot figure out the solution: I want to subset a data set
from six to two levels, so that all analyses are done only with these two
remaining levels.
I tried
TOTAL<-read.delim('total.csv',header=T)
SUBSET.OF.TOTAL<-subset(TOTAL, FactorX %in% c("Level1","Level2"))
2010 Dec 09
4
lapply getting names of the list
Hello All,
I have a toy dataframe like this. It has 8 columns separated by tab.
Name SampleID Al1 Al2 X Y R Th
rs191191 A1 A B 0.999 0.09 0.78 0.090
abc928291 A1 B J 0.3838 0.3839 0.028 0.888
abcnab A1 H K 0.3939 0.939 0.3939 0.77
rx82922 B1 J K 0.3838 0.393
2008 Nov 05
3
Efficient way to fill a matrix
Dear R experts,
Suppose I have a data frame of three variables:
> foo <- data.frame(row=1:5, col=1:3, val=rnorm(15))
> foo
row col val
1 1 1 -1.00631642
2 2 2 0.77715344
3 3 3 0.17358793
4 4 1 -1.67226988
5 5 2 1.08218836
6 1 3 1.32961329
7 2 1 -0.51186267
8 3 2 -1.20990127
9 4 3 -0.57786899
10 5 1 0.67102887
11 1 2
2012 Mar 28
2
getopt does not work as expected!
I have the following script (also attached):
#!/usr/bin/Rscript
spec=matrix(c(
'verbose', 'v', 1, "integer",
'help' , 'h', 0, "logical"
),ncol=4, byrow=TRUE)
spec.dim=dim(spec)
spec.opt.long=spec[,1]
spec.opt.short=spec[,2]
spec.opt.l <- spec.dim[1]
infile <- "test.dat"
args=commandArgs(TRUE); l=length(args)
self =
2010 Jun 30
1
What is wrong with this code?
Here it is:
read.inputs<-function(infile) {
for (counter in 1:length(input.list)) {
seek(infile,where=0,origin='start')
newline<-readLines(infile,n=1)
while(length(newline)>0) {
if(!is.na(grep(as.character(input.list[[counter]][1]),newline)[1])) {
break
}
newline<-readLines(infile,n=1)
}
if (length(newline)>0)
2004 Aug 06
2
decode in ppc 2003
Hi all,
Please a moment to look my source code, this is very similar to example of
the documentation. I added FIXED_POINT flag. My source code compile and
build but not decode correctly (the error may be in the while). I work with
eVC 4.0 and pocket pc 2003. Someone know what is the error?
Thanks.
Rodrigo.
#include "speex.h"
#define FRAME_SIZE 160
void CPlayerDlg::OnButton3()
{
2012 Feb 08
2
Problems reading tab-delim files using read.table and read.delim
Hello,
I used read.xlsx to read in Excel files but for large files it turned out to
be not very efficient.
For that reason I use a programme which writes each sheet in an Excel file
into tab-delim txt files.
After that I tried using read.table and read.delim to read in those txt
files. Unfortunately, the results
are not as expected. To show you what I mean I created a tiny Excel sheet
with some
2012 Oct 27
2
Getting error while running unix commands within R using system() function
Hello All,
I use Cygwin ( unix on windows) heavily for all my text data processing.
Also use Cygwin inbuilt *R* to do numerical processing.
*My aim is to integrate R and unix commands to avoid heavy memory usage that
R takes normally.*
I can run many unix commands using system("some unix command or sh script.sh
or even R file itself ") inside R.
But, When I tried to run the command
2018 Jan 09
2
isolinux.bin checksum
Hi,
i think i found a suspect in lzo/prepcore.c and it would indeed be a
wrong range of checksumming (speculative congratulations to Ady).
Looking at
http://repo.or.cz/syslinux.git/blob/0d82b71304d596d80f3c4520f9dcf90048ca50b7:/lzo/prepcore.c
it seems that this change in line 374 could yield correct checksums:
unsigned int ptr;
- for (ptr = 64; ptr < offset; ptr += 4)
+
2005 Feb 19
1
a possible bug in 1.1.6
Hello Speex,
I think I've noticed a bug in version 1.1.6.
In the source file "speexdec.c", lines 558 to 560 say
wav_format = strlen(outFile)>=4 && (
strcmp(outFile+strlen(outFile)-4,".wav")==0
|| strcmp(inFile+strlen(inFile)-4,".WAV")==0);
. I think each