Displaying 20 results from an estimated 10000 matches similar to: "Undestanding return()"
2011 Jul 15
2
Problem in installing rJava from source
Hi all, I was trying to install rJava package (some older version) from
source. However could not achieve using "Rcmd build -binary rJava" syntax
with windows cmd. The building process stopped with following error:
ERROR*> JavaSoft\{JRE|JDK} can't open registry keys.
ERROR: cannot find Java Development Kit.
Please set JAVA_HOME to specify it's location normally
ERROR:
2012 Dec 20
3
Problem loading .r file
Hello all,
I was trying to load a .r file using source() and load() functions.
Although I could be able to load the codes (mainly few user defined
functions) written in that .r. file correctly, however getting
following error:
> source("D:/Book Code.r")
Error in sys.call(sys.parent()) : node stack overflow
> load("D:/Book Code.r")
Error: bad restore file magic number
2017 Jul 16
3
readLines without skipNul=TRUE causes crash
hi, thank you for attempting this. it looks like your unix machine unzipped
the txt file without corruption -- if you copied over the same txt file to
windows 7, i don't think that would reproduce the problem? i think it
needs to be the corrupted text file where R.utils::countLines( txtfile
) gives 809367. i am able to reproduce on two distinct windows machines
but no guarantee i'm
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
I am not able to reproduce your segfault on a Windows 7 platform either:
##########################
fn1 <- "d:/DADOS_ENEM_2009.txt"
sessionInfo()
## R version 3.4.1 (2017-06-30)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 7 x64 (build 7601) Service Pack 1
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2]
2011 Apr 07
1
An extention of outer() ?
Dear all, as per my understanding, outer() function is to facilitate
2-dimensional function evaluation, like to evaluate f(x,y) for different
values of x and y. However I have slightly modified version of that, where x
is a matrix with, say, 5 rows and 2 columns and y is a vector. Let take
following example:
fn1 <- function(x1, x2, y) return (x1+x2+y)
x <- matrix(1:10, nc = 2)
y
2017 Jul 15
3
readLines without skipNul=TRUE causes crash
I am not able to reproduce this on a Linux platform:
#######################3
fn1 <- "/home/jdnewmil/Downloads/Microdados ENEM 2009/Dados Enem 2009/DADOS_ENEM_2009.txt"
sessionInfo()
## R version 3.4.1 (2017-06-30)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 14.04.5 LTS
##
## Matrix products: default
## BLAS: /usr/lib/libblas/libblas.so.3.0
## LAPACK:
2017 Jul 16
2
readLines without skipNul=TRUE causes crash
hi, yep, there are two problems -- but i think only the segfault is within
the scope of a base R issue? i need to look closer at the corrupted
decompression and figure out whether i should talk to the brazilian
government agency that creates that .rar file or open an issue with the
archive package maintainer. my goal in this thread is only to figure out
how to replicate the goofy text file so
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
I see the problem on Windows 10, R-3.4.0, R.exe. It is not compiled for
debugging but gdb gives some information when I attach the debugger after
the 'R..has stopped working' popup appears. I don't know how reliable it
is:
(gdb) info threads
Id Target Id Frame
* 4 Thread 11848.0x1500 0x00007ffe38dc8861 in ntdll!DbgBreakPoint ()
from
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
So you are saying there are two problems... one that produces a corrupt file from a valid compressed file, and one that segfaults when presented with that corrupt file? Can you please confirm the file name and run md5sum on it and share the result so we can tell when the file problem has been reproduced?
--
Sent from my phone. Please excuse my brevity.
On July 16, 2017 3:21:21 AM PDT, Anthony
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
I am stuck. The archive package won't compile for me on Ubuntu, and the CRANextra repo seems to be down so I cannot install packages on Windows right now. Perhaps you can zip the corrupt text file and put it online somewhere? Don't use the archive package to pack it since there seem to be issues with that tool on your machine.
I would discourage you from harassing the Brazilian
2010 Sep 14
5
Problem with cat()
Dear all, I have a problem with the cat() function. Let say I have following:
fn1 <- function(n = 5){
mat <- matrix(rnorm(5*5), 5, 5)
cat(as.character(mat))
return(n)
}
However when I run above function I get this:
> fn1()
-0.601930631438248 -1.16950049447942 0.469257329394626
-1.39766868242906 -1.02580943892082 1.4067931110327 -1.07245318857022
-0.0205043699310245 0.234628727206755
2017 Jul 17
0
readLines without skipNul=TRUE causes crash
The original file had a lot of trailing null bytes so I tried making a
similar file with:
tf <- tempfile(); file <- file(tf, "wb")
for(i in 1:(2^15-1))writeBin(rep(as.raw(32:127), len=2^16), file)
for(i in 1:(2^15-1))writeBin(rep(as.raw(0L), len=2^16), file)
close(file)
log2(file.size(tf))
#[1] 31.99996
Reading this with readLines() caused R-3.4.0 to segfault in Rf_con_pushback
2017 Jul 17
1
readLines without skipNul=TRUE causes crash
hi, thanks again for taking the time. since corrupted compression prompted
the segfault for me in the first place, i've just posted the text file
as-is. it's a 2.4GB file so to be avoided on a metered internet
connection. i've updated the bugzilla report at
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17311 with more
relevant info. these lines of code crash both windows R
2018 Mar 11
0
Empirical density estimation
On 3/11/2018 3:35 PM, Christofer Bogaso wrote:
> But for my reporting purpose, I need to generate a bell curve like
> plot based on empirical PDF, that also contains original points.
>
> Any idea would be helpful. Thanks,
>
Christofer,
something like the following may get you what you want:
## get the kernel density estimate
dens <- density(Dat)
## estimate the density at
2018 Mar 11
2
Empirical density estimation
But for my reporting purpose, I need to generate a bell curve like
plot based on empirical PDF, that also contains original points.
Any idea would be helpful. Thanks,
On Mon, Mar 12, 2018 at 3:49 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> You need to re-read ?density and perhaps think again -- or do some study --
> about how a (kernel) density estimate works. The points at
2010 Jul 14
3
How to see inside of this function?
Hi, there is a function Skewness() under fBasics package. If I type
"skewness", I get followings:
> skewness
function (x, ...)
{
UseMethod("skewness")
}
<environment: namespace:timeDate>
Would be great if someone tell me how to see the codes of this function.
2ndly suppose I create following function:
fn1 <- function(x) return(x+2)
How
2011 Feb 01
1
Working with additional input for user defined function
Hi all, suppose I have following user defined function:
fn1 = function(x, y, ...) {
z <- x+y; u=y^2
# if something with name "add" exists in the
function argument then do some calculation and return that calculated value,
NOT z
# if NOT then return z
2011 Aug 15
3
write.table extra column
In the following data.frame there are 6 columns, but 7 are written to
the CSV file.
install.packages("pmlr")
library(pmlr)
data(enzymes)
write.table(enzymes, sep=",", eol="\n",file="albert.csv")
2018 Mar 27
5
unable to move temporary installation of package
Thanks,
Here's the error, for example:
> install.packages("mgcv")
Installing package into 'C:/Users/pl39/Documents/R/win-library/3.4'
(as 'lib' is unspecified)
trying URL 'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.4/mgcv_1.8-23.zip'
Content type 'application/zip' length 2775362 bytes (2.6 MB)
downloaded 2.6 MB
package 'mgcv'
2011 Jul 19
3
How to get predicted values of y for different x values?
Here is my model with interaction terms and control variables (I changed
variables names for easy read):
reg1 <- lm(y ~ x1*x2*x3 +control1 + control2 + control3)
x1 ranges from 0 to 6; x2 from 0 to 5; and x3 from 0 to 4. All three are
discrete ordinal variables; but I will treat them as continuous variables.
(a) How can I see the predicted values of y for each of these scenarios (210