search for: datfram

Displaying 20 results from an estimated 23 matches for "datfram".

Did you mean: datfra
2018 Apr 17
2
Time intervals in a datframe
Hi all I have a list of multiple datframes with the same column headers. The last column in each datframe contains a vector of "Interval" class after I have produced this column using "lubridate" package. I needed to convert my list of dataframes to be in a single dataframe for further analysis. I did this using the fo...
2018 Apr 17
0
Time intervals in a datframe
> On Apr 17, 2018, at 10:10 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > Hi all > > I have a list of multiple datframes with the same column headers. The last column in each datframe contains a vector of "Interval" class after I have produced this column using "lubridate" package. I needed to convert my list of dataframes to be in a single dataframe for further analysis. I did this using the fo...
2006 Aug 06
1
ordering by a datframe date
I am hoping for some advice regarding ordering a dataframe, by date. The dataframe is in the format below. $story $datepub story10 1 April 1999 story 90 1 March 2002 story 37 10 July 1985 I want to reorder the entire dataframe so the earliest story is first, and save the reordered dataframe. The command, 'class' (datepub) reveals $datepub is a factor variable. I tried
2010 Oct 26
2
Forcing results from lm into datframe
Hi I need some help getting results from multiple linear models into a dataframe. Let me explain the problem. I have a dataframe with ejection fraction results measured over a number of quartiles and grouped by base_study. My dataframe (800 different base_studies) looks like > afvtprelvefs basestudy quartile ef ef_std entropy CBP0908020 1 21.6 0.53 3.27
2005 Mar 25
2
tapply and NA value
Hi, I'm writing for a little help. I have a dataframe with same NA value and I'd like to obtain the means of the value of a coloumn grouped by the levels of a factor coloumn of the datframe. I'm using the function "tapply" but I see that if only a NA value is present the result is NA. There is an option to have the correct result or I must use an other function? Thanks of all Leonardo -- Leonardo Lami lami at faunalia.it www.faunalia.it Via Colombo 3 - 510...
2006 Oct 01
3
aggregate function with 'NA'
Dear r-help reader, I have some problems with the aggregate function. My datframe looks like >frame Day Time V1 V2 1 M 0 3 NA 2 M 0 4 NA 3 M 0 5 2 4 M 1 NA 4 5 M 1 10 6 6 T 0 4 45 7 T 1 4 3 8 T 1 3 2 9 T 1 6 1 I used the aggegate function to obtain the mean in V1 and V2 over the grouping variable Time and Day...
2018 May 02
2
using apply
Hi I have 3 dataframes, a,b,c with 0/1 values...i have to check a condition for dataframe a and b and then input the rows ids to datframe c . In the if condition, I AND the 2 rows of from a and b and then see if the result is equal to one of them. I have done this using a for loop, however, it takes a long time to execute with larger dataset..Can you help me do it using apply function so that i can do it faster? a V1.x V2.x V3.x...
2002 Apr 02
1
"Large" data set: performance issue
...n I tried scan() which is almost OK. I scan() the first line for var-names, then the rest. the data-matrix get transposed and as.data.frame()'ed. the problem is converting the last 1801 variabales to "numeric"-mode. i use the following snippet: i <- 23; while( i <= totCols){ datframe[,i]<-as.numeric(datframe[,i]); i <- i + 1; } each step takes ~2 secs which makes all in all about an hour. I suppose I do something really stupid. For reading the data I use datfull<-scan(filename,sep=",",skip=1,what="character") which gives me a transposed matrix o...
2009 Aug 28
2
Pls package
Hi, I have managed to format my data into a single datframe consisting of two AsIs response and predictor dataframes in order to supply the plsr command of the pls package for principal components analysis. When I execute the command, however, I get this error: > fiber1 <- plsr(respmat ~ predmat, ncomp=1, data=inputmat,validation="LOO") Er...
2008 Nov 26
1
Creating a vector based on lookup function
...p..help you, help me, if you know what i mean. dev=400 #test location model TAZs to reference cands=c(101,105,109) #Create Object of length of cands candslength=length(cands) #TEST TAZ Vector CANDS=(100:110) #Test Dev Vector TAZDEVS=c(120,220,320,420,520,620,720,820,920,1020,1120) #Creates datframe of CANDS and DEVS TAZLIST=data.frame(CANDS,TAZDEVS) for(i in 1:candslength){ cand=cands[i] #Creates an object based on the value of "cands" in TAZLIST TAZDet=TAZLIST[TAZLIST$CANDS==cand[i],2] } What i would like to see is TAZDet filled with the "cands" corresponding...
2003 Jul 19
1
Method 'EvaluateNoReturn' of object 'IStatConnector' failed
...ocal variable. My questions can thus be summarised as ff: 1). How do I call a custom function written in R, using the R ActiveX library. ? 2). How do I access a dataframe returned from a function call, using the R ActiveX library. ? 3). Can I / How do I pass arguments into a function (including datframes) using the R ActiveX library. ? Many Thanks PS: I am relatively new to R, and I suspect that my function is not loaded into R's memory space. When using R in the normal way (i.e. via GUI), I initially used the source() command to load the function script. However, I have saved it in...
2018 May 02
0
using apply
...ooking for. data. table could also be interesting. Hth Ulrik On Wed, 2 May 2018, 21:28 Neha Aggarwal, <aggarwalneha2000 at gmail.com> wrote: > Hi > > I have 3 dataframes, a,b,c with 0/1 values...i have to check a condition > for dataframe a and b and then input the rows ids to datframe c . In the if > condition, I AND the 2 rows of from a and b and then see if the result is > equal to one of them. > I have done this using a for loop, however, it takes a long time to execute > with larger dataset..Can you help me do it using apply function so that i > can do it fas...
2009 Jan 02
1
Calculating signicance value
...two items whose correlations are being found sig_value<-cor.test(corr_dataset) and also return that :- return(list(matrix=BPcor,sig=sig_value)) For example recmeanC1 and i1 has to be passed here..as 2 separate dataframes,shown below if i pass the dataset for (recmeanC1 & i1 ) as as single datframe,cor.test() function doesn't accept it.Moreover cor() function took care of what will be crossed with what and the correlation produced.Now do i have to manually get possible pairs of the column names of my dataset(shown above dataset 1),and also the data and then pass to cor.test and calculate...
2012 Jun 25
2
setdiff datframes
hi, I have 2 files example 1 and example 2 and would like to know what is in example2 and not in example1 (attached) V1 contain data which could be in duplicated which I am using as identifiers I used setdiff(example2$V1,example1$V1) to find the identifiers which are specific to example2: [1] "rs2276598" "rs17253672" I am looking for a way to get an output with all
2001 Aug 17
0
making a neat timetable
...; reper" "reper" ... $ user : chr "stf" "cal" "bas" "pup" ... > |> prova[2] actually represents the weekday from Monday to Sunday > > I think you mean prova[,2] which is the second column (i.e. once > you've got it into a datframe form). Yes of course. > That's tricky. It might be a good idea to get some experience with > simpler tasks first. Check out aggregate.data.frame which should get > most of it sorted for you. Then you'll need to get the hang of > pasting various vectors together. Thanks fo...
2011 May 23
1
Applying boxplot.stats to multiple value lists
...things such as> upex(testframe$Name) [1] 100> lapply(testframe, upex) $Name [1] 100 $Value [1] NA> for (x in testframe["Name"]) print(upex(x)) [1] 100 As you can see, I get only one value as an output, so I assume these calls apply the function to the whole set of values in the datframe. Is there a way to make it work as I want it to? I hope my question is understandable enough.. [[alternative HTML version deleted]]
2007 Nov 13
2
plotting coxph results using survfit() function
i want to make survival plots for a coxph object using survfit function. mod.phm is an object of coxph class which calculated results using columns X and Y from the DataFrame. Both X and Y are categorical. I want survival plots which shows a single line for each of the categories of X i.e. '4' and 'C'. I am getting the following error: > attach(DataFrame) >
2005 May 26
2
Q: changing the class of an object
Dear All, I have a list of dataframes, each cell in every dataframe (after I have cleaned up the dataframes) is either real or NA but have class character (I think). I would like to know how to change the class of every cell without using a for-loop. I currently have this dataframes <- sapply(1: no.of.subs, function(k) apply(dataframes[[k]], 2, function(x) {
2013 Dec 03
3
seleccionar columnas de un dataframe mediante variables
Pues este es el culpable... como soy nuevo en esto, disculpad si las estrategias de creación de datframes, etc. son poco ortodoxas. Y por cierto... esto del slicing con R es un poco... duro library(RPostgreSQL) library(reshape) #CARGA DE DATOS conn<-dbConnect("PostgreSQL",dbname="OFIDAT",user="antares") #consulta<-dbSendQuery(conn,"select codigo_buque,coale...
2013 Dec 03
0
seleccionar columnas de un dataframe mediante variables
...o - Listas > Enviado el: martes, 03 de diciembre de 2013 14:18 > Para: r-help-es en r-project.org > Asunto: Re: [R-es] seleccionar columnas de un dataframe mediante > variables > > Pues este es el culpable... como soy nuevo en esto, disculpad si las > estrategias de creación de datframes, etc. son poco ortodoxas. Y por > cierto... esto del slicing con R es un poco... duro > > library(RPostgreSQL) > library(reshape) > #CARGA DE DATOS > conn<-dbConnect("PostgreSQL",dbname="OFIDAT",user="antares") > #consulta<-dbSendQuery(conn...