ff

FF in R: No Applicable Method for 'recodeLevels'

十年热恋 提交于 2019-12-25 02:34:23
问题 I'm trying to load a huge (~5GB) .csv file into R using read.csv.ffdf. The command goes: npi <- read.csv.ffdf(file="C:/Users/DSA/Dropbox/Team Shared Files/People/Ross/NPI_Parse/Zips/npi_full.csv", VERBOSE=TRUE, first.rows=10000,next.rows=100000,colClasses=NA) The command runs for a while and then throws the following error: "no applicable method for 'recodeLevels' applied to an object of class "c('double', 'numeric')." Some searching tells me I need to use the transFUN option but I have no

Error writing large matrix using R ff

笑着哭i 提交于 2019-12-24 17:01:48
问题 I've tried to generate a matrix using ff package, but I get the following error: Matrixff <- ff(0, dim = c(1000, 10000)) Error in splitPathFile(x) : 4 arguments passed to .Internal(nchar) which requires 3 How can I solve that? 回答1: I upgraded my version of R to R 3.2.1 and it works. 来源: https://stackoverflow.com/questions/30966925/error-writing-large-matrix-using-r-ff

Python中的可变对象与不可变对象、浅拷贝与深拷贝

﹥>﹥吖頭↗ 提交于 2019-12-21 10:54:45
Python中的对象分为可变与不可变,有必要了解一下,这会影响到python对象的赋值与拷贝。而拷贝也有深浅之别。 不可变对象 简单说就是某个对象存放在内存中,这块内存中的值是不能改变的,变量指向这块内存,如果要改变变量的值,只能再开辟一块内存,放入新值,再让变量指向新开辟的内存。 #定义三个变量 f=22 n=22 z=f print('f=%s,n=%s,z=%s' %(f,n,z)) print('f的地址:',id(f))#id用于获取变量内存地址 print('n的地址:',id(n)) print('z的地址:',id(z)) print('注意:f、n、z的地址是一样的。\n') n=9 #改变n的值 z=6 #改变z的值 print('f=%s,n=%s,z=%s' %(f,n,z)) print('f的地址:',id(f)) print('n的地址:',id(n)) print('z的地址:',id(z)) print('注意:f、n、z的地址不一样了。') 执行结果: f=22,n=22,z=22 f的地址:8790949926368 n的地址:8790949926368 z的地址:8790949926368 注意:f、n、z的地址是一样的。 f=22,n=9,z=6 f的地址:8790949926368 n的地址:8790949925952 z的地址

Functions for creating and reshaping big data in R using the FF package

拈花ヽ惹草 提交于 2019-12-19 10:23:14
问题 I'm new to R and the FF package, and am trying to better understand how FF allows users to work with large datasets (>4Gb). I have spent a considerable amount of time trawling the web for tutorials, but the ones I could find generally go over my head. I learn best by doing, so as an exercise, I would like to know how to create a long-format time-series dataset, similar to R's in-built "Indometh" dataset, using arbitrary values. Then I would like to reshape it into wide format. Then I would

centos7配置网桥

荒凉一梦 提交于 2019-12-16 14:36:32
在Centos7上玩KVM的话一定要配置网桥的: [root@localhost nb]# ls /etc/sysconfig/network-scripts ifcfg-8866 ifdown ifdown-isdn ifdown-TeamPort ifup-ib ifup-post ifup-tunnel network-functions-ipv6 ifcfg-br0 ifdown-bnep ifdown-post ifdown-tunnel ifup-ippp ifup-ppp ifup-wireless ifcfg-CCAP_guest ifdown-eth ifdown-ppp ifup ifup-ipv6 ifup-routes init.ipv6-global ifcfg-enp0s25 ifdown-ib ifdown-routes ifup-aliases ifup-isdn ifup-sit keys-8866 ifcfg-iPak ifdown-ippp ifdown-sit ifup-bnep ifup-plip ifup-Team keys-iPak ifcfg-lo ifdown-ipv6 ifdown-Team ifup-eth ifup-plusb ifup-TeamPort network-functions 上面的是配置好的

How to subset a large data frame (ffdf) in R by date?

▼魔方 西西 提交于 2019-12-12 20:32:53
问题 I am trying to subset an FFDF by a date. Below, I have successfully created such a subset using a normal data frame. But I needed some help in applying this to an FFDF. My attempt, along with the error message, is listed in the code comment. Many Thanks in advance! #Create a normal data frame (in production this is read directly into an ffdf #through a csv file) start <- c("01/01/2010", "01/01/2011", "01/01/2012", "01/01/2012", "01/01/2012") end <- c("31/12/2010", "31/12/2011", "31/12/2012",

Columnbind ff data frames in R

纵饮孤独 提交于 2019-12-11 05:05:30
问题 i try to work with the ff package. In this context i try to cbind two ff dataframes. I found a solution to combine a ffdf with a ff vector but how do i combine to ffdf. Here my code for combining ffdf with ff vector: library(ff) ## read Bankfull flow## setwd(wd) bf <- read.csv.ffdf(file="G_BANKFULL_km3month.csv",header=TRUE) ## read river discharge global, monthly vlaues 1971-2000## memory.limit(size=16000) # increase working memory dis <- read.table.ffdf(file='RIVER_AVAIL_7100_WG22.txt',

R ffdfappend SIGBUS error

你说的曾经没有我的故事 提交于 2019-12-11 03:59:06
问题 I have an R script which uses the ffbase and ff packages. In Windows the script runs fine. In Linux (different box, higher RAM though) it crashes with a bus (SIGBUS) error. Windows (Version 6.1.7601) session info: R version 3.1.0 (2014-04-10) Platform: x86_64-w64-mingw32/x64 (64-bit) attached packages: ffbase_0.11.3 ff_2.2-13 bit_1.1-12 Linux (Linux xenja 3.5.0-54-generic #81~precise1-Ubuntu SMP Tue Jul 15 04:02:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux) session info: R version 3.1.1 (2014

Import text file using ff package

≯℡__Kan透↙ 提交于 2019-12-10 13:19:16
问题 I have a textfile of 4.5 million rows and 90 columns to import into R. Using read.table I get the cannot allocate vector of size... error message so am trying to import using the ff package before subsetting the data to extract the observations which interest me (see my previous question for more details: Add selection crteria to read.table). So, I use the following code to import: test<-read.csv2.ffdf("FD_INDCVIZC_2010.txt", header=T) but this returns the following error message : Error in

What is the meaning of this error “Error in if (any(B < 1)) stop(”B too small“)” while using tabplot package

有些话、适合烂在心里 提交于 2019-12-04 03:16:46
问题 I found the tabplot package for visualizin a large data base. I ran it using the code below but I get this error on different data frames: "Error in if (any(B < 1)) stop("B too small") : missing value where TRUE/FALSE needed In addition: Warning message: In bbatch(n, as.integer(BATCHBYTES/theobytes)) : NAs introduced by coercion" Here is an example: dat <- read.table(text = " birds wolfs snakes 3 9 7 3 8 4 1 2 8 1 2 3 1 8 3 6 1 2 6 7 1 6 1 5 5 9 7 3 8 7 4 2 7 1 2 3 7 6 3 6 1 1 6 3 9 6 1 1 "