similar to: C API to get numrow of data frame

Displaying 20 results from an estimated 300 matches similar to: "C API to get numrow of data frame"

2009 Mar 27
0
imporving performance of slicing on matrices and S4 their derivatives
Dear list. It is a known issue that accessing slots of S4 objects and in particular accessing .Data slots is slow in R. However, what surprises me are two things demonstrated in the code below (runnable with 'inline', my times are in the comments): - copying data out of a large 3x1e7 .Data slot into a matrix can be easily made 3-4 times faster than accessing a .Data slot which I believe
2014 Apr 02
3
Typeof for character vector in dataframe returns integer
Hi , I want to know is this behavior expected and why is that ? Need some help gender <- c("F", "M", "M", "F", "F", "M", "F", "F") > age <- c(23, 25, 27, 29, 31, 33, 35, 37) > df<- data.frame(gender,age) > typeof(df[[1]]) [1] "integer"
2014 Feb 07
1
How to set user read request while R install
Hi , I have installed R on my system and the user access control looks like this -rwxr-x*---* 1 root root 10578117 Feb 3 11:26 libR.so I have installed R as root , but the access control for other is not enabled by default ( at least Read option) . This can be solved using linux ways, but I am interested to know if there is any way to mention while we run R or install R packages. What I am
2014 Feb 25
1
What this error means
Hi , I am running R from C using the interpreter . Now i execute detach("package:td", unload=TRUE) And I get the following error . Any idea what it means ? *** caught segfault *** address 0x102, cause 'memory not mapped' Traceback: 1: sys.parent() 2: sys.function(sys.parent()) 3: formals(sys.function(sys.parent())) 4: match.arg(event) 5: packageEvent(pkgname,
2020 Sep 11
4
Garbage collection of seemingly PROTECTed pairlist
I want to write an R function using R's C interface that takes a 2-column matrix of increasing, non-overlapping integer intervals and returns a list with those intervals plus some added intervals, such that there are no gaps. For example, it should take the matrix rbind(c(5L, 6L), c(7L, 10L), c(20L, 30L)) and return list(c(5L, 6L), c(7L, 10L), c(11L, 19L), c(20L, 30L)). Because the output is
2009 Jul 13
12
.html/.html.erb/.rhtml to PDF
Hello All, I wanted to convert .html file into .pdf. is there any rails plugin ?? Thanks, Sandip R~ -- Ruby on Rails Developer http://sandip.sosblog.com http://funonrails.wordpress.com www.joshsoftware.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2009 Sep 29
10
rails 2.3.3 upgrade shows error
You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<< any ideas ? Application works fine with rails 2.1.0 Sandip -- Ruby on Rails Developer http://funonrails.wordpress.com www.joshsoftware.com http://brandpotion.com (Latest project released) --~--~---------~--~----~------------~-------~--~----~
2009 Jun 05
6
rails 2.3.2
Hi all, I am using rails v.2.3.2 and if I put following line to my ApplicationController: include LoginSystem and I moved my login_system.rb to lib folder: module LoginSystem protected def is_logged_in? @logged_in_user = User.find(session[:user]) if session[:user] end def logged_in_user return @logged_in_user if is_logged_in? end def logged_in_user=(user) if
2014 Jun 25
1
Need help on calling Head from C
Hi , I am trying to call head function from C . My doubt is with the parameter n,how to pass it . PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE))); SET_TAG(CDDR(dfm), install("stringsAsFactors")) ; SEXP res = PROTECT(eval(dfm,R_GlobalEnv)); PROTECT(head=lang3(install("head"),res,ScalarInteger(1))); head = PROTECT(eval(head,R_GlobalEnv)); I tried
2014 Apr 03
1
question regarding lang2 command in C
Hi , I am asking too many questions , sorry for that . I am creating a data frame in C itself , reading a table . The data frame calling code looks like this ====================================== *PROTECT(dfm=lang2(install("data.frame"),df));* *SEXP res = PROTECT(eval(dfm,R_GlobalEnv));* UNPROTECT(2); return res; ================================== It works fine , now the problem
2006 Mar 09
1
Rails File Upload w/ Ajax Update?
I''m trying to upload a file, display the upload progress and then update a table with the newly uploaded file. Is there a way to specify a :success handler for form_tag_with_upload_progress such that I have access to the request.response data (in the way I can with link_to_remote)? The :finish JavaScript is being executed but because there is no request object, the table
2012 Feb 01
12
date validation in rails 3
consider scenario, User model with name, birth_date fields (here birth_date is not mandatory field) inside view form birth_date is assigned as ''31/31/1985'' which is invalid ideally user object should be invalid and while save raise an error on birth_date field but that''s not happening and user object gets saved with birth_date as blank which is completely misleading.
2018 Aug 24
5
True length - length(unclass(x)) - without having to call unclass()?
Is there a low-level function that returns the length of an object 'x' - the length that for instance .subset(x) and .subset2(x) see? An obvious candidate would be to use: .length <- function(x) length(unclass(x)) However, I'm concerned that calling unclass(x) may trigger an expensive copy internally in some cases. Is that concern unfounded? Thxs, Henrik
2009 Dec 28
3
Mysql::Error: Lock wait timeout exceeded; try restarting transaction
Hello all I am using acts_as_ferret in user model. Error Message: -------------- ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: UPDATE `users` SET `updated_at` = ''2009-12-28 14:31:50'', `active_till` = ''2009-12-28 14:31:50'' WHERE `id` = 21 Where: ------ calls#audit
2018 Sep 05
4
True length - length(unclass(x)) - without having to call unclass()?
The bottomline here is that one can always call a base method, inexpensively and without modifying the object, in, let's say, *formal* OOP languages. In R, this is not possible in general. It would be possible if there was always a foo.default, but primitives use internal dispatch. I was wondering whether it would be possible to provide a super(x, n) function which simply causes the
2020 May 18
2
Menu rotation
Hi, FrameBuffer has the option "fbcon=rotate:1". Could a similar functionality be implemented in the video driver (VBE?) that is used by Syslinux? Is it legal to copy that code from the FBCon portion into the Syslinux video driver portion? If so, where should I start looking? Thanks for all your help. SS On Fri, May 15, 2020 at 7:15 AM Jane Todoroski <jane.todoroski at
2001 Apr 30
1
Segmentation fault linked to memory? (PR#929)
Hi Everyone, The following rather extreme claim on memory causes a segmentation fault on my installation: fred <- matrix(1:1200, 20, 60) littleOP <- function(x, y) { z <- as.vector(x) %*% t(as.vector(y)) dim(z) <- c(dim(x), dim(y)) z } littleOP(fred, fred) # this is OK littleOP(littleOP(fred, fred), fred) # whoops! Segmentation fault What's a bit strange
2009 Jun 08
3
Will Pagination links getting not behaving as i wanted.
Hello All, I have will pagination links in index view which works fine. but when i performing some other action and replacing list view that time pagination links i am supposed to be for index action. but they are not......links goes to last performed action. You have any idea how to fix this problem ? NOTE: i am updating list after creation of resource record that time pagination links goes
2011 Mar 18
3
webapplications with rails+geokit
Hi all Anybody knows any webapplictions presently using geokit plugin with rails 2.x or 3.x ? If yes pls send me the url pls. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2009 Jun 04
4
ActionController::InvalidAuthenticityToken & :before
I have a form that submits search criteria and while it is processing I wanted to use a js function to indicate: <% form_remote_tag :update => ''mainbody'', :url => {:action => ''search''}, :before => "wait_message(''mainbody'',''S E A R C H I N G'')" do%> wait_message() executes but then when