similar to: creating vectors from data-frames

Displaying 20 results from an estimated 2000 matches similar to: "creating vectors from data-frames"

2010 Oct 04
3
How To Extract Row from A Data Frame
I have a data frame that looks like this: > print(df) V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 1 FN 8.637 28.890 31.430 31.052 29.878 33.215 32.728 32.187 29.305 31.462 2 FP 19.936 30.284 33.001 35.100 30.238 34.452 35.849 34.185 31.242 35.635 3 TN 0.000 17.190 16.460 21.100 17.960 15.120 17.200 17.190 15.270 15.310 4 TP 22.831 31.246 33.600 35.439 32.073
2013 Feb 15
3
datos climáticos cambio de formato
Hola!! tengo un data.frame donde cada fila corresponde a un año y cada columna a un mes (De enero a diciembre) > head(valT) V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 1941 18.0 16.3 15.2 10.1 8.1 8.3 8.8 9.2 7.9 12.2 11.9 14.6 1942 17.2 15.9 13.6 11.6 8.7 6.2 6.4 7.2 9.7 12.0 14.1 16.7 1943 17.6 17.3 13.5 12.5 10.5 7.0 8.2 7.9 -999.9 -999.9
2006 Feb 05
2
I appear to be attacking others
It looks like my CentOS 4.2 box is attacking other people with some type of ftp attack. I got an email from somebody saying they were being attacked by my IP address. Further investigation /var/log/messages shows a whole bunch of sshd attacks on me, none of which appear successful. I'm running ethereal right now and I can see that my system is doing some kind of ftp attacks on others.
2011 Sep 01
2
how to plot a series of data in a dataframe?
hi i have a dataframe with the name "obsdata" V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 1 1001 3 24 12 24.7 44.4 70.1 49.3 33.7 3.0 6.8 2.7 NA 2 1001 3 25 0 70.1 49.3 33.7 138.2 152.5 NA 4.2 6.9 17.5 3 1001 3 25 12 33.7 187.7 286.5 386.7 NA 16.2 46.0 48.8 43.1 4 1001 3 26 0 88.6 129.4 NA NA
2013 Feb 28
1
help for an R automated procedures
Dear, I would like to post the following question to the r-help on Nabble (thanks in advance for the attention, Gustavo Vieira): Hi there. I have a data set on hands with 5,220 cases and I'd like to automate some procedures (but I have almost no programming knowledge). The data has some continuous variables that are grouped by 2 others: the name of species and the locality where they were
2014 Jul 02
2
error al leer una linea desde un archivo de texto
A mi también me funciona para los dos casos: > dat <- read.csv("d11-16.csv", header=FALSE, sep=",", dec=".", skip=11, nrows=1) > dat V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 1 masa total en µg 30.04633 ug PEAKS MUY PEQUENOS NA NA NA NA NA NA NA > dat18 <- read.csv("d11-18.csv", header=FALSE,
2005 Oct 13
1
expand.grid problem
Hi all, I want to make all possible combination from dataset below: V1 <- c(0,1,2) V2 <- c(0,1) V3 <- c(0,1) V4 <- c(0,1) V5 <- c(0,1) V6 <- c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) V7 <- c(0,1,2,3,4,5,6) V8 <- c(0,1) V9 <- c(0,1) V10 <- c(0,1) V11 <- c(0,1) V12 <- c(0,1) V13 <- c(0,1) V14
2015 Aug 22
3
sprintf error: "only 100 arguments allowed"
I'm trying to apply a function defined in the VW R docs, that attemps to convert a data.table object to Vowpal Wabbit format. In the process i'm getting the error in printf mentioned in the subject. The original function is here: https://github.com/JohnLangford/vowpal_wabbit/blob/master/R/dt2vw.R Below there is a small example that reproduces the error. The function works great with
2011 May 25
2
Fwd: transpose ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110525/4926c5ee/attachment.pl>
2005 Jan 06
2
patterns of missing data: determining monotonicity
Here is a problem that perhaps someone out here has an idea about. It vaguely reminds me of something I've seen before, but can't place. Can anyone help? For multiple imputation, there are simpler methods available if the patterns of missing data are 'monotone' --- if Vj is missing then all variables Vk, k>j are also missing, vs. more complex methods required when the
2010 Nov 22
2
R package "kernlab" can not be properly loaded
Hi, I tried to load the package "kernlab" under R-v11 and R-v10, however it gave error message: Error in library.dynam(lib, package, package.lib) : shared library 'kernlab' not found In addition: Warning message: package 'kernlab' was built under R version 2.12.0 Error: package/namespace load failed for 'kernlab' Has anybody loaded this successfully before?
2010 May 24
2
import data from a csv file
Hi all, I have some trouble reading data from a csv file. I used command "read.delim("clipboard") to read in the data. > aalpha.data <- read.delim("clipboard") > class(aalpha.data) [1] "data.frame" > dim(aalpha.data) [1] 8 25 > colnames(aalpha.data) [1] "X" "V1" "V2" "V3" "V4"
2013 Mar 18
2
Confirmatory factor analysis using the sem package. TLI CFI and RMSEA absent from model summary.
Hi R-help, I am using the sem package to run confirmatory factor analysis (cfa) on some questionnaire data collected from 307 participants. I have been running R-2.15.3 in Windows in conjunction with R studio. The model I am using was developed from exploratory factor analysis of a separate dataset (n=439); it includes 18 items that load onto 3 factors. I have used the sem package documentation
2011 Jul 12
1
Avoiding loops to detect number of coincidences
Hi all, I have this information on a file ht.txt, imagine it is a data frame without labels: 1 1 1 8 1 1 6 4 1 3 1 3 3 And on other table called "pru.txt" I have sequences similar this 4 1 1 8 1 1 6 4 1 3 1 3 3 1 6 1 8 1 1 6 4 1 3 1 3 3 1 1 1 8 1 1 6 4 1 3 1 3 3 6 6 6 8 1 1 6 4 1 3 1 3 3 I want to now how many positions are identical between each row in pru compared with ht. n and m
2010 Oct 13
2
Rmysql - dbWritetable
Dear Rusers, I am trying to feed my database with data from a file. But since my file (2010101000.txt) there`s no headers I am facing problem because the result data.frame is not separated my columns. How could I set variables names for each columns in *dbWriteTable*? I have tried the command below but I don`t know how to fill the *field.type*option. dbWriteTable(con, "b20101010",
2006 Feb 01
2
sort columns
Hi. I have a simple (I think) question My dataset have these variables: names(data) [1] "v1" "v2" "v3" "v4" "v5" "v6" "v7" "v8" "v9" "v10" "v11" "v12" "v13" "v14" "v15" "v16" "v17"
2014 Jul 02
7
error al leer una linea desde un archivo de texto
Estimada comunidad, estoy extrayendo una linea de texto desde varios archivos (unos 200) de esta manera: dat <- read.csv(filenames[i], header=FALSE, sep=",", dec=".", skip=11, nrows=1) pero al tratar de leer esa linea desde el archivo numero 54 obtengo el siguiente error: Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L)) :
2008 Sep 05
1
binary order combinations
Dear all! I have a vector of names names<-("V1", "V2", "V3",....., "V15") I could create all possible combinations of these names (of all lengths) using R: combos<-lapply(1:15,function(x) {combn(names,x) }) I get a list with all possible combinations of elements of 'names' that looks like this (just the very beginning of it): [[1]] - the
2009 Apr 04
1
Problem with sample()
Hi, I'm having a problem using sample() within a function. Basically I get an error reading: Error in sample(v, 1, prob = h) : non-positive probability Can anyone advise me as to the possible origin of this error? Here is my code #Discretised Gillespie algorithm function (From SMfSB, D.J. Wilkinson) gillespied=function (N, T=100, dt=1, ...) { tt=0 n=T%/%dt x=N$M
2012 Jul 05
1
Different level set when predicting with e1071's Naive Bayes classifier
Hi! I'm using the Naive Bayes classifier provided by the e1071 package ( http://cran.r-project.org/web/packages/e1071) and I've noticed that the predict function has a different behavior when the level set of the columns used for prediction is different from the ones used for fitting. From inspecting the predict.naiveBayes I came to the conclusion that this is due to the conversion of