Displaying 20 results from an estimated 52 matches for "raw_data".
2012 May 21
3
Replace a variable by its value
I have a dataset called "raw-data" . I am trying to use the following code -
col_name<-names(raw_data)
for (i in 1:(length(names(raw_data))-2))
{
tbl=table(raw_data$Pay.Late.Dummy, raw_data$col_name[i])
chisqtest<-chisq.test(tbl)
}
Say the 1st column of my raw_data is Column1. The idea is when i=1 then
raw_data$col_name[i] will automatically become raw_data$Column1 , which is
not happen...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...ibswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 612b52b..6d15e27 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -122,9 +122,7 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco
} else {
image->jpegtables = swfdec_buffer_ref (s->jpegtables);
}
- image->raw_data = swfdec_buffer_ref (bits->buffer);
-
- bits->ptr += bits->buffer->length - 2;
+ image->raw_data = swfdec_bits_get_buffer (bits, -1);
return SWFDEC_STATUS_OK;
}
@@ -146,14 +144,14 @@ swfdec_image_jpeg_load (SwfdecImage *ima
jpeg_decoder_addbits (dec, image->jpegtables...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...ibswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 612b52b..6d15e27 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -122,9 +122,7 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco
} else {
image->jpegtables = swfdec_buffer_ref (s->jpegtables);
}
- image->raw_data = swfdec_buffer_ref (bits->buffer);
-
- bits->ptr += bits->buffer->length - 2;
+ image->raw_data = swfdec_bits_get_buffer (bits, -1);
return SWFDEC_STATUS_OK;
}
@@ -146,14 +144,14 @@ swfdec_image_jpeg_load (SwfdecImage *ima
jpeg_decoder_addbits (dec, image->jpegtables...
2007 Mar 21
0
5 commits - README libswfdec/jpeg libswfdec/swfdec_image.c
...ERROR("not jpeg %02x %02x",
+ image->jpegtables->data[0], image->jpegtables->data[1]);
+ jpeg_decoder_free (dec);
+ return;
+ }
+ jpeg_decoder_addbits (dec, image->jpegtables->data,
+ image->jpegtables->length);
+ }
+ if (image->raw_data->data[2] != 0xff || image->raw_data->data[3] != 0xd8) {
+ SWFDEC_ERROR("not jpeg %02x %02x",
+ image->raw_data->data[2], image->raw_data->data[3]);
+ jpeg_decoder_free (dec);
+ return;
+ }
jpeg_decoder_addbits (dec, image->raw_data->data + 2,...
2009 Jul 29
3
how to skip a numeric column for averaging other columns?
Data has the first row for variable name and the first column for sample
name. I want to take "Log" for all data, but how to compute without the
first column for sample name.
That is,
column 1: sample ID
column 2-10: data
I want to find an average on each column (2-10)
> apply(raw_data,2,mean)
Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, :
non-numeric variable in data frame: sample_id
Thank you in advance,
Jin
--
View this message in context: http://www.nabble.com/how-to-skip-a-numeric-column-for-averaging-other-columns--tp24723210p24723210.html...
2013 Apr 16
4
Singular design matrix in rq
...ggers:
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, ...) : Singular design matrix
Any ideas what might be causing this or, more importantly, suggestions for
how to solve this? I'm just trying to fit a smoothed hull to the top of
the data cloud (hence the large df).
T...
2011 Aug 01
2
Errors, driving me nuts
...hese files are in many different
directories so I want a way filter out the junk... Anyway I don't
believe that this is related to my errors but I mention it none the
less.
> files_to_test <- list.files (pattern = "kegg.combine")
> for (i in 1:length (files_to_test)) {
+ raw_data <- read.table (files_to_test[i], header=TRUE, sep=" ")
+ tmpA <- raw_data[,compareA]
+ tmpB <- raw_data[,compareB]
+ tt <- t.test (tmpA, tmpB, var.equal=TRUE)
+ tt_pvalue[i] <- tt$p.value
+ }
Error in tt_pvalue[i] <- tt$p.value : object 'tt_pvalue' no...
2010 Jul 02
0
Powercom driver patch
...com users on the official support forum (
http://forum.pcm.ru ).
I suppose the problem concerns models with serial-over-usb connection
implemented via cypress_m8 chip (ID 0d9f:0002), e.g. IMD-865AP USB,
BNT-1000AP USB, etc. (these are on sale everywhere in Russia). The
thing is that such UPS sends raw_data[UPSVERSION]==0xFF like
"Imperial" series and simultaneously raw_data[MODELNAME]==0x4B like
"KING" series (the explanation is proposed here -
http://forum.pcm.ru/viewtopic.php?p=3401&sid=462a66a8272fea06e38be9c58e8c28f3#p3401
and here - http://forum.pcm.ru/viewtopic.php?p=732...
2009 Nov 30
1
RSQLite does not read very large values correctly
...close
1 2009-11-25 29467907000
2 2009-11-25 29467907000
3 2009-11-25 29467907000
Now I run this R Code:
> library("DBI")
> library("RSQLite")
>
> # DB Connection
> con <- dbConnect(dbDriver("SQLite"), "C:/Temp/TickDB01.db")
> raw_Data <- dbGetQuery(con, "SELECT OrderID, Day, TimeToClose FROM
Tr_TickData WHERE OrderID in (1,2,3)")
> raw_Data
OrderID Day TimeToClose
1 1 2009-11-25 -596864072
2 2 2009-11-25 -596864072
3 3 2009-11-25 -596864072
The values are totally wrong... Is it be...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...length)
+ return CAIRO_STATUS_READ_ERROR;
+
+ memcpy (data, ptr, length);
+ return CAIRO_STATUS_SUCCESS;
+}
+
static void
swfdec_image_png_load (SwfdecImage *image)
{
- SWFDEC_ERROR ("implement loading PNG images");
+ SwfdecBits bits;
+
+ swfdec_bits_init (&bits, image->raw_data);
+ image->surface = cairo_image_surface_create_from_png_stream (
+ swfdec_image_png_read, &bits);
}
cairo_surface_t *
commit c13bbaaf453acdab1f5189990fe2ff91ed887bc8
Author: Benjamin Otte <otte at gnome.org>
Date: Sun Nov 11 00:15:38 2007 +0100
get rid of rowstride an...
2013 Apr 08
0
Maximum likelihood estimation of ARMA(1,1)-GARCH(1,1)
...ver time.
# We can extend the GARCH(1,1) volatility model to a variety of
alternative specifications to capture the potential asymmetry for a
better comparison:
# GARCH(1,1), EGARCH(1,1), NGARCH(1,1), and TGARCH(1,1).
options(scipen=10)
intel= read.csv(file="intel.csv")
summary(intel)
raw_data= as.matrix(intel$logret)
library(fGarch)
garchFit(~arma(1,1)+garch(1,1), data=raw_data, trace=FALSE)
negative_log_likelihood_arma11_garch11=
function(theta, data)
{mean =theta[1]
delta=theta[2]
gamma=theta[3]
omega=theta[4]
alpha=theta[5]
beta= theta[6]
r= ts(data)
n= length(r)
u= vect...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...r *endptr;
-
- endptr = bits->ptr + bits->buffer->length;
id = swfdec_bits_get_u16 (bits);
SWFDEC_LOG (" id = %d", id);
@@ -292,9 +273,7 @@ tag_func_define_bits_jpeg_3 (SwfdecSwfDe
return SWFDEC_STATUS_OK;
image->type = SWFDEC_IMAGE_TYPE_JPEG3;
- image->raw_data = swfdec_buffer_ref (bits->buffer);
-
- bits->ptr += bits->buffer->length - 2;
+ image->raw_data = swfdec_bits_get_buffer (bits, -1);
return SWFDEC_STATUS_OK;
}
@@ -306,21 +285,20 @@ swfdec_image_jpeg3_load (SwfdecImage *im
unsigned char *image_data;
unsigned char *alph...
2007 Jul 27
5
File.stub!
...;' do
class FooDouble #:nodoc:
attr_reader :data
def initialize
@data = []
end
def method_missing( name, *args )
puts "ignoring call to #{name} with args [#{args.each |arg|
arg.inspect}]"
end
def <<(raw_data)
@data.push raw_data
end
end
before :all do
Foo.stub!( :open ).and_return( FooDouble.new )
#have also tried and_return { FooDouble.new }
end
...
end
2009 Jul 14
2
How to provide list as an argument for the data.frame()
Hi R -users,
i've a table as describe below. I'm reading the numeric value presented in this table to populate a list.
#table
#============
#X A B C
#x1 2 3 4
#x2 5 7 10
#x4 2 3 5
#============
rawData <- read.table("raw_data.txt",header=T, sep="\t")
myList=list()
counter=0
for (i in c(1:length(rawData$X)))
{
print (i)
myList[counter <- counter +1]=as.numeric(rawData$A[i]);
myList[counter <- counter +1]=as.numeric(rawData$B[i]);
myList[counter <- counter +1]=as.numeric(rawData$C[i...
2018 Jan 15
5
barplot that displays sums of values of 2 y colums grouped by different variables
...g plot should have city as the x-axis, 2 bars per city, 1
representing the sum of "n" in that city, the other the sum of "y" in
that city.
If possible also show the sum in each bar as a label?
I aggregated the data into sums like this:
sum_data <- aggregate(. ~ City,data=raw_data,sum)
this gave me the sums per city as I wanted but for some reason 1 of the
cities is missing in the output.
Using this code for the plot:
ggplot(sum_data,aes(x = City,y = n)) + geom_bar(aes(fill = y),stat =
"identity",position = "dodge")
gave be a bar plot with one bar p...
2013 Jan 22
6
plot two time series with different length and different starting point in one figure.
Hello,
I do have two different time series A and B, they are different in length and starting point. A starts in Jan, 2012 and ends in Dec, 2012 and B starts in March, 2012 and ends in Nov, 2012.
How can I plot those two series A and B in the same plot? I.E., from Jan. 2012 - Feb, 2012, it would have one data point from A and from Mar, 2012-Nov, 2012, it would have two data points from A and B,
2005 Jan 04
0
[2.6 patch] smbfs: make some functions static
...ions smb_dir_operations;
@@ -62,7 +60,6 @@
extern void smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr);
extern void smb_invalidate_inodes(struct smb_sb_info *server);
extern int smb_revalidate_inode(struct dentry *dentry);
-extern int smb_fill_super(struct super_block *sb, void *raw_data, int silent);
extern int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
extern int smb_notify_change(struct dentry *dentry, struct iattr *attr);
/* file.c */
@@ -81,10 +78,8 @@
extern int smb_init_request_cache(void);
extern void smb_destroy_request_cache(void);...
2010 Jul 08
2
random sample from arrays
...28757
5 A_184 3.574271 4.680859 4.517047 4.047096 3.623668 3.021356
3.559434 3.156093 4.308437 4.045098
6 A_199 7.593952 7.454087 7.513013 7.449552 7.345718 7.367068
7.410085 7.022582 7.668616 7.953706
...
I tried to do it with a for loop:
genelist <- read.delim("/user/R/raw_data.txt")
rownames(genelist) <- genelist[,1]
genes <- rownames(genelist)
x <- 1:40000
set <- matrix(nrow = 50, ncol = 11)
for(i in c(1:50)){
set[i] <-sample(x,50)
print(c(i,"->", set), quote = FALSE)
}
which basically do the trick, but I just can't sa...
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
..., 2 bars per city, 1
> representing the sum of "n" in that city, the other the sum of "y" in that
> city.
>
> If possible also show the sum in each bar as a label?
>
> I aggregated the data into sums like this:
>
> sum_data <- aggregate(. ~ City,data=raw_data,sum)
>
> this gave me the sums per city as I wanted but for some reason 1 of the
> cities is missing in the output.
>
> Using this code for the plot:
>
> ggplot(sum_data,aes(x = City,y = n)) + geom_bar(aes(fill = y),stat =
> "identity",position = "dodge"...
2011 Aug 23
1
NA in last row while reading xlsx file
Hi,
I am using this script to read a xlsx file to a data frame:
library(xlsx)
File <- file.path("d:", "car ", "car95-99.xlsx")
B_car <- read.xlsx(File, "raw_data")
Car2x <- data.frame(month = B_car$Date,Ch = B_car$Ch.des,
lat=B_car$Latitude)
The last row in the data.frame is always NA, how can I remove it?
Thx.
--
View this message in context: http://r.789695.n4.nabble.com/NA-in-last-row-while-reading-xlsx-file-tp3762119p3762119.html
Sent fr...