Microsoft Ad SDK for UWP Crashes a lot (out_of_memory, fireevent) - out-of-memory

Since the creators update for Windows we have started getting an insane number of crashes, all coming deep from withing the Ad SDK and some from edgehtml.dll.
We are using C# (UWP platform) + Monogame.
We plugged in handlers for unhandled exceptions and for dispatcher but we didn't have much luck cathing them.
Below I have pasted 2 stack traces from the 2 most common errors:
0 XXXXXXOurGameApp out_of_memory 0x0000000000000000
1 unknown.dll [.ecxr] 0x0000000000000000
2 KERNELBASE.dll RaiseFailFastException 0x0000000000000000
3 edgehtml.dll Abandonment::InduceAbandonment 0x0000000000000000
4 edgehtml.dll Abandonment::OutOfMemory 0x0000000000000000
5 edgehtml.dll Abandonment::InduceHRESULTAbandonment 0x0000000000000000
6 edgehtml.dll CWebPlatformTridentHost::EnsureWebPlatformProxyRoot 0x0000000000000000
7 edgehtml.dll CWUCLayerManager::GetWebPlatformProxyRoot 0x0000000000000000
8 edgehtml.dll CWUCLayerManager::Initialize 0x0000000000000000
9 edgehtml.dll RefCounted_CWUCLayerManager,MultiThreadedRefCount_::Create_CWUCLayerManager,CDXSystem * __ptr64,LayerManagerTarget * __ptr64 & __ptr64,bool & __ptr64,bool & __ptr64,bool & __ptr64,unsigned long & __ptr64_ 0x0000000000000000
10 edgehtml.dll CDXSystem::CreateLayerManager 0x0000000000000000
11 edgehtml.dll CDoc::EnsureLayerManager 0x0000000000000000
12 edgehtml.dll CView::Activate 0x0000000000000000
13 edgehtml.dll CDoc::RunningToInPlace 0x0000000000000000
14 edgehtml.dll CServer::TransitionTo 0x0000000000000000
15 edgehtml.dll CServer::UIActivate 0x0000000000000000
16 edgehtml.dll CWebPlatformTridentHost::ActivateMe 0x0000000000000000
17 edgehtml.dll CServer::ActivateView 0x0000000000000000
18 edgehtml.dll CServer::DoUIActivate 0x0000000000000000
19 edgehtml.dll CServer::DoVerb 0x0000000000000000
20 edgehtml.dll CWebPlatformTridentHost::_Activate 0x0000000000000000
21 edgehtml.dll CWebPlatformTridentHost::_OnSetClientSite 0x0000000000000000
22 edgehtml.dll CWebPlatformTridentHost::SetClientSite 0x0000000000000000
23 edgehtml.dll CWebPlatform::_OnInPlaceActivate 0x0000000000000000
24 edgehtml.dll CWebPlatform::_OnActivateChange 0x0000000000000000
25 edgehtml.dll CCoreWebViewTaskHandler::_OleActivateWebPlatform 0x0000000000000000
26 edgehtml.dll CCoreWebViewTaskHandler::Initialize 0x0000000000000000
27 edgehtml.dll CCoreWebView::Initialize 0x0000000000000000
28 EdgeManager.dll WebViewManager::CreateCoreWebViewPrivate 0x0000000000000000
29 EdgeManager.dll CCoreWebViewControl::Initialize 0x0000000000000000
30 Windows.UI.Xaml.dll DirectUI::CoreWebViewHost::CreateComponent 0x0000000000000000
31 Windows.UI.Xaml.dll DirectUI::WebView::CreateComponent 0x0000000000000000
32 Windows.UI.Xaml.dll CWebView::CreateComponent 0x0000000000000000
33 Windows.UI.Xaml.dll CComponentHost::EnsureComponentCreated 0x0000000000000000
34 Windows.UI.Xaml.dll DirectUI::WebView::OnPropertyChanged2 0x0000000000000000
35 Windows.UI.Xaml.dll DirectUI::DependencyObject::NotifyPropertyChanged 0x0000000000000000
36 Windows.UI.Xaml.dll CDependencyObject::SetEffectiveValue 0x0000000000000000
37 Windows.UI.Xaml.dll CDependencyObject::UpdateEffectiveValue 0x0000000000000000
38 Windows.UI.Xaml.dll CDependencyObject::SetValue 0x0000000000000000
39 Windows.UI.Xaml.dll CUIElement::SetValue 0x0000000000000000
40 Windows.UI.Xaml.dll CFrameworkElement::SetValue 0x0000000000000000
41 Windows.UI.Xaml.dll CWebView::SetValue 0x0000000000000000
42 Windows.UI.Xaml.dll DependencyObject_SetValue 0x0000000000000000
43 Windows.UI.Xaml.dll DirectUI::DependencyObject::SetValueCore 0x0000000000000000
44 Windows.UI.Xaml.dll DirectUI::DependencyObject::SetValueByKnownIndex_double_ 0x0000000000000000
45 Microsoft.Advertising.dll Windows::UI::Xaml::FrameworkElement::Width::[Windows::UI::Xaml::IFrameworkElement]::set 0x0000000000000000
46 Microsoft.Advertising.dll Microsoft::Advertising::WinRT::UI::AdvertisingWebBrowser::OnSizeChanged 0x0000000000000000
47 Microsoft.Advertising.dll `Windows::UI::Xaml::RoutedEventHandler::RoutedEventHandler_Microsoft::Advertising::WinRT::UI::AdvertisingWebBrowser,void (__cdecl Microsoft::Advertising::WinRT::UI::AdvertisingWebBrowser::*) 0x0000000000000000
48 Microsoft.Advertising.dll Windows::UI::Xaml::SizeChangedEventHandler::[Windows::UI::Xaml::SizeChangedEventHandler::__abi_IDelegate]::__abi_Windows_UI_Xaml_SizeChangedEventHandler___abi_IDelegate____abi_Invoke 0x0000000000000000
49 Windows.UI.Xaml.dll DirectUI::CRoutedEventSourceBase_DirectUI::IUntypedEventSource,Windows::UI::Xaml::ISizeChangedEventHandler,IInspectable,Windows::UI::Xaml::ISizeChangedEventArgs_::Raise 0x0000000000000000
50 Windows.UI.Xaml.dll DirectUI::FrameworkElement::OnSizeChanged 0x0000000000000000
51 Windows.UI.Xaml.dll DirectUI::DXamlCore::RaiseEvent 0x0000000000000000
52 Windows.UI.Xaml.dll CLayoutManager::RaiseSizeChangedEvents 0x0000000000000000
53 Windows.UI.Xaml.dll CLayoutManager::UpdateLayout 0x0000000000000000
54 Windows.UI.Xaml.dll CCoreServices::NWDrawTree 0x0000000000000000
55 Windows.UI.Xaml.dll CXcpBrowserHost::OnTick 0x0000000000000000
56 Windows.UI.Xaml.dll CXcpDispatcher::Tick 0x0000000000000000
57 Windows.UI.Xaml.dll CXcpDispatcher::OnReentrancyProtectedWindowMessage 0x0000000000000000
58 Windows.UI.Xaml.dll CDeferredInvoke::DispatchQueuedMessage 0x0000000000000000
59 Windows.UI.Xaml.dll CXcpDispatcher::MessageTimerCallbackStatic 0x0000000000000000
60 CoreMessaging.dll Microsoft__CoreUI__Dispatch__TimeoutHandler$CallbackThunk 0x0000000000000000
61 CoreMessaging.dll Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch 0x0000000000000000
62 CoreMessaging.dll Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop 0x0000000000000000
63 CoreMessaging.dll Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch 0x0000000000000000
64 CoreMessaging.dll Microsoft::CoreUI::Dispatch::UserAdapter_DoWork 0x0000000000000000
65 CoreMessaging.dll Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc 0x0000000000000000
66 user32.dll UserCallWinProcCheckWow 0x0000000000000000
67 user32.dll DispatchMessageWorker 0x0000000000000000
68 Windows.UI.dll Windows::UI::Core::CDispatcher::ProcessMessage 0x0000000000000000
69 Windows.UI.dll Windows::UI::Core::CDispatcher::WaitAndProcessMessagesInternal 0x0000000000000000
70 Windows.UI.dll Windows::UI::Core::CDispatcher::ProcessEvents 0x0000000000000000
71 Windows.UI.Xaml.dll CJupiterWindow::RunCoreWindowMessageLoop 0x0000000000000000
72 Windows.UI.Xaml.dll DirectUI::DXamlCore::RunMessageLoop 0x0000000000000000
73 twinapi.appcore.dll Windows::ApplicationModel::Core::CoreApplicationView::Run 0x0000000000000000
74 twinapi.appcore.dll _lambda_3c558768873f4b5b0b4a338b4722411c_::operator 0x0000000000000000
75 SHCore.dll _WrapperThreadProc 0x0000000000000000
76 kernel32.dll BaseThreadInitThunk 0x0000000000000000
77 ntdll.dll RtlUserThreadStart
Stack trace 2:
0 edgehtml.dll Tree::SHoldForceScriptingModeToken::SHoldForceScriptingModeToken 0x000000000000002C
1 edgehtml.dll CBase::FireEvent 0x000000000000008C
2 edgehtml.dll CWindow::Fire_onbeforeunload 0x000000000000004E
3 edgehtml.dll COmWindowProxy::Fire_onbeforeunload 0x000000000000016B
4 edgehtml.dll COmWindowProxy::ExecRefresh 0x00000000000002D4
5 edgehtml.dll GWndAsyncTask::Run 0x000000000000001B
6 edgehtml.dll HTML5TaskScheduler::RunReadiedTask 0x0000000000000208
7 edgehtml.dll HTML5TaskScheduler::RunReadiedTasks 0x00000000000000E3
8 edgehtml.dll NormalPriorityAtInputEventLoopDriver::DriveRegularPriorityTaskExecution 0x00000000000000A9
9 edgehtml.dll GlobalWndProc 0x0000000000000162
10 user32.dll UserCallWinProcCheckWow 0x00000000000002AD
11 user32.dll DispatchMessageWorker 0x000000000000019F
12 Windows.UI.dll Windows::UI::Core::CDispatcher::ProcessMessage 0x00000000000000FE
13 Windows.UI.dll Windows::UI::Core::CDispatcher::WaitAndProcessMessagesInternal 0x00000000000000AE
14 Windows.UI.dll Windows::UI::Core::CDispatcher::ProcessEvents 0x000000000000007B
15 Windows.UI.Xaml.dll CJupiterWindow::RunCoreWindowMessageLoop 0x000000000000004C
16 Windows.UI.Xaml.dll DirectUI::DXamlCore::RunMessageLoop 0x000000000000004C
17 twinapi.appcore.dll Windows::ApplicationModel::Core::CoreApplicationView::Run 0x000000000000003A
18 twinapi.appcore.dll _lambda_3c558768873f4b5b0b4a338b4722411c_::operator 0x00000000000000C4
19 SHCore.dll _WrapperThreadProc 0x00000000000000F5
20 kernel32.dll BaseThreadInitThunk 0x0000000000000014
21 ntdll.dll RtlUserThreadStart 0x0000000000000021
Has anyone experience anything like this?

Related

ifelse() not working correctly using mutate: R

I have a small doubt in ifelse confition. I've read numerous articles and tried different solutions but I'm not able to solve it. Please help me with it.
I have a column of numbers ranging from 0:59 and it recurs like this for 500 rows.
I am trying to create another column which divides 0:29 as 0 and 30:59 as 30.
Data:
> data$Minute
[1] 0 0 0 1 1 1 2 2 2 2 2 2 3 3 4 4 4 5 5 5 5 5 6 6 6 7 7 7 7 7 8 8 8 8 8 8 9
[38] 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 12 12 12 12 13 13 13 13 13 14 14 14 14 14 14 15 15 15
[75] 15 15 15 15 15 15 16 16 16 16 16 17 17 18 18 18 18 18 19 19 19 19 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21
[112] 22 22 22 22 22 23 23 23 23 23 23 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25
[149] 26 26 26 26 26 26 26 26 26 26 27 27 27 27 27 27 27 27 27 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 29
[186] 29 29 29 29 29 29 29 29 29 29 29 30 30 30 30 30 30 30 30 30 30 30 30 30 31 31 31 31 31 31 31 31 31 31 31 31 31
[223] 31 32 32 32 32 32 33 33 33 33 33 33 33 33 33 33 33 34 34 34 34 34 34 34 34 34 34 34 34 34 35 35 35 35 35 35 35
[260] 35 35 35 36 36 36 36 36 36 36 36 37 37 37 37 37 37 37 37 37 38 38 38 38 38 38 38 38 38 38 39 39 39 39 39 39 39
[297] 39 39 40 40 40 40 40 40 40 40 40 40 40 40 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 42 42 42 42 42 42 42
[334] 42 42 42 42 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 44 44 44 44 44 44 44 44 44 45 45 45 45 45 45 45 45
[371] 45 45 45 45 45 45 45 45 46 46 46 46 46 46 46 47 47 47 47 47 47 47 47 47 47 47 47 47 48 48 48 48 48 48 48 48 48
[408] 48 48 48 49 49 49 49 49 49 49 50 50 50 50 50 50 50 50 50 50 50 50 50 50 51 51 51 51 51 51 51 51 51 51 52 52 52
[445] 52 52 52 52 52 52 52 52 52 53 53 53 53 53 53 53 53 54 54 54 54 54 54 54 54 54 54 54 55 55 55 55 55 55 55 55 55
[482] 55 56 56 56 56 56 56 56 56 56 56 56 56 56 57 57 57 57 57 57 57 57 58 58 58 58 58 58 58 58 58 59 59 59 59 59 59
[519] 59 59 59 59 59 59 59 0 0 0 0
Code:
data<- data %>% mutate(Period = ifelse(((Minute >=0) && (Minute <= 30)),0, 30) )
While running this code, I am only getting Period value as 0 for all the data points. Can you please help me with this small issue?
Thanks in Advance!
Try this
data %>% mutate(Period = ifelse(minute <= 30, 0, 30))

Problems with column labels after importing a csv file

I'm trying to import an anova data set csv file into R using the read.csv function. When I import it the columns are labelled X........ Even though the csv file the column labels are clearly person, gender etc
I don't know why this is. I've copied the code below. Any help would be appreciated
read.csv("/Users/Desktop/R /anova data set.csv")
X.......
1 ;Person;gender;Age;Height;pre.weight;Diet;weight6weeks
2 ;25; ;41;171;60;2;60
3 ;26; ;32;174;103;2;103
4 ;1;0;22;159;58;1;54.2
5 ;2;0;46;192;60;1;54
6 ;3;0;55;170;64;1;63.3
7 ;4;0;33;171;64;1;61.1
8 ;5;0;50;170;65;1;62.2
9 ;6;0;50;201;66;1;64
10 ;7;0;37;174;67;1;65
11 ;8;0;28;176;69;1;60.5
12 ;9;0;28;165;70;1;68.1
13 ;10;0;45;165;70;1;66.9
14 ;11;0;60;173;72;1;70.5
15 ;12;0;48;156;72;1;69
16 ;13;0;41;163;72;1;68.4
17 ;14;0;37;167;82;1;81.1
18 ;27;0;44;174;58;2;60.1
19 ;28;0;37;172;58;2;56
20 ;29;0;41;165;59;2;57.3
21 ;30;0;43;171;61;2;56.7
22 ;31;0;20;169;62;2;55
23 ;32;0;51;174;63;2;62.4
24 ;33;0;31;163;63;2;60.3
25 ;34;0;54;173;63;2;59.4
26 ;35;0;50;166;65;2;62
27 ;36;0;48;163;66;2;64
28 ;37;0;16;165;68;2;63.8
29 ;38;0;37;167;68;2;63.3
30 ;39;0;30;161;76;2;72.7
31 ;40;0;29;169;77;2;77.5
32 ;52;0;51;165;60;3;53
33 ;53;0;35;169;62;3;56.4
34 ;54;0;21;159;64;3;60.6
35 ;55;0;22;169;65;3;58.2
36 ;56;0;36;160;66;3;58.2
37 ;57;0;20;169;67;3;61.6
38 ;58;0;35;163;67;3;60.2
39 ;59;0;45;155;69;3;61.8
40 ;60;0;58;141;70;3;63
41 ;61;0;37;170;70;3;62.7
42 ;62;0;31;170;72;3;71.1
43 ;63;0;35;171;72;3;64.4
44 ;64;0;56;171;73;3;68.9
45 ;65;0;48;153;75;3;68.7
46 ;66;0;41;157;76;3;71
47 ;15;1;39;168;71;1;71.6
48 ;16;1;31;158;72;1;70.9
49 ;17;1;40;173;74;1;69.5
50 ;18;1;50;160;78;1;73.9
51 ;19;1;43;162;80;1;71
52 ;20;1;25;165;80;1;77.6
53 ;21;1;52;177;83;1;79.1
54 ;22;1;42;166;85;1;81.5
55 ;23;1;39;166;87;1;81.9
56 ;24;1;40;190;88;1;84.5
57 ;41;1;51;191;71;2;66.8
58 ;42;1;38;199;75;2;72.6
59 ;43;1;54;196;75;2;69.2
60 ;44;1;33;190;76;2;72.5
61 ;45;1;45;160;78;2;72.7
62 ;46;1;37;194;78;2;76.3
63 ;47;1;44;163;79;2;73.6
64 ;48;1;40;171;79;2;72.9
65 ;49;1;37;198;79;2;71.1
66 ;50;1;39;180;80;2;81.4
67 ;51;1;31;182;80;2;75.7
68 ;67;1;36;155;71;3;68.5
69 ;68;1;47;179;73;3;72.1
70 ;69;1;29;166;76;3;72.5
71 ;70;1;37;173;78;3;77.5
72 ;71;1;31;177;78;3;75.2
73 ;72;1;26;179;78;3;69.4
74 ;73;1;40;179;79;3;74.5
75 ;74;1;35;183;83;3;80.2
76 ;75;1;49;177;84;3;79.9
77 ;76;1;28;164;85;3;79.7
78 ;77;1;40;167;87;3;77.8
79 ;78;1;51;175;88;3;81.9
colnames(aov)
[1] "X......."

What ways exist to create an array with given dimensions from a given sequence in Julia?

I'm new to Julia and I could not find any useful information on the following: I would like to create an array of given dimensions and fill it with a given sequence.
m,n = 10,10 # dimensions
i = 1:100 # sequence
I've tried to use collect, but this gives me a single column array. I have also tried it the Julia way
[? for i in 1:m, j in 1:n]
but I don't know what I could insert for ?.
The easiest way is reshape(i, m,n) (potentially together with a collect if you really need an Array{Int64,2}):
julia> reshape(i,m,n)
10×10 reshape(::UnitRange{Int64}, 10, 10) with eltype Int64:
1 11 21 31 41 51 61 71 81 91
2 12 22 32 42 52 62 72 82 92
3 13 23 33 43 53 63 73 83 93
4 14 24 34 44 54 64 74 84 94
5 15 25 35 45 55 65 75 85 95
6 16 26 36 46 56 66 76 86 96
7 17 27 37 47 57 67 77 87 97
8 18 28 38 48 58 68 78 88 98
9 19 29 39 49 59 69 79 89 99
10 20 30 40 50 60 70 80 90 100
julia> collect(ans)
10×10 Array{Int64,2}:
1 11 21 31 41 51 61 71 81 91
2 12 22 32 42 52 62 72 82 92
3 13 23 33 43 53 63 73 83 93
4 14 24 34 44 54 64 74 84 94
5 15 25 35 45 55 65 75 85 95
6 16 26 36 46 56 66 76 86 96
7 17 27 37 47 57 67 77 87 97
8 18 28 38 48 58 68 78 88 98
9 19 29 39 49 59 69 79 89 99
10 20 30 40 50 60 70 80 90 100
To answer your question what to put as ? in the array comprehension approach, you must convert the cartesian index to a linear index, for example like so:
julia> [i[LinearIndices((m,n))[p,q]] for p in 1:m, q in 1:n]
10×10 Array{Int64,2}:
1 11 21 31 41 51 61 71 81 91
2 12 22 32 42 52 62 72 82 92
3 13 23 33 43 53 63 73 83 93
4 14 24 34 44 54 64 74 84 94
5 15 25 35 45 55 65 75 85 95
6 16 26 36 46 56 66 76 86 96
7 17 27 37 47 57 67 77 87 97
8 18 28 38 48 58 68 78 88 98
9 19 29 39 49 59 69 79 89 99
10 20 30 40 50 60 70 80 90 100
Of course, you can also calculate the linear index yourself, [i[(q-1)*m + p] for p in 1:m, q in 1:n].
Alternatively, you can preallocate the array and fill it in a linear fashion:
julia> result = Matrix{Int64}(undef, m,n);
julia> result[:] .= i;
julia> result
10×10 Array{Int64,2}:
1 11 21 31 41 51 61 71 81 91
2 12 22 32 42 52 62 72 82 92
3 13 23 33 43 53 63 73 83 93
4 14 24 34 44 54 64 74 84 94
5 15 25 35 45 55 65 75 85 95
6 16 26 36 46 56 66 76 86 96
7 17 27 37 47 57 67 77 87 97
8 18 28 38 48 58 68 78 88 98
9 19 29 39 49 59 69 79 89 99
10 20 30 40 50 60 70 80 90 100
which is basically equivalent to the naive, explicit solution
julia> result = Matrix{Int64}(undef, m,n);
julia> for k in eachindex(i) result[k] = i[k] end
julia> result
10×10 Array{Int64,2}:
1 11 21 31 41 51 61 71 81 91
2 12 22 32 42 52 62 72 82 92
3 13 23 33 43 53 63 73 83 93
4 14 24 34 44 54 64 74 84 94
5 15 25 35 45 55 65 75 85 95
6 16 26 36 46 56 66 76 86 96
7 17 27 37 47 57 67 77 87 97
8 18 28 38 48 58 68 78 88 98
9 19 29 39 49 59 69 79 89 99
10 20 30 40 50 60 70 80 90 100

Poisson distribution too narrow, negative binomial too broad

I'm trying to fit some count data for the number of fish purchased by anglers(grey in the image) with a distribution using optim in R. I've fit both a poisson (red) and negative binomial distribution (blue) but as you can see neither seems to be right. What should my next steps be for getting a better fit?
My graph:
#fit poisson curve to data using optim
minus.logL.s<-function(lambda, dat){
-sum(dpois(dat,lambda, log=TRUE))}
mle<-optim(par=45,fn=minus.logL.s, method="BFGS",hessian=T,dat=survey.responses.baitusers$fish.per.trip)
mle
#simulate data coming from a poisson distribution of mean 38
simspois<-as.data.frame(rpois(1000, 38))
colnames(simspois)<-("simulated_values")
#fit negative binomial curve
minus.logL.nb<-function(pars, dat){
mu<-pars[1]
size<-pars[2]
-sum(dnbinom(dat, mu=mu, size=size,log=TRUE))}
mlenb<-optim(par=c(mu=38,size=1),fn=minus.logL.nb, method="BFGS",hessian=T,dat=survey.responses.baitusers$fish.per.trip)
mlenb
simsnegbin<-as.data.frame(rnbinom(1000,size=4, mu=38))
colnames(simsnegbin)<-("simulated_valuesnb")
#graph both
graph<-ggplot(survey.responses.baitusers)+aes(fish.per.trip)+geom_histogram()+geom_smooth(data=simspois, aes(simulated_values), stat = "count",color="red")+geom_smooth(data=simsnegbin, aes(simulated_valuesnb), stat="count", color="blue")
graph
Output from negative binomial fitting:
$par
mu size
38.333338 4.107287
Output from poisson fitting:
$par
[1] 38.33333
My data:
> survey.responses.baitusers$fish.per.trip
[1] 15 34 42 38 8 38 21 29 58 29 40 35 33 51 50 40 8 45 44 45 34 57 8 28 63 54 22 44 65 54 54 15 12
[34] 42 59 40 43 95 80 15 54 19 44 27 53 95 21 38 40 13 25 27 79 38 85 40 33 74 34 77 34 34 33 35 89 34
[67] 34 37 16 60 17 21 18 37 34 27 30 62 48 35 55 50 23 32 56 34 11 21 34 48 15 34 26 54 8 95 8 58 54
[100] 44 34 47 35 13 21 53 52 52 40 40 33 8 15 15 25 41 63 34 38 87 14 68 58 59 34 55 24 24 35 33 21 8
[133] 8 15 51 48 8 21 39 29 50 54 62 16 54 33 58 22 49 40 30 51 21 19 51 40 34 27 40 45 80 69 8 42 33
[166] 62 40 82 17 14 30 61 45 70 33 33 16 49 32 34 31 31 18 64 33 39 21 56 40 52 71 34 30 27 54 8 64 16
[199] 54 127 13 51 40 33 63 31 30 63 56 57 77 46 64 22 34 50 66 33 34 59 45 16 21 60 58 15 64 29 40 44 29
[232] 8 21 16 72 34 49 57 34 34 15 33 54 40 32 33 95 107 49 64 59 64 37 70 45 16 16 40 19 53 34 39 21 36
[265] 34 17 8 34 51 13 20 34 21 38 36 36 41 34 83 27 8 45 29 34 21 37 44 15 50 25 27 8 27 19 24 40 8
[298] 28 36 24 40 21 70 20 34 21 46 16 20 8 33 34 54 44 77 80 15 34 40 29 48 59 29 8 15 47 45 21 41 23
[331] 34 51 14 40 25 45 64 59 107 21 59 27 56 48 34 45 59 35 30 37 32 8 51 11 48 64 32 8 52 14 20 18 8
[364] 53 52 53 33 34 48 62 34 34 8 46 39 21 33 34 40 49 52 19 24 29 43 19 29 27 46 52 29 51 61 16 17 35
[397] 34 40 25 28 34 42 66 35 49 35 51 66 21 51 45 14 53 22 42 64 8 48 28 66 52 40 29 34 34 41 59 34 52
[430] 16 32 20 35 8 8 21 49 40 33 16 24 8 42 23 63 26 21 33 8 23 112 57 8 46 18 67 34 30 33 40 43 57
[463] 60 33 14 27 44 21 31 30 27 49 57 69 66 22 28 55 11 43

Beginner trying to read a CSV with R: Embedded nul in string

I'm trying to read a simple csv file in R with this code:
data <- read.csv(file="\0Laplacian1Entropy.csv", header=TRUE, sep=" ")
But I always get this error:
> Error: embedded nul in string: '\0Laplacian1Entropy.csv'
This is my file:
i j Entropy
1 63 0.99908075437993904
1 64 0.99908075437993904
2 63 0.90122030232323391
2 64 0.92235382341992733
3 63 0.56791528442061989
3 64 0.67774259405167925
4 63 0.99908075437993904
4 64 0.96221996088169448
5 63 0.7960934421903898
5 64 0.71618862493713764
6 63 0.97911703542740458
6 64 0.46549718791094752
7 63 0.90122030232323391
7 64 0.73578113660861544
8 63 0.77573042572641582
8 64 0.77573042572641582
9 63 0.8586686413596436
9 64 0.90122030232323391
10 63 0.83758110743543879
10 64 0.67774259405167925
11 63 0.99908075437993904
11 64 0.8586686413596436
12 63 0.96221996088169448
12 64 0.67774259405167925
13 63 0.99908075437993904
13 64 0.8586686413596436
14 63 0.62183659568813598
14 64 0.56791528442061989
15 63 0.65887781135396584
15 64 0.8586686413596436
16 63 0.92235382341992733
16 64 0.92235382341992733
17 63 0.7960934421903898
17 64 0.92235382341992733
18 63 0.60364928357716474
18 64 0.90122030232323391
19 63 0.90122030232323391
19 64 0.83758110743543879
20 63 0.92235382341992733
20 64 0.71618862493713764
21 63 0.73578113660861544
21 64 0.96221996088169448
22 63 0.77573042572641582
22 64 0.96221996088169448
23 63 0.90122030232323391
23 64 0.97911703542740458
24 63 0.71618862493713764
24 64 0.8586686413596436
25 63 0.96221996088169448
25 64 0.99908075437993904
26 63 0.97911703542740458
26 64 0.7960934421903898
27 63 0.67774259405167925
27 64 0.71618862493713764
28 63 0.65887781135396584
28 64 0.67774259405167925
29 63 0.83758110743543879
29 64 0.90122030232323391
30 63 0.90122030232323391
30 64 0.77573042572641582
31 63 0.97911703542740458
31 64 0.73578113660861544
32 63 0.97911703542740458
32 64 0.99908075437993904
33 63 0.99908075437993904
33 64 0.8586686413596436
34 63 0.96221996088169448
34 64 0.92235382341992733
35 63 0.65887781135396584
35 64 0.96221996088169448
36 63 0.62183659568813598
36 64 0.62183659568813598
37 63 0.60364928357716474
37 64 0.97911703542740458
38 63 0.99908075437993904
38 64 0.90122030232323391
39 63 0.90122030232323391
39 64 0.97911703542740458
40 63 0.7960934421903898
40 64 0.73578113660861544
41 63 0.71618862493713764
41 64 0.96221996088169448
42 63 0.51584300284627072
42 64 0.67774259405167925
43 63 0.51584300284627072
43 64 0.97911703542740458
44 63 0.99908075437993904
44 64 0.96221996088169448
45 63 0.97911703542740458
45 64 0.96221996088169448
46 63 0.60364928357716474
46 64 0.67774259405167925
47 63 0.40086503572425503
47 64 0.62183659568813598
48 63 0.83758110743543879
48 64 0.56791528442061989
49 63 0.56791528442061989
49 64 0.8586686413596436
50 63 0.56791528442061989
50 64 0.96221996088169448
51 63 0.99908075437993904
51 64 0.8586686413596436
52 63 0.67774259405167925
52 64 0.83758110743543879
53 63 0.83758110743543879
53 64 0.77573042572641582
54 63 0.92235382341992733
54 64 0.92235382341992733
55 63 0.83758110743543879
55 64 0.83758110743543879
56 63 0.92235382341992733
56 64 0.92235382341992733
57 63 0.99908075437993904
57 64 0.73578113660861544
58 63 0.62183659568813598
58 64 0.99908075437993904
59 63 0.67774259405167925
59 64 0.96221996088169448
60 63 0.99908075437993904
60 64 0.97911703542740458
61 63 0.60364928357716474
61 64 0.97911703542740458
62 63 0.96221996088169448
62 64 0.46549718791094752
63 1 0.92235382341992733
63 2 0.97911703542740458
63 3 0.97911703542740458
63 4 0.7960934421903898
63 5 0.8586686413596436
63 6 0.7960934421903898
63 7 0.77573042572641582
63 8 0.26477764946943599
63 9 0.97911703542740458
63 10 0.71618862493713764
63 11 0.62183659568813598
63 12 0.77573042572641582
63 13 0.51584300284627072
63 14 0.62183659568813598
63 15 0.96221996088169448
63 16 0.99908075437993904
63 17 0.7960934421903898
63 18 0.96221996088169448
63 19 0.65887781135396584
63 20 0.62183659568813598
63 21 0.92235382341992733
63 22 0.96221996088169448
63 23 0.83758110743543879
63 24 0.56791528442061989
63 25 0.92235382341992733
63 26 0.71618862493713764
63 27 0.65887781135396584
63 28 0.99908075437993904
63 29 0.8586686413596436
63 30 0.7960934421903898
63 31 0.67774259405167925
63 32 0.67774259405167925
63 33 0.97911703542740458
63 34 0.83758110743543879
63 35 0.99908075437993904
63 36 0.71618862493713764
63 37 0.97911703542740458
63 38 0.97911703542740458
63 39 0.44907944580528197
63 40 0.65887781135396584
63 41 0.96221996088169448
63 42 0.77573042572641582
63 43 0.77573042572641582
63 44 0.67774259405167925
63 45 0.73578113660861544
63 46 0.71618862493713764
63 47 0.90122030232323391
63 48 0.97911703542740458
63 49 0.90122030232323391
63 50 0.62183659568813598
63 51 0.97911703542740458
63 52 0.8586686413596436
63 53 0.90122030232323391
63 54 0.67774259405167925
63 55 0.97911703542740458
63 56 0.55035872021707255
63 57 0.90122030232323391
63 58 0.77573042572641582
63 59 0.7960934421903898
63 60 0.8586686413596436
63 61 0.55035872021707255
63 62 0.92235382341992733
63 63 0.56791528442061989
63 64 0.71618862493713764
63 65 0.99908075437993904
63 66 0.65887781135396584
63 67 0.96221996088169448
63 68 0.96221996088169448
63 69 0.96221996088169448
63 70 0.8586686413596436
63 71 0.96221996088169448
63 72 0.96221996088169448
63 73 0.8586686413596436
63 74 0.62183659568813598
63 75 0.83758110743543879
63 76 0.77573042572641582
63 77 0.60364928357716474
63 78 0.97911703542740458
63 79 0.7960934421903898
63 80 0.83758110743543879
63 81 0.77573042572641582
63 82 0.90122030232323391
63 83 0.8586686413596436
63 84 0.83758110743543879
63 85 0.73578113660861544
63 86 0.96221996088169448
63 87 0.67774259405167925
63 88 0.99908075437993904
63 89 0.90122030232323391
63 90 0.96221996088169448
63 91 0.56791528442061989
63 92 0.97911703542740458
63 93 0.92235382341992733
63 94 0.83758110743543879
63 95 0.99908075437993904
63 96 0.83758110743543879
63 97 0.7960934421903898
63 98 0.62183659568813598
63 99 0.99908075437993904
63 100 0.97911703542740458
63 101 0.62183659568813598
63 102 0.65887781135396584
63 103 0.56791528442061989
63 104 0.73578113660861544
63 105 0.83758110743543879
63 106 0.60364928357716474
63 107 0.67774259405167925
63 108 0.8586686413596436
63 109 0.56791528442061989
63 110 0.96221996088169448
63 111 0.92235382341992733
63 112 0.7960934421903898
63 113 0.92235382341992733
63 114 0.99908075437993904
63 115 0.83758110743543879
63 116 0.92235382341992733
63 117 0.73578113660861544
63 118 0.67774259405167925
63 119 0.99908075437993904
63 120 0.83758110743543879
63 121 0.97911703542740458
63 122 0.7960934421903898
63 123 0.7960934421903898
63 124 0.62183659568813598
63 125 0.62183659568813598
63 126 0.8586686413596436
64 1 0.90122030232323391
64 2 0.90122030232323391
64 3 0.96221996088169448
64 4 0.51584300284627072
64 5 0.8586686413596436
64 6 0.67774259405167925
64 7 0.97911703542740458
64 8 0.92235382341992733
64 9 0.7960934421903898
64 10 0.73578113660861544
64 11 0.96221996088169448
64 12 0.96221996088169448
64 13 0.99908075437993904
64 14 0.56791528442061989
64 15 0.77573042572641582
64 16 0.90122030232323391
64 17 0.7960934421903898
64 18 0.90122030232323391
64 19 0.7960934421903898
64 20 0.90122030232323391
64 21 0.7960934421903898
64 22 0.77573042572641582
64 23 0.97911703542740458
64 24 0.71618862493713764
64 25 0.96221996088169448
64 26 0.83758110743543879
64 27 0.92235382341992733
64 28 0.77573042572641582
64 29 0.73578113660861544
64 30 0.62183659568813598
64 31 0.83758110743543879
64 32 0.97911703542740458
64 33 0.73578113660861544
64 34 0.7960934421903898
64 35 0.90122030232323391
64 36 0.96221996088169448
64 37 0.73578113660861544
64 38 0.51584300284627072
64 39 0.49887493461148946
64 40 0.71618862493713764
64 41 0.71618862493713764
64 42 0.83758110743543879
64 43 0.99908075437993904
64 44 0.62183659568813598
64 45 0.96221996088169448
64 46 0.65887781135396584
64 47 0.71618862493713764
64 48 0.8586686413596436
64 49 0.8586686413596436
64 50 0.65887781135396584
64 51 0.60364928357716474
64 52 0.7960934421903898
64 53 0.8586686413596436
64 54 0.96221996088169448
64 55 0.8586686413596436
64 56 0.8586686413596436
64 57 0.73578113660861544
64 58 0.49887493461148946
64 59 0.96221996088169448
64 60 0.92235382341992733
64 61 0.96221996088169448
64 62 0.8586686413596436
64 63 0.36955204268044284
64 64 0.44907944580528197
I'm wondering what is the problem.
This has nothing to do with your csv file. The error message states that you have embedded a nul char in the file name: \0 denotes ASCII byte == 0, which is forbidden in an R string (internally, it denotes the end of a string).
Perhaps you meant "\\0Laplacian1Entropy.csv" or "/0Laplacian1Entropy.csv". Anyway, if you wish to include a backslash in a string, you must escape it with... a backslash.
Remove de "\0" and let your command like this one:
data <- read.csv(file="Laplacian1Entropy.csv", header=TRUE, sep=" ")
head(data)

Resources