Displaying 20 results from an estimated 20000 matches similar to: "How many records could I store in a dataframe?"
2004 Sep 30
3
Is there any way to release memory in running time?
Hi all,
I am doing some intensive computation right now. My system is Pentium4 3.20G
+ 1.0G RAM + WindowsXP + R1.9.1. It seems my computer is very powerful.
However, when I do some simple matrix algebra operations based on a matrix
(DD) with dimension 5000000 by 2, I found that the consumption of RAM is
huge. For example, the command a <- 1 - DD[,2] eats my 100M RAM. Does anyone
know how
2004 Sep 08
2
How to do this "combination" ?
Thanks David first.
Probably, David misunderstood my points.
source vector = (1,2)
the length of the target vector = 3
My expected "complete" outputs should be:
111, 112, 121, 122, 211, 212, 221, 222.
sample(c(1,2),3,replace=TRUE) just gives me one "randomly sampled"
combination at a time. However, I need the whole list displayed above at a
time.
Rui
2004 May 28
1
How could I find R.exp?
Hi all,
I try to create an import library for using dll. Following the
instruction in the readme.package, I used the command “lib /def:R.exp
/out:Rdll.lib”, however, the error message showed “Cannot open file
R.exp”. I downloaded the source code R-1.9.0.tgz, but I can not find
R.exp. Thanks!
Rui
Phone: (403)220-4501
Email: rwang@math.ucalgary.ca
Department of Mathematics and Statistics
2012 Oct 22
3
Remove records from a large dataframe
Hi, I am trying to remove a series of records from a large dataframe. The
script I have written works fine but takes a long time to run. Can anyone
suggest a quicker way to do this?
Here is an example of the code I've written. The end result of this bit of
code would be a dataframe with any records relating to ID 1 or ID 4 removed:
#dataframe
id <- c(1,1,1,1,2,2,2,2,2, 3,3,3, 4,4)
2004 Jun 10
2
Questions about Preserving registers
Hi folks,
I tried to use Mirosoft Fortran Powerstation 4.0 to create a dll file.
However, when I used the command dyn.load(“test.dll”), I got the
following message:
NULL
Warning message:
DLL attempted to change FPU control word from 9001f to 90003
I read the instruction on Duncan Murdoch’s website about preserving
registers, but I still don’t understand it. For example,
1. On first entry
2004 Jun 07
1
Load a dll
Hi folks,
I have a question about how to load a dll.
First, I use the command
> dyn.load("lassofu.dll");
then, I got the message below
“NULL
Warning message:
DLL attempted to change FPU control word from 9001f to 90003”;
After I tried to use this dll in one of s functions, I got the message
below
“Error in .Fortran("lasso", as.double(x), as.double(y), as.double(b),
2017 Oct 14
0
Populate one data frame with values from another dataframe for rows that match
Hi Kevin,
I think there are issues with Rui's proposed solution. For example, if
there are rows in myDF1 which have a studyno
which does not match any row in myDF2, then you will lose those rows. In
your original request you said that you wanted to keep those rows.
To demonstrate my point I need to modify your sample data. Specifically, I
changed some studyno settings in myDF1, and also the
2023 Jun 11
1
Problem with filling dataframe's column
?s 22:54 de 11/06/2023, javad bayat escreveu:
> Dear Rui;
> Many thanks for your email. I used one of your codes,
> "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works
> correctly for me.
> Actually I need to expand the codes so as to consider all "Levels" in the
> "Layer" column. There are more than hundred
2012 Nov 22
0
selcting a random sample and saving it in a seprate dataframe and also remaining part in other data frame
HI Madhu,
I guess you got your solution from Rui:
?dat1<-data.frame(x=c(1,1,2,2,2,3,4,4,4),y=c(23,45,87,46,78,12,87,79,76))
s<-sample(unique(dat1[,1]),length(unique(dat1[,1]))*0.8)
?s
#[1] 3 4 2
You can have a list containing both the dataframes
list1<-list(dat1[dat1$x%in%s,],dat1[!dat1$x%in%s,])
list1
[[1]]
#? x? y
#3 2 87
#4 2 46
#5 2 78
#6 3 12
#7 4 87
#8 4 79
#9 4 76
#[[2]]
?# x? y
2007 Aug 28
3
Still getting "too many open files"
We have still having problems with Ferret dying on us regularly with the
error message:
>>
ferret server error IO Error occured at <except.c>:93 in xraiseError
occured in fs_store.c:127 - fs_each
doing ''each'' in
/var/www/web1/oms/current/script/../config/../index/production/band/20070805130005:
<Too many open files>
<<
We are running Ferret as a
2023 Jun 11
1
Problem with filling dataframe's column
Dear Rui;
Many thanks for your email. I used one of your codes,
"data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works
correctly for me.
Actually I need to expand the codes so as to consider all "Levels" in the
"Layer" column. There are more than hundred levels in the Layer column.
If I use your provided code, I have to write it
2017 Oct 14
2
Populate one data frame with values from another dataframe for rows that match
Dear @Rui Barradas, thank you for the solution. It works perfectly.
On 13/10/2017, 23:35, "Rui Barradas" <ruipbarradas at sapo.pt> wrote:
Hello,
Try the following.
myDF1$studyno <- as.character(myDF1$studyno)
myDF2$studyno <- as.character(myDF2$studyno)
i1 <- which(names(myDF1) == "pf_mcl")
merge(myDF1[-i1], myDF2,
2017 Oct 13
0
Populate one data frame with values from another dataframe for rows that match
Hello,
Try the following.
myDF1$studyno <- as.character(myDF1$studyno)
myDF2$studyno <- as.character(myDF2$studyno)
i1 <- which(names(myDF1) == "pf_mcl")
merge(myDF1[-i1], myDF2, by = "studyno")
Hope this helps,
Rui Barradas
Em 13-10-2017 20:09, Kevin Wamae escreveu:
> I'm trying to populate the column ?pf_mcl? in myDF1 with values from myDF2, where rows
2006 Aug 07
2
Retain only those records from a dataframe that exist in another dataframe
Dear R community,
I have two dataframes "first" and "second" which share a unique identifier.
I wish to make a new dataframe "third" retaining only the rows in
"first" which also occur in "second".
I have tried using merge but can't seem to figure it out. Any ideas?
Thanks!
Mark
2009 Sep 05
1
Convert dataframe to array of records
I would like to convert a dataframe to an array of lists, one for every
record. A natural choide is apply as.list to the rows. However, as it seems,
as.list() automatically converts all list elements to the same datatype. Eg:
myData <- data.frame(a="foo",b=as.logical(rbinom(10,1,.5)));
apply(myData,1,as.list);
In this output, all boolean values have been converted to character
2008 Oct 31
2
how to retrieve some records from a dataframe
Hi ,
Dataframe Df contains more than 30 no of records.but I want only
first 30 rows of data.
How can I retrieve it.
Thanks
K.Ravichandra
[[alternative HTML version deleted]]
2006 Sep 17
2
Excluding columns from dataframe and selecting row records
Dear R-friends,
I have to simple questions. First I would like to exclude some columns from a dataframe and after I need select rows that satisfy some conditions.
My data frame looks like
Region Species Bodysize Weigth Age
Africa Sp1 10.2 20 2
Africa Sp2 12.2 12 2
Africa Sp3 15.3 18 3
Africa Sp4 11.5 40 4
Brazil Sp1 10.2 40 3
Brazil Sp2 22.2 32 2
Brazil Sp3 12.3
2012 Sep 18
0
Appending many different and separate Excel files using R
Hello,
This is the sort of question that could interess others, so you should
have CCed it to the list.
As for the question, from the package vignette, section 3.3.6:
"writeWorksheetToFile() is a wrapper function, calling loadWorkbook(),
createSheet() and saveWorkbook()
functions subsequently. It therefore allows for writing data into
worksheets of an Excel file in one call."
To
2009 Nov 05
2
Merge records in the same dataframe
Hi:
Suppose that I have a data frame as below
x1 x2 x3 ... x10 wk1 wk2 ... Wk208 (these are the column names)
For each record, x1, x2, x3 ... x10 are attributes. and wk1, wk2, ..., wk208 are the sales recoreded for this attribute combination. Suppose that now, that I want to do the following
1. Merge the data frame so that I have a new data frame grouped by values of x2 and x3 (for example).
2024 Oct 18
1
DPLYR Multiple Mutate Statements On Same DataFrame
?s 22:50 de 17/10/2024, Sparks, John escreveu:
> Hi R Helpers,
>
> I have been looking for an example of how to execute different dplyr mutate statements on the same dataframe in a single step. I show how to do what I want to do by going from df0 to df1 to df2 to df3 by applying a mutate statement to each dataframe in sequence, but I would like to know if there is a way to execute this