similar to: Indexing dataframe

Displaying 20 results from an estimated 300 matches similar to: "Indexing dataframe"

2004 Sep 09
0
AW: Indexing dataframe
Hi, Use Newdata <- subset(d2004, select=-c(concentration,stade)) See ?subset for details Best, Matthias > -----Urspr??ngliche Nachricht----- > Von: Jacques VESLOT [mailto:jacques.veslot at cirad.fr] > Gesendet: Donnerstag, 09. September 2004 12:38 > An: r-help at stat.math.ethz.ch > Betreff: [R] Indexing dataframe > > > I am sorry to ask such question, but I
2005 Jun 28
1
Using data frames for EDA: Insert, Change name, delete columns? (Newcomer's question)
I am finding complex analyses easier than some elementary operations in R. In particular I want to do some low level exploratory data analyses with data in a data frame but cannot find commands to easily insert, remove (delete), rename, and re-order (arbitrarily, not sort) columns. I see that the micEcon package has an insertCol command, but that is for matrices, not data frames. I have looked
2010 Sep 13
1
Create a time-series from cross-sectional data that has each year as a separate column
Hi, I have a dataset from ILO, originally in csv-format, that I have read into R. It is cross-sectional time-series data, so I have a bunch of variables and dummy variables that I need to extract data from for the entire time period. However, the years are separated by columns instead of rows, as is usually the case in R. This is what it looks like: > str(laborstafinMFBA)
2012 Mar 19
3
Issue with asin()
Hello everyone, I am working for a few days already on a basic algorithm, very common in applied agronomy, that aims to determine the degree-days necessary for a given individual to reach a given growth stade. The algorithm (and context) is explained here: http://www.oardc.ohio-state.edu/gdd/glossary.htm , and so I implemented my function in R as follows: DD <- function(Tmin, Tmax, Tseuil,
2012 Oct 04
4
Class for time series
Dear all, I have a time serie dataset such as the following with data acquired every 15 minutes: Date Heure Profondeur Temp?rature Salinit? Turbidit? Chloration 1 2012-07-06 08:47:22 -0.144 22.469 0.011 0.000 0 2 2012-07-06 09:02:21 -0.147 22.476 0.011 0.000 0 3 2012-07-06 09:17:21 -0.139 22.498 0.011 19.323 0 4 2012-07-06
2005 Jan 21
1
an R script editor for Mac
JGR has an fairly intelligent editor, and it works on Mac. Andy > From: Sean Davis > > Consider using ESS and xemacs or emacs. You get syntax highlighting, > auto-indent, command auto-complete, transcripts for your session, > integrated help, and the tools of one of the most powerful > text editors > on the planet. The learning curve is a bit steep, but if you use R
2006 Aug 18
0
[Fwd: Trend test and test for homogeneity of odd-ratios]
I partly answered my question since independence_test() function in coin package apparently do Cochran-Armitage trend test just like Eric Lecoutre's function tabletrend() - slightly modified here: > independence_test(pheno ~ geno, data = dat2, teststat = "quad", scores = list(geno = c(0, 1, 2))) Asymptotic General Independence Test data: pheno by groups 1 < 2
2006 Mar 23
0
sqlSave
Dear Tobias, I finally succeeded in exporting my dataframes from R into Access with this script: library(RODBC) canal <- odbcConnectAccess("D:/Floristique.mdb") sqlSave(channel=canal, dat=flore, tablename="Floristique", rownames=F, safer=F, fast=F, varTypes=c(dates="Date")) odbcClose(canal) My problem in exporting my dataframe "flore" seems to
2004 Jul 15
1
About lattice plots and loops
I cannot operate lattice plots, notably those in package gstat, within for() loops. (I can neither read such graphics included in a .R (or .txt) file with the source() function). However same commands executed one by one don't fail. Could you please help me find a means to execute lattice plots inside a loop ? Jacques VESLOT CIRAD -----------------------------------------------------
2004 Dec 08
2
what about a mascot ?
My friend Veslot proposed me the Raven ! http://www.teteamodeler.com/allopass/images/corbeau.jpg As a matter of fact the intelligence of this bird is comparable to one of a monkey, although its brain is close to a reptile brain. R is quite the same : small, compact, but so clever. This is a canadian website explaining (in french) the R-aven intelligence
2005 May 18
1
Line width through plot size reduction
Dear R-users, Someone, who uses R under Mac, wants to insert a couple of small plots (each with several lines) in an article, but he has to reduce plots' size significantly. He did it (in pdf or enc. ps) but, unfortunately, everything is reduced but lines' width. Besides, 'lwd' argument in par() or plot() can't be less than one. I am not a Mac user and I don't know
2005 Jul 07
1
About ade4 and overlaying points
Dear R-users, Is there an easy way to avoid points one upon another when ploting rows and columns of 'dudi' objects ? Maybe there is a function in ade4 or in an other package, or maybe someone has his or her own function to do this (for example to automatically modify a little the coordinates of these points to get a readable plot ?). Thanks in advance. Best regards, Jacques VESLOT
2006 Nov 24
1
Error Message saying .Call("R_lazyLoadDBfetch", etc.
Hi, I got the following error message when running a function of mine doing intensive computations: Erreur dans .Call("R_lazyLoadDBfetch", key, file, compressed, hook, PACKAGE = "base") : r?f?rence d'argument par d?faut r?cursive I haven't found neither where the problem lies nor what could be recursive. Besides, I wonder whether it might or not be a problem
2004 Sep 22
1
layout for xyplot
Dear all, I tried to use layout argument in xyplot to get one panel per page. I have a dataframe named 'data' with the following variables: x, y = coords, sub, bloc = 2-level factors, etat = 5-level factor, I did : > lset(theme = col.whitebg()) > xyplot(y ~ x | bloc*sub , data=data, groups=etat, + layout=c(0,1,4), + main="Etat des plantes dans chaque
2004 Jul 21
3
How to sort TWO columns ?
Dear ALL, I fear my question has already been answered many times before, but I haven't fund that in archives... I am working on spatial datasets and, in most arrays I'm handling, there are two columns dedicated to (x,y)-coords. For different reasons - notably to draw image() plots, I need to have these two columns sorted in increasing order. But sort() and order() seem to apply to
2005 Oct 27
2
F tests for random effect models
Dear R-users, My question is how to get right F tests for random effects in random effect models (I hope this question has not been answered too many times yet - I didn't find an answer in rhelp archives). My data are in mca2 (enc.) : names(mca2) [1] "Lignee" "Pollinisateur" "Rendement" dim(mca2) [1] 100 3 replications(Rendement ~ Lignee *
2005 Jan 26
3
Still avoiding loops
Dear all, I have a matrix X with 47 lines and say 500 columns - values are in {0,1}. I'd like to compare lines. For that, I first did: for (i in 1:(dim(X)[1]-1)) for (j in (i+1):dim(X)[1]) { Y <- X[i,]+Y[j,] etc. but, since it takes a long time, I would prefer avoding loops; for that, my first idea was to add this matrix: X1=X[,rep(1:46,46:1)] to this one: res=NULL for (i in
2005 Feb 15
1
Tests on contingency tables
Dear all, I have a dataset with qualitative variables (factors) and I want to test the null hypothesis of independance between two variables for each pair by using appropriate tests on contingency tables. I first applied chisq.test and obtained dependance in almost all cases with extremely small p-values and warning messages. > chisq.test(table(data$ins.f, data$ins.st))$p.val [1]
2004 Sep 21
1
bubble plots
Dear all, I'm used to draw bubble plots (gstat) to get a first view of my spatial marked data, but I can't find a way to label legend with marks after having replaced them by a numeric scale. I have a data frame with numeric coords and factors: > names(data) [1] "x" "y" "bloc" "sub" "inoc"
2005 Oct 28
2
Random effect models
Dear R-users, Sorry for reposting. I put it in another way : I want to test random effects in this random effect model : Rendement ~ Pollinisateur (random) + Lignee (random) + Pollinisateur:Lignee (random) Of course : summary(aov(Rendement ~ Pollinisateur * Lignee, data = mca2)) gives wrong tests for random effects. But : summary(aov1 <- aov(Rendement ~ Error(Pollinisateur * Lignee), data =