search for: data1

Displaying 20 results from an estimated 890 matches for "data1".

Did you mean: data
2007 Feb 27
1
interactions and GAM
...to better undestand my question. in this script the model to fit is (in a GLM-like writing) : y~s(x2):x1 the generated dataset follows this model and y(x2=0)=10 whatever x1. ######################## #start of script ######################## #data construction (with deliberately very small noise) data1=data.frame(x1=rep(NA,27),x2=NA,y=NA) data1$x1=factor(c(rep(1,11),rep(2,11),rep(3,5))) data1$x2=c(rep(0:10,2),0:4) data1[data1$x1==1,"y"]=data1[data1$x1==1,"x2"]^4*5+rnorm(11)+10000 data1[data1$x1==2,"y"]=data1[data1$x1==2,"x2"]^4*(-3)+rnorm(11)+10000 data1[...
2009 Nov 13
4
cleanse columns and unwanted rows
...ere are three kinds of rows i want to remove. Those that have "Private", "Private (Op", or "Unknown" in the legal_status column. I wrote this code but i get errors and it says im missing a TRUE/ False thingy...im lost...heres the code... cleanse <- function(a){ data1<-a for (i in 1:dim(data1)[1]) { if (data1[i,"legal_status"] == "Private") { data1[i,"legal_status"]<-data1[-i,"legal_status"] } if (data1[i,"legal_status"] == "Private (Op"){ data1[i,"legal_status&qu...
2009 Dec 07
2
How to apply five lines of code to ten dataframes?
Hello R-helpers, I have 10 dataframes (named data1, data2, ... data10) and I would like to add 5 new columns to each dataframe using the following code: data1$LogDepth<-log10(data1[,2]/data1[,4]) data1$LogArea<-log10(data1[,3]/data1[,5]) data1$p<-2*data1[,6]/data1[,7] data1$Exp<-data1[,2]^(2/data1[,8]) data1$s<-data1[,3]/data1[,9]...
2005 Aug 29
14
Oracle 9.2.0.6 on Solaris 10
How can I tell if this is normal behaviour? Oracle imports are horribly slow, an order of magnitude slower than on the same hardware with a slower disk array and Solaris 9. What I can look for to see where the problem lies? The server is 99% idle right now, with one database running. Each sample is about 5 seconds. I''ve tried setting kernel parameters despite the docs saying that
2018 Apr 10
0
glusterfs disperse volume input output error
...w2: Input/output error Configuration and status of volume is: # gluster volume info vol1 Volume Name: vol1 Type: Disperse Volume ID: a7d52933-fccc-4b07-9c3b-5b92f398aa79 Status: Started Snapshot Count: 0 Number of Bricks: 1 x (13 + 2) = 15 Transport-type: tcp Bricks: Brick1: glfs-node11.local:/data1/bricks/brick1 Brick2: glfs-node12.local:/data1/bricks/brick1 Brick3: glfs-node13.local:/data1/bricks/brick1 Brick4: glfs-node14.local:/data1/bricks/brick1 Brick5: glfs-node15.local:/data1/bricks/brick1 Brick6: glfs-node16.local:/data1/bricks/brick1 Brick7: glfs-node17.local:/data1/bricks/brick1 Bri...
2011 Oct 02
2
subset in dataframes
I need help in subseting a dataframe: data1<-data.frame(year=c(2001,2002,2003,2004,2001,2002,2003,2004, 2001,2002,2003,2004,2001,2002,2003,2004), firm=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),x=c(11,22,-32,25,-26,47,85,98, 101,14,87,56,12,43,67,54), y=c(110,220,302,250,260,470,850,980,1010,140,870,560,120,430,670,540)) data1 I want...
2008 Oct 14
6
Doing a Task Without Using a For Loop
Assume that I have the dataframe "data1", which is listed at the end of this message. I want count the number of lines that each person has for each year. For example, the person with ID=213 has 15 entries (NinYear) for 1953. The following bit of code calculates NinYear: for (i in 1:length(data1$ID)) { data1$NinYear[i] <- leng...
2012 Apr 13
1
list.dirs() full.names broken?
...example. BTW, I've truncated to output in width and length for the sake of brevity. > getwd() [1] "/Users/name/Documents/R" > list.dirs(full.names = FALSE, recursive = FALSE) [1] "./abc" "./bcd" "./cde" "./data1" > list.dirs(".", full.names = FALSE, recursive = FALSE) [1] "./abc" "./bcd" "./cde" "./data1" > list.dirs("./", full.names = FALSE, recursive = FALSE) [1] ".//abc"...
2011 May 04
3
SAPPLY function XXXX
Hello everyone, I am attempting to write a function to count the number of non-missing values of each column in a data frame using the sapply function. I have the following code which is receiving the error message below. > n.valid<-sapply(data1,sum(!is.na)) Error in !is.na : invalid argument type Ultimately, I would like for this to be 1 conponent in a larger function that will produce PROC CONTENTS style output. Something like... data1.contents<-data.frame(Variable=names(data1), Class=sapply(data1,class), n.valid=sapply(data1,sum(...
2010 Jan 05
1
Errno::ENETUNREACH (Network is unreachable - connect(2)):
...lib/ruby/1.8/soap/rpc/driver.rb:232:in `getEmail'' /usr/ruby-enterprise/lib/ruby/1.8/soap/wsdlDriver.rb:117:in `__send__'' /usr/ruby-enterprise/lib/ruby/1.8/soap/wsdlDriver.rb:117:in `GetEmail'' app/controllers/application_controller.rb:16:in `user_session'' /data1/src/ruby/passenger-2.2.7/lib/phusion_passenger/rack/ request_handler.rb:95:in `process_request'' /data1/src/ruby/passenger-2.2.7/lib/phusion_passenger/ abstract_request_handler.rb:207:in `main_loop'' /data1/src/ruby/passenger-2.2.7/lib/phusion_passenger/railz/ application_spawne...
2010 Sep 06
1
combining collumns for data.frames
Hi This question is far less simple than the title suggests, please read carefully, thanks. I have 2 sets of data, both read into R >data1<-read.table ("1.txt", header=T, sep="\t") >data2<-read.table ("2.txt", header=T, sep="\t") >data1 Taxon stage1 stage2 stage3 stage4 T1 0 0 1 1 T2 0 1 1 0 T3...
2015 Aug 05
0
[PATCH 7/8] Add Neon intrinsics for Silk noise shape feedback loop.
...izer_short_prediction_c(cons #define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) ((void)arch,silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) +static OPUS_INLINE opus_int32 silk_NSQ_noise_shape_feedback_loop_c(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) +{ + opus_int32 out; + opus_int32 tmp1, tmp2; + opus_int j; + + tmp2 = data0[0]; + tmp1 = data1[0]; + data1[0] = tmp2; + + out = silk_RSHIFT(order, 1); + out = silk_SMLAWB(out, tmp2, coef[0]); + + for (j = 2; j < order; j += 2)...
2015 Nov 21
0
[Aarch64 v2 06/18] Add Neon intrinsics for Silk noise shape feedback loop.
...izer_short_prediction_c(cons #define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) ((void)arch,silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) +static OPUS_INLINE opus_int32 silk_NSQ_noise_shape_feedback_loop_c(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) +{ + opus_int32 out; + opus_int32 tmp1, tmp2; + opus_int j; + + tmp2 = data0[0]; + tmp1 = data1[0]; + data1[0] = tmp2; + + out = silk_RSHIFT(order, 1); + out = silk_SMLAWB(out, tmp2, coef[0]); + + for (j = 2; j < order; j += 2)...
2011 Dec 15
2
lm and R-squared (newbie)
Hello, I've two data.frames (data1 and data4), dec="." and sep=";". http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt When I do plot(data1$nx,data1$ny, col="red") points(data4$nx,data4$ny, col="blue") , results s...
2002 Dec 05
1
Passing options as lists
...ting function that uses layout() to plot several different plots on the same device. This function uses plot(), image(), and a custom function that uses text(). Each cell of the layout needs different par() parameters, so what I'd like to do is pass them as lists: my.plot.func <- function(data1, data2, data3, data1.options=list(), data2.options=list(), data3.options=list()) { ## call layout to divide the device ## plot data1 with par options in data1.options ## plot data2 with par options in data2.options...
2012 Dec 14
2
Manipulation of longitudinal data by row
...2c V3date V3a V3b V3c 001 4/5/12 Yes Yes No 6/18/12 Yes No Yes NA NA NA NA 002 1/22/12 No No Yes 7/5/12 Yes No Yes NA NA NA NA 003 4/5/12 Yes No No 9/4/12 Yes No Yes 11/1/12 Yes No Yes 004 8/18/12 Yes Yes Yes 9/22/12 Yes No Yes NA NA NA NA 005 9/6/12 Yes No No NA NA NA NA 12/4/12 Yes No Yes ") data1 <- read.table(header=TRUE, tC) close.connection(tC) rm(tC)
2018 Mar 22
3
exporting data to stata
Hi, I am new to R and I want to export data into Stata. Could somebody help with that? Thanks a lot. This is the code I am using: > setwd("D:/datasets/Seg-bcn/ESBD") > data1 <- readRDS("r17045_ESDB_Habitatges_BDD_V_1_0.rds") > library(foreign) > write.dta(data="data1", file = "D:/datasets/data1.dta") Error in write.dta(data = "data1", file = "D:/datasets/data1.dta") : The object "dataframe" must hav...
2009 Nov 06
1
probem on merge data
Hi there, data1<-matrix(data=c(1,1.2,1.3,"3/23/2004",1,1.5,2.3,"3/22/2004",2,0.2,3.3,"4/23/2004",3,1.5,1.3,"5/22/2004"),nrow=4,ncol=4,byrow=TRUE) data1<-data.frame(data1) names(data1)<-c("areaid","x","y","date") data1 area...
2010 Mar 08
2
how to convert character variables into numeric variables directly
..."D","A", "B", "C", "D") > typec=c("0","4","2","9","0","7","2","3","0","1","2","3") > typen=c(0,1,2,3,0,1,2,3,0,1,2,3) > data1=data.frame(age=age,height=height, type=type, typec=typec, typen=typen) > data1[,3]=as.numeric(data1[,3]) > data1[,4]=as.numeric(data1[,4]) > data1[,5]=as.numeric(data1[,5]) > print(data1) and I got the output as: age height type typec typen 1 18 76.1 1 1 0 2 19...
2011 Nov 16
3
plotting a double y axis when x and y lengths differ
Hello All, Many thanks to the help I have received so far. Here is an example data set I hope to plot Data1 Year Data SE 1 2005 2 0.01 2 2006 4 0.01 3 2007 5 0.01 4 2008 2 0.01 5 2009 3 0.01 6 2010 6 0.01 Data2 Year Data SE 1 2006 32 1 2 2007 100 2 3 2008 60 4 4 2009 67 3 5 2010 8 1 Notice Data2 has one less years worth of data than Data1 (which is my problem)...